mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-10 11:13:44 +08:00
更新gf版本到v2.2.5
This commit is contained in:
36
server/internal/service/common.go
Normal file
36
server/internal/service/common.go
Normal file
@@ -0,0 +1,36 @@
|
||||
// ================================================================================
|
||||
// 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/input/sysin"
|
||||
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user