minio

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoSuchKey is raised when the object is not found.
	ErrNoSuchKey = "The specified key does not exist."
)

Functions

This section is empty.

Types

type Service

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

Service provides abstraction to cloud object storage.

func New

func New(endpoint, accessKey, secretKey string) (Service, error)

func (Service) Download

func (s Service) Download(ctx context.Context, bucket, key string,
	file io.Writer) error

func (Service) Exists added in v0.4.0

func (s Service) Exists(ctx context.Context, bucketName,
	key string) (bool, error)

Exists checks whether an object exists already in the object storage.

func (Service) MakeBucket added in v0.4.0

func (s Service) MakeBucket(ctx context.Context, bucketName,
	location string) error

MakeBucket creates a new bucket with bucketName with a context to control cancellations and timeouts.

func (Service) Upload

func (s Service) Upload(ctx context.Context, bucket, key string,
	file io.Reader) error

Upload uploads an object to s3.

Jump to

Keyboard shortcuts

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