Documentation ¶
Index ¶
- Constants
- Variables
- func AddStringToSet(attributes map[string]*dynamodb.AttributeValue, k, v string) ([]string, bool)
- func Time(t time.Time) *dynamodb.AttributeValue
- func ToDynamoDBType(t reflect.Type) (string, error)
- func ToIndexName(key []*dynamodb.KeySchemaElement) string
- func ToTableName(s string) string
- type BaseModel
- func (b *BaseModel) FindWhere(key string, value interface{}) (interface{}, error)
- func (b *BaseModel) FindWhere2(key, orderKey string, value interface{}) (interface{}, error)
- func (b *BaseModel) Get(id interface{}, secondary ...interface{}) (interface{}, error)
- func (b *BaseModel) GetIndexes() ([]*dynamodb.GlobalSecondaryIndexDescription, error)
- func (b *BaseModel) Insert(v interface{}) error
- func (b *BaseModel) Put(v interface{}) error
- func (b *BaseModel) Update(key map[string]*dynamodb.AttributeValue, updator string, ...) (int64, error)
- func (b *BaseModel) UpdateKv(id interface{}, k string, v interface{}) (int64, error)
- func (b *BaseModel) UpdateWhere(input *dynamodb.UpdateItemInput) (int64, *dynamodb.UpdateItemOutput, error)
Constants ¶
View Source
const ( TAG = "dynamodbav" TAG_INDEX = "index" TAG_SECONDARY = "secondary" TAG_SECONDARY_FOR = "secondaryfor" )
Variables ¶
View Source
var ( ErrItemNotFound = errors.New("Item not found") ErrConditionalCheckFail = errors.New("ConditionalCheckFailedException: The conditional request failed") )
Functions ¶
func AddStringToSet ¶ added in v1.0.16
func ToIndexName ¶
func ToIndexName(key []*dynamodb.KeySchemaElement) string
func ToTableName ¶ added in v1.0.8
Types ¶
type BaseModel ¶
type BaseModel struct { TableName string Type reflect.Type Client *dynamodb.DynamoDB // contains filtered or unexported fields }
func MustCreateBaseModel ¶ added in v1.1.1
func NewBaseModel ¶
func (*BaseModel) FindWhere2 ¶ added in v1.1.1
func (*BaseModel) GetIndexes ¶
func (b *BaseModel) GetIndexes() ([]*dynamodb.GlobalSecondaryIndexDescription, error)
func (*BaseModel) Update ¶ added in v1.0.11
func (b *BaseModel) Update(key map[string]*dynamodb.AttributeValue, updator string, args map[string]*dynamodb.AttributeValue) (int64, error)
func (*BaseModel) UpdateWhere ¶ added in v1.0.14
func (b *BaseModel) UpdateWhere(input *dynamodb.UpdateItemInput) (int64, *dynamodb.UpdateItemOutput, error)
Click to show internal directories.
Click to hide internal directories.