local

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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(root string) (Service, error)

New generates new object storage service.

func (Service) Delete added in v0.5.0

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

Delete deletes an object from the local file system.

func (Service) Download

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

Download downloads an object from the local file system.

func (Service) Exists added in v0.3.0

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

Exists checks whether a file exists in disk.

func (Service) GeneratePresignedURL added in v0.5.0

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

GeneratePresignedURL is left here only to satisfy the interface. Pre-signed URLs don't make sense for the local storage.

func (Service) MakeBucket

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

MakeBucket creates a new folder in the local file system that acts like a bucket or a container in a object storage.

func (Service) Upload

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

Upload upload an object to s3.

Jump to

Keyboard shortcuts

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