Documentation ¶
Index ¶
- type Driver
- func (handler Driver) CancelToken(ctx context.Context, uploadSession *serializer.UploadSession) error
- func (handler Driver) Delete(ctx context.Context, files []string) ([]string, error)
- func (handler Driver) Get(ctx context.Context, path string) (response.RSCloser, error)
- func (handler Driver) List(ctx context.Context, base string, recursive bool) ([]response.Object, error)
- func (handler Driver) Put(ctx context.Context, file fsctx.FileHeader) error
- func (handler Driver) Sign(ctx context.Context, elements []string) string
- func (handler Driver) Source(ctx context.Context, path string, ttl int64, isDownload bool, speed int) (string, error)
- func (handler Driver) Thumb(ctx context.Context, file *model.File) (*response.ContentResponse, error)
- func (handler Driver) Token(ctx context.Context, ttl int64, uploadSession *serializer.UploadSession, ...) (*serializer.UploadCredential, error)
- type UploadPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
Driver 又拍云策略适配器
func (Driver) CancelToken ¶
func (handler Driver) CancelToken(ctx context.Context, uploadSession *serializer.UploadSession) error
取消上传凭证
func (Driver) Source ¶
func (handler Driver) Source(ctx context.Context, path string, ttl int64, isDownload bool, speed int) (string, error)
Source 获取外链URL
func (Driver) Thumb ¶
func (handler Driver) Thumb(ctx context.Context, file *model.File) (*response.ContentResponse, error)
Thumb 获取文件缩略图
func (Driver) Token ¶
func (handler Driver) Token(ctx context.Context, ttl int64, uploadSession *serializer.UploadSession, file fsctx.FileHeader) (*serializer.UploadCredential, error)
Token 获取上传策略和认证Token
type UploadPolicy ¶
type UploadPolicy struct { Bucket string `json:"bucket"` SaveKey string `json:"save-key"` Expiration int64 `json:"expiration"` CallbackURL string `json:"notify-url"` ContentLength uint64 `json:"content-length"` ContentLengthRange string `json:"content-length-range,omitempty"` AllowFileType string `json:"allow-file-type,omitempty"` }
UploadPolicy 又拍云上传策略
Click to show internal directories.
Click to hide internal directories.