Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.3.0
Option type to configure the connection
func WithAwsConfig ¶ added in v0.3.0
WithSession defines AWS I/O Session to be used in the context
func WithPrefixes ¶ added in v0.3.0
WithPrefixes defines prefixes for CURIEs
type Seq ¶
type Seq[T Thing] interface { SeqLazy[T] SeqConfig[T] // Sequence transformer FMap(func(T, io.ReadCloser) error) error }
Seq is an interface to transform collection of objects
db.Match(...).FMap(func(key Thing, val io.ReadCloser) error { ... })
type SeqConfig ¶
type SeqConfig[T Thing] interface { // Limit sequence size to N elements (pagination) Limit(int64) Seq[T] // Continue limited sequence from the cursor Continue(Thing) Seq[T] // Reverse order of sequence Reverse() Seq[T] }
SeqConfig configures optional sequence behavior
type SeqLazy ¶
type SeqLazy[T Thing] interface { // Head lifts first element of sequence Head() (T, io.ReadCloser, error) // Tail evaluates tail of sequence Tail() bool // Error returns error of stream evaluation Error() error // Cursor is the global position in the sequence Cursor() Thing }
SeqLazy is an interface to iterate through collection of objects at storage
type Stream ¶
type Stream[T Thing] interface { StreamReader[T] StreamWriter[T] }
Stream is a generic key-value trait to access domain objects.
type StreamGetter ¶
type StreamGetter[T Thing] interface { Has(context.Context, T) (bool, error) URL(context.Context, T, time.Duration) (string, error) Get(context.Context, T) (T, io.ReadCloser, error) }
StreamGetter defines read by key notation
type StreamGetterNoContext ¶
type StreamGetterNoContext[T Thing] interface { Has(T) (bool, error) URL(T, time.Duration) (string, error) Get(T) (T, io.ReadCloser, error) }
StreamGetterNoContext defines read by key notation
type StreamNoContext ¶
type StreamNoContext[T Thing] interface { StreamReaderNoContext[T] StreamWriterNoContext[T] }
StreamNoContext is a generic key-value trait to access domain objects.
type StreamPattern ¶
StreamPattern defines simple pattern matching lookup I/O
type StreamPatternNoContext ¶
StreamPatternNoContext defines simple pattern matching lookup I/O
type StreamReader ¶
type StreamReader[T Thing] interface { StreamGetter[T] StreamPattern[T] }
KeyValReader a generic key-value trait to read domain objects
type StreamReaderNoContext ¶
type StreamReaderNoContext[T Thing] interface { StreamGetterNoContext[T] StreamPatternNoContext[T] }
StreamReaderNoContext a generic key-value trait to read domain objects
type StreamWriter ¶
type StreamWriter[T Thing] interface { Put(context.Context, T, io.ReadCloser) error Copy(context.Context, T, T) error Remove(context.Context, T) error }
StreamWriter defines a generic key-value writer
type StreamWriterNoContext ¶
type StreamWriterNoContext[T Thing] interface { Put(T, io.ReadCloser) error Copy(T, T) error Remove(T) error }
StreamWriterNoContext defines a generic key-value writer
type Thing ¶
Thing is the most generic item type used by the library to abstract writable/readable streams into storage services.
The interfaces declares anything that have a unique identifier. The unique identity is exposed by pair of string: HashKey and SortKey.