mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-01-31 00:38:37 +08:00
40 lines
1.4 KiB
Go
40 lines
1.4 KiB
Go
// ================================================================================
|
|
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
|
// You can delete these comments if you wish manually maintain this interface file.
|
|
// ================================================================================
|
|
|
|
package service
|
|
|
|
import (
|
|
"context"
|
|
"hotgo/internal/model"
|
|
"hotgo/internal/model/input/sysin"
|
|
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
)
|
|
|
|
type (
|
|
ICommonUpload interface {
|
|
UploadFile(ctx context.Context, file *ghttp.UploadFile) (result *sysin.AttachmentListModel, err error)
|
|
UploadImage(ctx context.Context, file *ghttp.UploadFile) (result *sysin.AttachmentListModel, err error)
|
|
UploadLocal(ctx context.Context, conf *model.UploadConfig, file *ghttp.UploadFile, meta *sysin.UploadFileMeta) (result *sysin.AttachmentListModel, err error)
|
|
UploadUCloud(ctx context.Context, conf *model.UploadConfig, file *ghttp.UploadFile, meta *sysin.UploadFileMeta) (result *sysin.AttachmentListModel, err error)
|
|
LastUrl(ctx context.Context, conf *model.UploadConfig, fullPath, drive string) string
|
|
}
|
|
)
|
|
|
|
var (
|
|
localCommonUpload ICommonUpload
|
|
)
|
|
|
|
func CommonUpload() ICommonUpload {
|
|
if localCommonUpload == nil {
|
|
panic("implement not found for interface ICommonUpload, forgot register?")
|
|
}
|
|
return localCommonUpload
|
|
}
|
|
|
|
func RegisterCommonUpload(i ICommonUpload) {
|
|
localCommonUpload = i
|
|
}
|