s3

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 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(target T) Object[T]

func (Object[T]) Wait

func (obj Object[T]) Wait(timeout time.Duration) error

type Seq

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

func (*Seq[T]) FMap

func (seq *Seq[T]) FMap(f func(T, io.ReadCloser) error) error

func (*Seq[T]) Head

func (seq *Seq[T]) Head() (T, io.ReadCloser, error)

type Storage

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

func New

func New[T stream.Thing](bucket 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) *Seq[T]

Match

func (*Storage[T]) Put

func (db *Storage[T]) Put(ctx context.Context, entity T, val io.ReadCloser) 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