dynamo

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GSIIndexName

func GSIIndexName(n int) string

GSIIndexName returns the DynamoDB index name for the given GSI number (1-20).

func GetExpressionValues

func GetExpressionValues(od *opaquedatav1.OpaqueData, names ...string) (map[string]types.AttributeValue, error)

GetExpressionValues returns DynamoDB expression attribute values (colon-prefixed).

func GetItem

GetItem returns the full DynamoDB item for an OpaqueData record.

func GetItems

func GetItems(od *opaquedatav1.OpaqueData, names ...string) (map[string]types.AttributeValue, error)

GetItems returns a subset of the DynamoDB item attributes by name.

func GetKey

GetKey returns the DynamoDB key attributes for an OpaqueData item.

func GetValue

GetValue returns all DynamoDB item attributes except pk and sk.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store implements opaquedata.OpaqueStore backed by DynamoDB.

func New

func New(client dynamoclient.Client, tableName string) *Store

New creates a new DynamoDB-backed OpaqueStore.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, pk, sk string) error

func (*Store) Get

func (s *Store) Get(ctx context.Context, pk, sk string) (*opaquedatav1.OpaqueData, error)

func (*Store) Put

func (s *Store) Put(ctx context.Context, od *opaquedatav1.OpaqueData) error

func (*Store) Query

func (s *Store) Query(ctx context.Context, pkAttr, pkValue, skAttr string, sort *opaquedata.SortCondition, opts ...opaquedata.QueryOption) ([]*opaquedatav1.OpaqueData, error)

Jump to

Keyboard shortcuts

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