s3

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3 added in v2.2.0

type S3 interface {
	GetObject(context.Context, *s3.GetObjectInput, ...func(*s3.Options)) (*s3.GetObjectOutput, error)
	PutObject(context.Context, *s3.PutObjectInput, ...func(*s3.Options)) (*s3.PutObjectOutput, error)
	DeleteObject(context.Context, *s3.DeleteObjectInput, ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
	ListObjectsV2(context.Context, *s3.ListObjectsV2Input, ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
}

S3 declares AWS API used by the library

type Storage added in v2.2.0

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

func Must

func Must[T dynamo.Thing](keyval *Storage[T], err error) *Storage[T]

Must constraint for api factory

func New

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

New creates instance of S3 api

func (*Storage[T]) Get added in v2.2.0

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

Get item from storage

func (*Storage[T]) Match added in v2.2.0

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

func (*Storage[T]) MatchKey added in v2.5.2

func (db *Storage[T]) MatchKey(ctx context.Context, key dynamo.Thing, opts ...dynamo.MatchOpt) ([]T, dynamo.MatchOpt, error)

func (*Storage[T]) Put added in v2.2.0

func (db *Storage[T]) Put(ctx context.Context, entity T, opts ...interface{ ConditionExpression(T) }) error

Put writes entity

func (*Storage[T]) Remove added in v2.2.0

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

Remove discards the entity from the table

func (*Storage[T]) Update added in v2.2.0

func (db *Storage[T]) Update(ctx context.Context, entity T, opts ...interface{ ConditionExpression(T) }) (T, error)

Update applies a partial patch to entity and returns new values

Jump to

Keyboard shortcuts

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