objstr

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, os *ObjectStore) context.Context

Types

type Config

type Config struct {
	CopyBufferSize int
	DefaultBackend string
	BackendConfig
	Backends map[string]BackendConfig
}

func (*Config) WithBackend

func (c *Config) WithBackend(scheme string, backendConf BackendConfig) *Config

func (*Config) WithCopyBufferSize

func (c *Config) WithCopyBufferSize(size int) *Config

type ObjectStore

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

func FromContext

func FromContext(ctx context.Context) *ObjectStore

func FromContextOrDefault

func FromContextOrDefault(ctx context.Context) *ObjectStore

func GetDefault

func GetDefault() *ObjectStore

func MustNewObjectStore

func MustNewObjectStore(ctx context.Context, conf Config) *ObjectStore

func NewObjectStore

func NewObjectStore(ctx context.Context, conf Config) (*ObjectStore, error)

func (*ObjectStore) Close

func (os *ObjectStore) Close() error

func (*ObjectStore) Copy

func (os *ObjectStore) Copy(ctx context.Context, src *url.URL, dst *url.URL) error

func (*ObjectStore) Delete

func (os *ObjectStore) Delete(ctx context.Context, u *url.URL) error

func (*ObjectStore) ListPrefix

func (os *ObjectStore) ListPrefix(ctx context.Context, u *url.URL, optsFunc ...types.ListOption) ([]*types.Object, error)

func (*ObjectStore) Move

func (os *ObjectStore) Move(ctx context.Context, src *url.URL, dst *url.URL) error

func (*ObjectStore) ReadMetadata

func (os *ObjectStore) ReadMetadata(ctx context.Context, u *url.URL) (*types.ObjectMetadata, error)

func (*ObjectStore) Reader

func (os *ObjectStore) Reader(ctx context.Context, u *url.URL) (types.Reader, error)

func (*ObjectStore) ReaderAt

func (os *ObjectStore) ReaderAt(ctx context.Context, u *url.URL) (types.ReaderAt, error)

func (*ObjectStore) Writer

func (os *ObjectStore) Writer(ctx context.Context, u *url.URL) (types.Writer, error)

Jump to

Keyboard shortcuts

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