Documentation ¶
Index ¶
- Constants
- type BaseOss
- func (s *BaseOss) AddEndpoint(name string, endpoint Endpoint)
- func (s *BaseOss) GetEndpoint(name string) (*Endpoint, error)
- func (s *BaseOss) GetObject(endpoint string, key string) ([]byte, error)
- func (s *BaseOss) Init()
- func (s *BaseOss) ListObjects(endpoint string, prefix string, token string) ([]string, string, error)
- func (s *BaseOss) UploadFromFile(endpoint string, key string, filepath string, opt ...interface{}) error
- type Endpoint
- type IOss
- type IServiceOss
- type IServiceResource
- type ReqBatchDownload
- type Resource
Constants ¶
View Source
const ( ServiceOss = "oss" Qiniu = "qiniu" Huawei = "huawei" S3 = "s3" MINIO = "minio" )
View Source
const (
ServiceResource = "resource"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseOss ¶
func (*BaseOss) AddEndpoint ¶
func (*BaseOss) ListObjects ¶
type IOss ¶
type IOss interface { Init() Upload(endpoint string, key string, data []byte, opt ...interface{}) error UploadFromFile(endpoint string, key string, filepath string, opt ...interface{}) error Delete(endpoint string, key string) error ListObjects(endpoint string, prefix string, token string) ([]string, string, error) GetEndpoint(name string) (*Endpoint, error) AddEndpoint(name string, endpoint Endpoint) GetObject(endpoint string, key string) ([]byte, error) }
type IServiceOss ¶
type IServiceOss interface { Upload(endpoint string, key string, data []byte, opt ...interface{}) error UploadFromFile(endpoint string, key string, filepath string, opt ...interface{}) error Delete(endpoint string, key string) error ListObjects(endpoint string, prefix string, token string) ([]string, string, error) GetObject(endpoint string, key string) ([]byte, error) GetConfig() map[string]Endpoint }
type IServiceResource ¶
type ReqBatchDownload ¶
type Resource ¶
type Resource struct { sptty.SimpleModelBase ObjectID string `gorm:"size:32" json:"-"` Name string `json:"-"` Mime string `json:"mime"` Tag string `gorm:"size:32" json:"tag"` Size uint64 `json:"size"` Data []byte `gorm:"-" json:"-"` NameUrl string `gorm:"-" json:"name"` }
func SerializeResources ¶
Click to show internal directories.
Click to hide internal directories.