package cn.reghao.file.api.iface;

import cn.reghao.oss.sdk.model.dto.ObjectInfo;
import cn.reghao.oss.sdk.model.dto.ServerInfo;
import cn.reghao.oss.sdk.model.dto.media.AudioInfo;
import cn.reghao.oss.sdk.model.dto.media.ConvertedImageInfo;
import cn.reghao.oss.sdk.model.dto.media.ImageInfo;
import cn.reghao.oss.sdk.model.dto.media.VideoInfo;

/**
 * @author reghao
 * @date 2024-07-03 14:40:25
 */
public interface OssService {
    ServerInfo getUploadStore(int channelId) throws Exception;
    Integer getChannelScope(int channelId);
    void setObjectScope(int channelId, String objectId, int scope) throws Exception;
    void deleteByObjectId(int channelId, String objectId) throws Exception;
    void deleteByObjectUrl(String objectUrl) throws Exception;
    ObjectInfo getObjectInfo(int channelId, String objectId) throws Exception;
    String getSignedUrl(int channelId, String objectId) throws Exception;
    VideoInfo getVideoInfo(int channelId, String videoFileId) throws Exception;
    ImageInfo getImageInfo(int channelId, String imageFileId) throws Exception;
    ConvertedImageInfo getWebpInfo(int channelId, String imageFileId) throws Exception;
    AudioInfo getAudioInfo(int channelId, String audioFileId) throws Exception;
}
