bucket

package
v0.0.0-...-bc034c2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsConfig

type AwsConfig struct {
	Config         *aws.Config
	BucketDownload string
	BucketUpload   string
}

type Bucket

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

func New

func New(bt StorageBucketType, cfg any) (b *Bucket, err error)

func (*Bucket) Delete

func (b *Bucket) Delete(key string) error

func (*Bucket) Download

func (b *Bucket) Download(src, dst string) error

func (*Bucket) Upload

func (b *Bucket) Upload(file io.Reader, key string) error

type MockBucket

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

func (*MockBucket) Delete

func (mb *MockBucket) Delete(key string) error

func (*MockBucket) Download

func (mb *MockBucket) Download(src, dst string) error

func (*MockBucket) Upload

func (mb *MockBucket) Upload(file io.Reader, key string) error

type StorageBucketInterface

type StorageBucketInterface interface {
	Upload(io.Reader, string) error
	Download(string, string) error
	Delete(string) error
}

type StorageBucketType

type StorageBucketType int
const (
	AwsProvider StorageBucketType = iota
	MockProvider
)

Jump to

Keyboard shortcuts

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