minio

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 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 Option

type Option func(*Store)

func WithLogger

func WithLogger(logger *zap.Logger) Option

type Store

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

func NewStore

func NewStore(endpoint, bucket, accessKeyFile, secretKeyFile string, opts ...Option) (*Store, error)

NewStore generates a minio client with the given params

func (*Store) Close

func (s *Store) Close() error

func (*Store) EnsureBucket

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

EnsureBucket makes the bucket if not exists.

func (*Store) GetObject

func (s *Store) GetObject(ctx context.Context, path string) (object filestore.Object, err error)

func (*Store) ListObjects

func (s *Store) ListObjects(ctx context.Context, prefix string) ([]filestore.Object, error)

func (*Store) NewReader

func (s *Store) NewReader(ctx context.Context, path string) (rc io.ReadCloser, err error)

func (*Store) PutObject

func (s *Store) PutObject(ctx context.Context, path string, content []byte) error

Jump to

Keyboard shortcuts

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