storage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: Apache-2.0 Imports: 6 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 {
	S3   *s3.Config   `yaml:"s3,omitempty"`
	File *file.Config `yaml:"file,omitempty"`
}

type Storage

type Storage interface {
	Name() string
	Upload(ctx context.Context, name string, r io.Reader) error
	Get(ctx context.Context, name string) (io.ReadCloser, error)
	Exists(ctx context.Context, name string) (bool, error)
	IsObjNotFoundErr(err error) bool
}

func New

func New(cfg *Config) (Storage, error)

func WithPrefix

func WithPrefix(storage Storage, prefix string) Storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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