package cn.reghao.file.api.iface;

import cn.reghao.tnb.oss.api.dto.ObjectInfo;
import cn.reghao.tnb.oss.api.dto.ServerInfo;
import cn.reghao.tnb.oss.api.dto.media.AudioInfo;
import cn.reghao.tnb.oss.api.dto.media.ConvertedImageInfo;
import cn.reghao.tnb.oss.api.dto.media.ImageInfo;
import cn.reghao.tnb.oss.api.dto.media.VideoInfo;

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