Versions in this module Expand all Collapse all v1 v1.0.2 Oct 19, 2024 Changes in this version + const DirectPath + const UploadTypeMultipart + const UploadTypePresigned + type Controller struct + func New(cache S3Cache, impl s3.Interface) *Controller + func (c *Controller) AccessURL(ctx context.Context, name string, expire time.Duration, ...) (string, error) + func (c *Controller) AuthSign(ctx context.Context, uploadID string, partNumbers []int) (*s3.AuthSignResult, error) + func (c *Controller) CompleteUpload(ctx context.Context, uploadID string, partHashs []string) (*UploadResult, error) + func (c *Controller) DeleteObject(ctx context.Context, name string) error + func (c *Controller) Engine() string + func (c *Controller) FormData(ctx context.Context, name string, size int64, contentType string, ...) (*s3.FormData, error) + func (c *Controller) GetHashObject(ctx context.Context, hash string) (*s3.ObjectInfo, error) + func (c *Controller) HashPath(md5 string) string + func (c *Controller) InitiateUpload(ctx context.Context, hash string, size int64, expire time.Duration, ...) (*InitiateUploadResult, error) + func (c *Controller) IsNotFound(err error) bool + func (c *Controller) NowPath() string + func (c *Controller) PartLimit() *s3.PartLimit + func (c *Controller) PartSize(ctx context.Context, size int64) (int64, error) + func (c *Controller) StatObject(ctx context.Context, name string) (*s3.ObjectInfo, error) + func (c *Controller) UUID() string + type HashAlreadyExistsError struct + Object *s3.ObjectInfo + func (e *HashAlreadyExistsError) Error() string + type InitiateUploadResult struct + PartSize int64 + Sign *s3.AuthSignResult + UploadID string + type S3Cache interface + DelS3Key func(ctx context.Context, engine string, keys ...string) error + GetKey func(ctx context.Context, engine string, key string) (*s3.ObjectInfo, error) + type UploadResult struct + Hash string + Key string + Size int64