2022-12-11 20:48:18 +08:00
|
|
|
// ================================================================================
|
2022-11-24 23:37:34 +08:00
|
|
|
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
2022-12-11 20:48:18 +08:00
|
|
|
// You can delete these comments if you wish manually maintain this interface file.
|
|
|
|
// ================================================================================
|
2022-11-24 23:37:34 +08:00
|
|
|
|
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"hotgo/internal/model/input/sysin"
|
|
|
|
|
|
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
|
|
)
|
|
|
|
|
2022-12-11 20:48:18 +08:00
|
|
|
type (
|
|
|
|
ICommonUpload interface {
|
|
|
|
UploadImage(ctx context.Context, file *ghttp.UploadFile) (result *sysin.AttachmentListModel, err error)
|
|
|
|
UploadLocal(ctx context.Context, file *ghttp.UploadFile, meta *sysin.UploadFileMeta) (result *sysin.AttachmentListModel, err error)
|
|
|
|
LastUrl(ctx context.Context, fullPath, drive string) string
|
|
|
|
}
|
|
|
|
)
|
2022-11-24 23:37:34 +08:00
|
|
|
|
2022-12-11 20:48:18 +08:00
|
|
|
var (
|
|
|
|
localCommonUpload ICommonUpload
|
|
|
|
)
|
2022-11-24 23:37:34 +08:00
|
|
|
|
|
|
|
func CommonUpload() ICommonUpload {
|
|
|
|
if localCommonUpload == nil {
|
|
|
|
panic("implement not found for interface ICommonUpload, forgot register?")
|
|
|
|
}
|
|
|
|
return localCommonUpload
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterCommonUpload(i ICommonUpload) {
|
|
|
|
localCommonUpload = i
|
|
|
|
}
|