storage

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 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 MicroObject added in v0.2.0

type MicroObject struct {
	LastModified time.Time
	Key          string
}

type S3Storage added in v0.2.0

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

func NewAWSStorage added in v0.2.0

func NewAWSStorage(bucket string) *S3Storage

func (*S3Storage) Connect added in v0.2.0

func (a *S3Storage) Connect() error

func (*S3Storage) GetSignedURL added in v0.2.0

func (a *S3Storage) GetSignedURL(objectName string) (string, error)

func (*S3Storage) HasObject added in v0.2.0

func (a *S3Storage) HasObject(objectName string) bool

func (*S3Storage) ListObjects added in v0.2.0

func (a *S3Storage) ListObjects() []MicroObject

func (*S3Storage) RemoveObject added in v0.2.0

func (a *S3Storage) RemoveObject(objectName string) (bool, error)

func (*S3Storage) Upload added in v0.2.0

func (a *S3Storage) Upload(objectName string, data bytes.Buffer) error

type Storage

type Storage interface {
	Connect() error
	HasObject(objectName string) bool
	Upload(objectName string, data bytes.Buffer) error
	GetSignedURL(objectName string) (string, error)
	ListObjects() []MicroObject
	RemoveObject(objectName string) (bool, error)
}

Jump to

Keyboard shortcuts

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