s3

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: 8 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 {
	Region    string       `yaml:"region,omitempty"`
	Bucket    string       `yaml:"bucket,omitempty"`
	Endpoint  string       `yaml:"endpoint,omitempty"`
	AccessKey string       `yaml:"access_key,omitempty"`
	SecretKey SecretString `yaml:"secret_key,omitempty"`
}

type S3

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

func New

func New(cfg *Config) *S3

func (*S3) Exists

func (s3 *S3) Exists(ctx context.Context, name string) (bool, error)

func (*S3) Get

func (s3 *S3) Get(ctx context.Context, name string) (io.ReadCloser, error)

func (*S3) IsObjNotFoundErr

func (s3 *S3) IsObjNotFoundErr(err error) bool

func (*S3) Name

func (_ *S3) Name() string

func (*S3) Upload

func (s3 *S3) Upload(ctx context.Context, name string, r io.Reader) error

type SecretString

type SecretString string

func (SecretString) MarshalYAML

func (s SecretString) MarshalYAML() (interface{}, error)

Jump to

Keyboard shortcuts

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