geekai/api/service/oss/uploader.go

16 lines
343 B
Go
Raw Normal View History

package oss
import "github.com/gin-gonic/gin"
type File struct {
Name string `json:"name"`
Size int64 `json:"size"`
URL string `json:"url"`
Ext string `json:"ext"`
}
type Uploader interface {
PutFile(ctx *gin.Context, name string) (File, error)
2023-09-28 18:09:45 +08:00
PutImg(imageURL string, useProxy bool) (string, error)
Delete(fileURL string) error
}