drivers

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalStorage

type LocalStorage struct {
	Root   string
	Domain string
	Path   string
	Sign   func(path string) (string, error)
}

func NewLocalStorage

func NewLocalStorage(configMap map[string]string, signs ...func(path string) (string, error)) *LocalStorage

func (*LocalStorage) Delete

func (s *LocalStorage) Delete(ctx context.Context, path string) error

func (*LocalStorage) Exists

func (s *LocalStorage) Exists(ctx context.Context, path string) (bool, error)

func (*LocalStorage) Local added in v2.0.2

func (s *LocalStorage) Local() bool

func (*LocalStorage) PrivateUrl

func (s *LocalStorage) PrivateUrl(ctx context.Context, path string) (string, error)

func (*LocalStorage) PublicUrl

func (s *LocalStorage) PublicUrl(ctx context.Context, path string) (string, error)

func (*LocalStorage) Read

func (s *LocalStorage) Read(ctx context.Context, path string) (string, error)

func (*LocalStorage) ReadStream

func (s *LocalStorage) ReadStream(ctx context.Context, path string) (io.Reader, error)

func (*LocalStorage) SignPostUrl

func (s *LocalStorage) SignPostUrl(ctx context.Context, path string) (url string, params map[string]string, err error)

func (*LocalStorage) SignPutUrl

func (s *LocalStorage) SignPutUrl(ctx context.Context, path string) (string, error)

func (*LocalStorage) Size

func (s *LocalStorage) Size(ctx context.Context, path string) (int64, error)

func (*LocalStorage) Write

func (s *LocalStorage) Write(ctx context.Context, path string, contents string) error

func (*LocalStorage) WriteStream

func (s *LocalStorage) WriteStream(ctx context.Context, path string, stream io.Reader) error

type S3Storage

type S3Storage struct {
	Endpoint  string
	Region    string
	AccessKey string
	SecretKey string
	Domain    string
	Bucket    string
	SSL       bool
	Immutable bool
	// contains filtered or unexported fields
}

func NewS3Storage

func NewS3Storage(configMap map[string]string) (*S3Storage, error)

func (*S3Storage) Delete

func (s *S3Storage) Delete(ctx context.Context, path string) error

func (*S3Storage) Exists

func (s *S3Storage) Exists(ctx context.Context, path string) (bool, error)

func (*S3Storage) Local added in v2.0.2

func (s *S3Storage) Local() bool

func (*S3Storage) PrivateUrl

func (s *S3Storage) PrivateUrl(ctx context.Context, path string) (string, error)

func (*S3Storage) PublicUrl

func (s *S3Storage) PublicUrl(ctx context.Context, path string) (string, error)

func (*S3Storage) Read

func (s *S3Storage) Read(ctx context.Context, path string) (string, error)

func (*S3Storage) ReadStream

func (s *S3Storage) ReadStream(ctx context.Context, path string) (io.Reader, error)

func (*S3Storage) SignPostUrl

func (s *S3Storage) SignPostUrl(ctx context.Context, path string) (url string, params map[string]string, err error)

func (*S3Storage) SignPutUrl

func (s *S3Storage) SignPutUrl(ctx context.Context, path string) (url string, err error)

func (*S3Storage) Size

func (s *S3Storage) Size(ctx context.Context, path string) (int64, error)

func (*S3Storage) Write

func (s *S3Storage) Write(ctx context.Context, path string, contents string) error

func (*S3Storage) WriteStream

func (s *S3Storage) WriteStream(ctx context.Context, path string, stream io.Reader) error

Jump to

Keyboard shortcuts

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