objstorage

package
v0.0.0-...-8a64288 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewStorage

func NewStorage(ctx context.Context, credentialsOption option.ClientOption, bucket string, predefinedAcl string, opts ...option.ClientOption) (*Storage, error)

func (*Storage) Check

func (g *Storage) Check(ctx context.Context, name string) (bool, error)

func (*Storage) Copy

func (g *Storage) Copy(ctx context.Context, source string, destination string) error

func (*Storage) CopyWithRetries

func (g *Storage) CopyWithRetries(ctx context.Context, source string, destination string, retryCount int, waitDuration time.Duration) error

func (*Storage) Delete

func (g *Storage) Delete(ctx context.Context, bucket string, name string) error

func (*Storage) Download

func (g *Storage) Download(ctx context.Context, name string) (data []byte, err error)

func (*Storage) GetWriter

func (g *Storage) GetWriter(ctx context.Context, name, contentType string) io.WriteCloser

func (*Storage) Upload

func (g *Storage) Upload(ctx context.Context, name string, data []byte) (err error)

func (*Storage) UploadWithRetries

func (g *Storage) UploadWithRetries(ctx context.Context, name string, data []byte, retryCount int, waitDuration time.Duration) error

Jump to

Keyboard shortcuts

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