storage

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	AbsolutePath string
	CreatedAt    time.Time
}

type Provider

type Provider interface {
	Validate(ctx context.Context) error
	List(ctx context.Context, prefix string) ([]File, error)
	Remove(ctx context.Context, absolutePath string) error
	Upload(ctx context.Context, finalFilePath string, reader io.ReadSeeker) error
	GetType() string
}

func NewS3Provider

func NewS3Provider(cfg configuration.S3Config) Provider

type S3Provider

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

func (S3Provider) GetType

func (s S3Provider) GetType() string

func (S3Provider) List

func (s S3Provider) List(ctx context.Context, prefix string) ([]File, error)

func (S3Provider) Remove

func (s S3Provider) Remove(ctx context.Context, absolutePath string) error

func (S3Provider) Upload

func (s S3Provider) Upload(ctx context.Context, finalFilePath string, reader io.ReadSeeker) error

func (S3Provider) Validate

func (s S3Provider) Validate(ctx context.Context) error

Jump to

Keyboard shortcuts

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