s3

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object[T stream.Thing] struct {
	// contains filtered or unexported fields
}

func (Object[T]) CopyTo

func (obj Object[T]) CopyTo(ctx context.Context, target T) (Object[T], error)

func (Object[T]) Wait

func (obj Object[T]) Wait(ctx context.Context, timeout time.Duration) error

type Storage

type Storage[T stream.Thing] struct {
	// contains filtered or unexported fields
}

func New

func New[T stream.Thing](connector string, opts ...stream.Option) (*Storage[T], error)

func (*Storage[T]) Get

func (db *Storage[T]) Get(ctx context.Context, key T) (T, io.ReadCloser, error)

Get item from storage

func (*Storage[T]) Has

func (db *Storage[T]) Has(ctx context.Context, key T) (T, error)

Has

func (*Storage[T]) Match

func (db *Storage[T]) Match(ctx context.Context, key T, opts ...interface{ MatchOpt() }) ([]T, error)

Match

func (*Storage[T]) Put

func (db *Storage[T]) Put(ctx context.Context, entity T, val io.Reader) error

Put

func (*Storage[T]) Remove

func (db *Storage[T]) Remove(ctx context.Context, key T) error

Remove

func (*Storage[T]) With

func (db *Storage[T]) With(entity T) Object[T]

With

Jump to

Keyboard shortcuts

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