minio

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 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) Delete

func (s Service) Delete(ctx context.Context, bucket, key string) error

Delete deletes an object from the remote storage.

func (Service) Download

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

func (Service) Exists

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) List

func (s Service) List(ctx context.Context, bucketName, prefix string) ([]string, error)

List enumerates the list of objects in a bucket.

func (Service) MakeBucket

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