Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { // 文件id ID int `json:"id"` Bucket string `json:"bucket" validate:"required"` // 文件名 Filename string `json:"filename" validate:"required"` // 类型 ContentType string `json:"contentType" validate:"required"` // 大小 Size int64 `json:"size" validate:"required"` // metadata Metadata http.Header `json:"metadata"` // 创建者 Creator string `json:"creator" validate:"required"` // 数据 Data []byte `json:"data" validate:"required"` }
文件
type FileFilterParams ¶
type FileStorage ¶
type FileStorage interface { Get(ctx context.Context, bucket, filename string) (*File, error) Put(ctx context.Context, file File) error Query(ctx context.Context, params FileFilterParams) ([]*File, error) Count(ctx context.Context, params FileFilterParams) (int64, error) }
func Ent ¶
func Ent() FileStorage
func Minio ¶
func Minio() FileStorage
Click to show internal directories.
Click to hide internal directories.