Documentation ¶
Index ¶
- Variables
- type Option
- type Options
- type S3
- type Storage
- func (db *Storage[T]) Get(ctx context.Context, key T, opts ...interface{ GetterOpt(T) }) (T, error)
- func (db *Storage[T]) Match(ctx context.Context, key T, opts ...interface{ MatcherOpt(T) }) ([]T, interface{ ... }, error)
- func (db *Storage[T]) MatchKey(ctx context.Context, key dynamo.Thing, opts ...interface{ MatcherOpt(T) }) ([]T, interface{ ... }, error)
- func (db *Storage[T]) Put(ctx context.Context, entity T, opts ...interface{ WriterOpt(T) }) error
- func (db *Storage[T]) Remove(ctx context.Context, key T, opts ...interface{ WriterOpt(T) }) (T, error)
- func (db *Storage[T]) Update(ctx context.Context, entity T, opts ...interface{ WriterOpt(T) }) (T, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Configure CURIE prefixes WithPrefixes = opts.ForType[Options, curie.Prefixes]() // Set DynamoDB client for the client WithService = opts.ForType[Options, S3]() // Set DynamoDB client for the client WithS3 = opts.ForType[Options, S3]() // Configure client's DynamoDB to use provided the aws.Config WithConfig = opts.FMap(optsFromConfig) // Use default aws.Config for all DynamoDB clients WithDefaultS3 = opts.From(optsDefaultS3) )
Functions ¶
This section is empty.
Types ¶
type S3 ¶
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 ¶
type Storage[T dynamo.Thing] struct { Options // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.