Documentation ¶
Index ¶
- Variables
- func NewDriver(master cluster.Node, handler driver.Handler, policy *model.Policy) driver.Handler
- type Driver
- func (handler Driver) CancelToken(ctx context.Context, uploadSession *serializer.UploadSession) error
- func (d *Driver) Delete(ctx context.Context, files []string) ([]string, error)
- func (d *Driver) Get(ctx context.Context, path string) (response.RSCloser, error)
- func (d *Driver) List(ctx context.Context, path string, recursive bool) ([]response.Object, error)
- func (d *Driver) Put(ctx context.Context, file fsctx.FileHeader) error
- func (d *Driver) Source(ctx context.Context, path string, url url.URL, ttl int64, isDownload bool, ...) (string, error)
- func (d *Driver) Thumb(ctx context.Context, path string) (*response.ContentResponse, error)
- func (d *Driver) Token(ctx context.Context, ttl int64, uploadSession *serializer.UploadSession, ...) (*serializer.UploadCredential, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotImplemented = errors.New("this method of shadowed policy is not implemented")
)
Functions ¶
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver 影子存储策略,用于在从机端上传文件
func (Driver) CancelToken ¶
func (handler Driver) CancelToken(ctx context.Context, uploadSession *serializer.UploadSession) error
取消上传凭证
func (*Driver) Token ¶
func (d *Driver) Token(ctx context.Context, ttl int64, uploadSession *serializer.UploadSession, file fsctx.FileHeader) (*serializer.UploadCredential, error)
Click to show internal directories.
Click to hide internal directories.