Documentation ¶
Index ¶
- func AttributeMapToStruct(am map[string]types.AttributeValue, out interface{}) error
- func GetItem[InputT any, OutputT any](ctx context.Context, client DynamoDBClient, tableName string, rowKey InputT) (OutputT, error)
- func NewClient(ctx context.Context, region string) *dynamodb.Client
- func PutItem[InputT any](ctx context.Context, client DynamoDBClient, tableName string, item InputT, ...) (InputT, error)
- func QueryItemsByIntField[OutputT any](ctx context.Context, client DynamoDBClient, tableName string, fieldName string, ...) ([]OutputT, error)
- func StructToAttributeMap(input interface{}) map[string]types.AttributeValue
- type DynamoDBClient
- type ErrNoMatchingStructFieldForColumns
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeMapToStruct ¶
func AttributeMapToStruct(am map[string]types.AttributeValue, out interface{}) error
func QueryItemsByIntField ¶
func StructToAttributeMap ¶
func StructToAttributeMap(input interface{}) map[string]types.AttributeValue
Types ¶
type DynamoDBClient ¶
type DynamoDBClient interface { GetItem(context.Context, *dynamodb.GetItemInput, ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error) PutItem(context.Context, *dynamodb.PutItemInput, ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error) ListTables(context.Context, *dynamodb.ListTablesInput, ...func(*dynamodb.Options)) (*dynamodb.ListTablesOutput, error) Query(context.Context, *dynamodb.QueryInput, ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error) Scan(context.Context, *dynamodb.ScanInput, ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error) UpdateItem(context.Context, *dynamodb.UpdateItemInput, ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error) }
type ErrNoMatchingStructFieldForColumns ¶
type ErrNoMatchingStructFieldForColumns struct {
ColumnNames []string
}
func (ErrNoMatchingStructFieldForColumns) Error ¶
func (e ErrNoMatchingStructFieldForColumns) Error() string
Click to show internal directories.
Click to hide internal directories.