Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStorageAwsClient ¶
func NewStorageAwsClient(opt *AwsClientOption) (*storageAwsClient, error)
NewStorageAwsClient .
func NewStorageLocalClient ¶
func NewStorageLocalClient(opt *LocalClientOption) (*storageLocalClient, error)
NewStorageLocalClient .
Types ¶
type AwsClientOption ¶
type DeleteObjectInput ¶
type LocalClientOption ¶
type LocalClientOption struct {
Dir string
}
type ProxyInput ¶
type PutObjectInput ¶
type PutObjectInput struct { File *multipart.FileHeader BucketName string FileSize int64 ContentType string }
type PutObjectOutput ¶
type Storage ¶
type Storage interface { PutObject(ctx context.Context, input *PutObjectInput) (out *PutObjectOutput, err error) DeleteObject(ctx context.Context, input *DeleteObjectInput) (err error) // TODO: 文件服务实现 图片裁剪 + office 预览 ServeFile(r *ghttp.Request, input *ProxyInput) }
Storage 存储接口
Click to show internal directories.
Click to hide internal directories.