实现图片上传到oss
This commit is contained in:
32
internal/service/upload.go
Normal file
32
internal/service/upload.go
Normal file
@ -0,0 +1,32 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
IUpload interface {
|
||||
Upload(ctx context.Context, in *model.UploadIn) (res *model.UploadOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localUpload IUpload
|
||||
)
|
||||
|
||||
func Upload() IUpload {
|
||||
if localUpload == nil {
|
||||
panic("implement not found for interface IUpload, forgot register?")
|
||||
}
|
||||
return localUpload
|
||||
}
|
||||
|
||||
func RegisterUpload(i IUpload) {
|
||||
localUpload = i
|
||||
}
|
||||
Reference in New Issue
Block a user