s3

package
v3.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: AGPL-3.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	driver.RootPath
	Bucket            string `json:"bucket" required:"true"`
	Endpoint          string `json:"endpoint" required:"true"`
	Region            string `json:"region"`
	AccessKeyID       string `json:"access_key_id" required:"true"`
	SecretAccessKey   string `json:"secret_access_key" required:"true"`
	CustomHost        string `json:"custom_host"`
	SignURLExpire     int    `json:"sign_url_expire" type:"number" default:"4"`
	Placeholder       string `json:"placeholder"`
	ForcePathStyle    bool   `json:"force_path_style"`
	ListObjectVersion string `json:"list_object_version" type:"select" options:"v1,v2" default:"v1"`
	RemoveBucket      bool   `json:"remove_bucket" help:"Remove bucket name from path when using custom host."`
}

type S3

type S3 struct {
	model.Storage
	Addition
	Session *session.Session
	// contains filtered or unexported fields
}

func (*S3) Config

func (d *S3) Config() driver.Config

func (*S3) Copy

func (d *S3) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*S3) Drop

func (d *S3) Drop(ctx context.Context) error

func (*S3) GetAddition

func (d *S3) GetAddition() driver.Additional

func (*S3) Init

func (d *S3) Init(ctx context.Context) error
func (d *S3) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*S3) List

func (d *S3) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*S3) MakeDir

func (d *S3) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*S3) Move

func (d *S3) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*S3) Put

func (d *S3) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*S3) Remove

func (d *S3) Remove(ctx context.Context, obj model.Obj) error

func (*S3) Rename

func (d *S3) Rename(ctx context.Context, srcObj model.Obj, newName string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL