Documentation
¶
Index ¶
- func Delete(tableName, key string, sortKey ...string) error
- func Get[T any](tableName string, key string, sortKey ...string) (*T, error)
- func GetDynamoClient(region string) (*dynamodb.Client, error)
- func GetInt(tableName, key string) (int, error)
- func GetString(tableName, key string) (string, error)
- func Put(tableName, key string, value any, options ...SetOptions) error
- func Query[T any](tableName string, key string, options ...QueryOptions) ([]T, error)
- type DbOptions
- type DynamoDB
- func (d *DynamoDB) Delete(key string, sortKey ...string) error
- func (d *DynamoDB) Get(key string, options ...GetOptions) (interface{}, error)
- func (d *DynamoDB) Put(key string, value any, options ...SetOptions) error
- func (d *DynamoDB) Query(key string, options ...QueryOptions) ([]interface{}, error)
- func (d *DynamoDB) Update(key string, value any, options ...SetOptions) error
- type GetOptions
- type QueryCondition
- type QueryOptions
- type SetOptions
- type ValueStoreMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamoDB ¶
type DynamoDB struct {
// contains filtered or unexported fields
}
func (*DynamoDB) Get ¶
func (d *DynamoDB) Get(key string, options ...GetOptions) (interface{}, error)
type GetOptions ¶
type QueryCondition ¶
type QueryCondition string
const ( QueryConditionNone QueryCondition = "none" QueryConditionBeginsWith QueryCondition = "beginsWith" QueryConditionEndsWith QueryCondition = "endsWith" QueryConditionContains QueryCondition = "contains" QueryConditionEquals QueryCondition = "equals" QueryConditionNotEquals QueryCondition = "notEquals" QueryConditionGreaterThan QueryCondition = "greaterThan" QueryConditionLessThan QueryCondition = "lessThan" QueryConditionGreaterThanOrEqualTo QueryCondition = "greaterThanOrEqualTo" QueryConditionLessThanOrEqualTo QueryCondition = "lessThanOrEqualTo" )
type QueryOptions ¶
type QueryOptions struct {
Result any
SortKey string
PartitionKeyCondition QueryCondition
SortKeyCondition QueryCondition
Limit int
}
type SetOptions ¶
type ValueStoreMode ¶
type ValueStoreMode string
const ( ValueStoreModeJson ValueStoreMode = "json" ValueStoreModeAttributes ValueStoreMode = "attributes" )
Click to show internal directories.
Click to hide internal directories.