Documentation ¶
Index ¶
- type File
- type IService
- type IUploadService
- type SeaweedFS
- type Service
- func (s *Service) DownloadAndMakeCompose(uploadPath string, downloadURLs []string) (map[string]interface{}, error)
- func (s *Service) DownloadImage(url string, ctx context.Context) (io.ReadCloser, error)
- func (s *Service) DownloadURL(path string, filename string) (string, error)
- func (s *Service) MakeCompose(srcImgFiles []io.ReadCloser) (image.Image, error)
- func (s *Service) UploadFile(filePath string, contentType string, copyFileWriter func(io.Writer) error) (map[string]interface{}, error)
- type ServiceMinio
- type ServiceOSS
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IService ¶
type IService interface { IUploadService DownloadAndMakeCompose(uploadPath string, downloadURLs []string) (map[string]interface{}, error) DownloadImage(url string, ctx context.Context) (io.ReadCloser, error) }
IService IService
type IUploadService ¶
type Service ¶
Service Service
func (*Service) DownloadAndMakeCompose ¶
func (s *Service) DownloadAndMakeCompose(uploadPath string, downloadURLs []string) (map[string]interface{}, error)
DownloadAndMakeCompose 下载并组合图片
func (*Service) DownloadImage ¶
func (*Service) DownloadURL ¶
func (*Service) MakeCompose ¶
MakeCompose 组合图片
type ServiceMinio ¶
ServiceMinio 文件上传
func NewServiceMinio ¶
func NewServiceMinio(ctx *config.Context) *ServiceMinio
NewServiceMinio NewServiceMinio
func (*ServiceMinio) DownloadURL ¶
func (sm *ServiceMinio) DownloadURL(ph string, filename string) (string, error)
func (*ServiceMinio) UploadFile ¶
func (sm *ServiceMinio) UploadFile(filePath string, contentType string, copyFileWriter func(io.Writer) error) (map[string]interface{}, error)
UploadFile 上传文件
type ServiceOSS ¶
func NewServiceOSS ¶
func NewServiceOSS(ctx *config.Context) *ServiceOSS
NewServiceOSS NewServiceOSS
func (*ServiceOSS) DownloadURL ¶
func (s *ServiceOSS) DownloadURL(path string, filename string) (string, error)
func (*ServiceOSS) UploadFile ¶
func (s *ServiceOSS) UploadFile(filePath string, contentType string, copyFileWriter func(io.Writer) error) (map[string]interface{}, error)
UploadFile 上传文件
type Type ¶
type Type string
Type 文件类型
const ( // TypeChat 聊天文件 TypeChat Type = "chat" // TypeMoment 动态文件 TypeMoment Type = "moment" // TypeMomentCover 动态封面 TypeMomentCover Type = "momentcover" // TypeSticker 表情 TypeSticker Type = "sticker" // TypeReport 举报 TypeReport Type = "report" // TypeCommon 通用 TypeCommon Type = "common" // TypeChatBg 聊天背景 TypeChatBg Type = "chatbg" )
Click to show internal directories.
Click to hide internal directories.