Documentation
¶
Index ¶
- func GSIIndexName(n int) string
- func GetExpressionValues(od *opaquedatav1.OpaqueData, names ...string) (map[string]types.AttributeValue, error)
- func GetItem(od *opaquedatav1.OpaqueData) map[string]types.AttributeValue
- func GetItems(od *opaquedatav1.OpaqueData, names ...string) (map[string]types.AttributeValue, error)
- func GetKey(od *opaquedatav1.OpaqueData) map[string]types.AttributeValue
- func GetValue(od *opaquedatav1.OpaqueData) map[string]types.AttributeValue
- type Store
- func (s *Store) Delete(ctx context.Context, pk, sk string) error
- func (s *Store) Get(ctx context.Context, pk, sk string) (*opaquedatav1.OpaqueData, error)
- func (s *Store) Put(ctx context.Context, od *opaquedatav1.OpaqueData) error
- func (s *Store) Query(ctx context.Context, pkAttr, pkValue, skAttr string, ...) ([]*opaquedatav1.OpaqueData, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GSIIndexName ¶
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 ¶
func GetItem(od *opaquedatav1.OpaqueData) map[string]types.AttributeValue
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 ¶
func GetKey(od *opaquedatav1.OpaqueData) map[string]types.AttributeValue
GetKey returns the DynamoDB key attributes for an OpaqueData item.
func GetValue ¶
func GetValue(od *opaquedatav1.OpaqueData) map[string]types.AttributeValue
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) 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)
Click to show internal directories.
Click to hide internal directories.