s3store

package
v1.0.45 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint   string
	Region     string
	ID         string
	Secret     string
	Bucket     string
	TempBucket string
}

type Store

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

func New

func New(c Config) (*Store, error)

func (*Store) Add

func (s *Store) Add(ctx context.Context, b io.Reader, oldChecksum string) (string, error)

the temp bucket should have a suitable expiry configured e.g. with minio client: mc ilm rule add biblio-dev/temp --expire-days 1

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, checksum string) error

func (*Store) DeleteAll

func (s *Store) DeleteAll(ctx context.Context) error

func (*Store) Exists

func (s *Store) Exists(ctx context.Context, checksum string) (bool, error)

func (*Store) Get

func (s *Store) Get(ctx context.Context, checksum string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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