s3

package
v0.0.0-...-f856fe1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opt *Option) (driver.FS, error)

Types

type Option

type Option struct {
	base.Option
	Endpoint       string `json:"endpoint"     validate:"required"`
	Bucket         string `json:"bucket"       validate:"required"`
	Region         string `json:"region"`
	AccessKey      string `json:"access_key"`
	SecretKey      string `json:"secret_key"   validate:"required_with=AccessKey"`
	SessionToken   string `json:"session_token"`
	ListVersion    string `json:"list_version" validate:"omitempty,oneof=v1 v2"`
	ForcePathStyle bool   `json:"force_path_style"`
}

func (*Option) NewFS

func (opt *Option) NewFS() (driver.FS, error)

type S3

type S3 struct {
	driver.Base
	// contains filtered or unexported fields
}

func (*S3) Copy

func (d *S3) Copy(ctx context.Context, src, dst string) error

func (*S3) Create

func (d *S3) Create(path string) (driver.FileWriter, error)

func (*S3) Get

func (d *S3) Get(ctx context.Context, path string) (driver.File, error)

func (*S3) List

func (d *S3) List(ctx context.Context, path string, metas ...driver.Meta) ([]driver.File, error)

func (*S3) MakeDir

func (d *S3) MakeDir(ctx context.Context, path string) error

func (*S3) Move

func (d *S3) Move(ctx context.Context, src, dst string) error

func (*S3) Open

func (d *S3) Open(path string) (driver.FileReader, error)

func (*S3) Remove

func (d *S3) Remove(ctx context.Context, path string) error

func (*S3) Rename

func (d *S3) Rename(ctx context.Context, path, newName string) error

Jump to

Keyboard shortcuts

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