storage

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalFileDriver added in v1.5.6

type LocalFileDriver struct {
	// contains filtered or unexported fields
}

func NewLocalFileDriver added in v1.5.6

func NewLocalFileDriver(config *types.StorageConfig) *LocalFileDriver

func (*LocalFileDriver) Download added in v1.5.6

func (d *LocalFileDriver) Download(bucket string, key string, dist string) error

func (*LocalFileDriver) Get added in v1.5.6

func (d *LocalFileDriver) Get(bucket string, key string) ([]byte, error)

func (*LocalFileDriver) GetByStream added in v1.5.6

func (d *LocalFileDriver) GetByStream(bucket string, key string) (io.ReadCloser, error)

func (*LocalFileDriver) GetConfig added in v1.5.6

func (d *LocalFileDriver) GetConfig() *types.StorageConfig

func (*LocalFileDriver) List added in v1.6.0

func (d *LocalFileDriver) List(root string, prefix string) (list []string, err error, next func() ([]string, error))

func (*LocalFileDriver) Put added in v1.5.6

func (d *LocalFileDriver) Put(bucket string, key string, data []byte) error

type S3Driver

type S3Driver struct {
	// contains filtered or unexported fields
}

func NewS3Driver

func NewS3Driver(s *s3.Client, config *types.StorageConfig) *S3Driver

func (*S3Driver) Download added in v1.5.0

func (d *S3Driver) Download(bucket string, key string, dist string) error

func (*S3Driver) Get

func (d *S3Driver) Get(bucket string, key string) ([]byte, error)

func (*S3Driver) GetByStream added in v1.5.3

func (d *S3Driver) GetByStream(bucket string, key string) (io.ReadCloser, error)

func (*S3Driver) GetConfig added in v1.1.0

func (d *S3Driver) GetConfig() *types.StorageConfig

func (*S3Driver) List added in v1.6.0

func (d *S3Driver) List(bucket string, prefix string) (list []string, err error, next func() ([]string, error))

func (*S3Driver) Put

func (d *S3Driver) Put(bucket string, key string, data []byte) error

Jump to

Keyboard shortcuts

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