Versions in this module Expand all Collapse all v1 v1.0.0 Mar 31, 2018 Changes in this version + const ActiveStatus + const BeginsWith + const Between + const BinaryType + const CreatingStatus + const DeletingStatus + const Equal + const Greater + const GreaterOrEqual + const Less + const LessOrEqual + const NoneType + const NotEqual + const NumberType + const StringType + const UpdatingStatus + var ErrNotFound = errors.New("dynamo: no item found") + var ErrTooMany = errors.New("dynamo: too many items") + var RetryTimeout = 1 * time.Minute + func Marshal(v interface{}) (*dynamodb.AttributeValue, error) + func MarshalItem(v interface{}) (map[string]*dynamodb.AttributeValue, error) + func Unmarshal(av *dynamodb.AttributeValue, out interface{}) error + func UnmarshalItem(item map[string]*dynamodb.AttributeValue, out interface{}) error + type Batch struct + func (b Batch) Get(keys ...Keyed) *BatchGet + func (b Batch) Write() *BatchWrite + type BatchGet struct + func (bg *BatchGet) All(out interface{}) error + func (bg *BatchGet) And(keys ...Keyed) *BatchGet + func (bg *BatchGet) Consistent(on bool) *BatchGet + func (bg *BatchGet) ConsumedCapacity(cc *ConsumedCapacity) *BatchGet + func (bg *BatchGet) Iter() Iter + type BatchWrite struct + func (bw *BatchWrite) ConsumedCapacity(cc *ConsumedCapacity) *BatchWrite + func (bw *BatchWrite) Delete(keys ...Keyed) *BatchWrite + func (bw *BatchWrite) Put(items ...interface{}) *BatchWrite + func (bw *BatchWrite) Run() (wrote int, err error) + func (bw *BatchWrite) RunWithContext(ctx aws.Context) (wrote int, err error) + type Coder interface + func AWSEncoding(v interface{}) Coder + type ConsumedCapacity struct + GSI map[string]float64 + LSI map[string]float64 + Table float64 + TableName string + Total float64 + type CreateTable struct + func (ct *CreateTable) Index(index Index) *CreateTable + func (ct *CreateTable) Project(index string, projection IndexProjection, includeAttribs ...string) *CreateTable + func (ct *CreateTable) Provision(readUnits, writeUnits int64) *CreateTable + func (ct *CreateTable) ProvisionIndex(index string, readUnits, writeUnits int64) *CreateTable + func (ct *CreateTable) Run() error + func (ct *CreateTable) RunWithContext(ctx aws.Context) error + func (ct *CreateTable) Stream(view StreamView) *CreateTable + type DB struct + func New(p client.ConfigProvider, cfgs ...*aws.Config) *DB + func NewFromIface(client dynamodbiface.DynamoDBAPI) *DB + func (db *DB) Client() dynamodbiface.DynamoDBAPI + func (db *DB) CreateTable(name string, from interface{}) *CreateTable + func (db *DB) ListTables() *ListTables + func (db *DB) Table(name string) Table + type Delete struct + func (d *Delete) ConsumedCapacity(cc *ConsumedCapacity) *Delete + func (d *Delete) If(expr string, args ...interface{}) *Delete + func (d *Delete) OldValue(out interface{}) error + func (d *Delete) OldValueWithContext(ctx aws.Context, out interface{}) error + func (d *Delete) Range(name string, value interface{}) *Delete + func (d *Delete) Run() error + func (d *Delete) RunWithContext(ctx aws.Context) error + type DeleteTable struct + func (dt *DeleteTable) Run() error + func (dt *DeleteTable) RunWithContext(ctx aws.Context) error + type DescribeTable struct + func (dt *DescribeTable) Run() (Description, error) + func (dt *DescribeTable) RunWithContext(ctx aws.Context) (Description, error) + type Description struct + ARN string + Created time.Time + GSI []Index + HashKey string + HashKeyType KeyType + Items int64 + LSI []Index + LatestStreamARN string + LatestStreamLabel string + Name string + RangeKey string + RangeKeyType KeyType + Size int64 + Status Status + StreamEnabled bool + StreamView StreamView + Throughput Throughput + func (d Description) Active() bool + type Index struct + ARN string + Backfilling bool + HashKey string + HashKeyType KeyType + Items int64 + Local bool + Name string + ProjectionAttribs []string + ProjectionType IndexProjection + RangeKey string + RangeKeyType KeyType + Size int64 + Status Status + Throughput Throughput + type IndexProjection string + var AllProjection IndexProjection = dynamodb.ProjectionTypeAll + var IncludeProjection IndexProjection = dynamodb.ProjectionTypeInclude + var KeysOnlyProjection IndexProjection = dynamodb.ProjectionTypeKeysOnly + type Iter interface + Err func() error + Next func(out interface{}) bool + NextWithContext func(ctx aws.Context, out interface{}) bool + type KeyType string + type Keyed interface + HashKey func() interface{} + RangeKey func() interface{} + type Keys [2]interface + func (k Keys) HashKey() interface{} + func (k Keys) RangeKey() interface{} + type ListTables struct + func (lt *ListTables) All() ([]string, error) + func (lt *ListTables) AllWithContext(ctx aws.Context) ([]string, error) + func (lt *ListTables) Iter() Iter + type Marshaler interface + MarshalDynamo func() (*dynamodb.AttributeValue, error) + type Operator string + type Order bool + const Ascending + const Descending + type PagingIter interface + LastEvaluatedKey func() PagingKey + type PagingKey map[string]*dynamodb.AttributeValue + type Put struct + func (p *Put) ConsumedCapacity(cc *ConsumedCapacity) *Put + func (p *Put) If(expr string, args ...interface{}) *Put + func (p *Put) OldValue(out interface{}) error + func (p *Put) OldValueWithContext(ctx aws.Context, out interface{}) error + func (p *Put) Run() error + func (p *Put) RunWithContext(ctx aws.Context) error + type Query struct + func (q *Query) All(out interface{}) error + func (q *Query) AllWithContext(ctx aws.Context, out interface{}) error + func (q *Query) AllWithLastEvaluatedKey(out interface{}) (PagingKey, error) + func (q *Query) AllWithLastEvaluatedKeyContext(ctx aws.Context, out interface{}) (PagingKey, error) + func (q *Query) Consistent(on bool) *Query + func (q *Query) ConsumedCapacity(cc *ConsumedCapacity) *Query + func (q *Query) Count() (int64, error) + func (q *Query) CountWithContext(ctx aws.Context) (int64, error) + func (q *Query) Filter(expr string, args ...interface{}) *Query + func (q *Query) Index(name string) *Query + func (q *Query) Iter() PagingIter + func (q *Query) Limit(limit int64) *Query + func (q *Query) One(out interface{}) error + func (q *Query) OneWithContext(ctx aws.Context, out interface{}) error + func (q *Query) Order(order Order) *Query + func (q *Query) Project(paths ...string) *Query + func (q *Query) ProjectExpr(expr string, args ...interface{}) *Query + func (q *Query) Range(name string, op Operator, values ...interface{}) *Query + func (q *Query) SearchLimit(limit int64) *Query + func (q *Query) StartFrom(key PagingKey) *Query + type Scan struct + func (s *Scan) All(out interface{}) error + func (s *Scan) AllWithContext(ctx aws.Context, out interface{}) error + func (s *Scan) AllWithLastEvaluatedKey(out interface{}) (PagingKey, error) + func (s *Scan) AllWithLastEvaluatedKeyContext(ctx aws.Context, out interface{}) (PagingKey, error) + func (s *Scan) Consistent(on bool) *Scan + func (s *Scan) ConsumedCapacity(cc *ConsumedCapacity) *Scan + func (s *Scan) Filter(expr string, args ...interface{}) *Scan + func (s *Scan) Index(name string) *Scan + func (s *Scan) Iter() PagingIter + func (s *Scan) Limit(limit int64) *Scan + func (s *Scan) Project(paths ...string) *Scan + func (s *Scan) SearchLimit(limit int64) *Scan + func (s *Scan) StartFrom(key PagingKey) *Scan + type Status string + type StreamView string + var KeysOnlyView StreamView = dynamodb.StreamViewTypeKeysOnly + var NewAndOldImagesView StreamView = dynamodb.StreamViewTypeNewAndOldImages + var NewImageView StreamView = dynamodb.StreamViewTypeNewImage + var OldImageView StreamView = dynamodb.StreamViewTypeOldImage + type Table struct + func (table Table) Batch(hashAndRangeKeyName ...string) Batch + func (table Table) Delete(name string, value interface{}) *Delete + func (table Table) DeleteTable() *DeleteTable + func (table Table) Describe() *DescribeTable + func (table Table) Get(name string, value interface{}) *Query + func (table Table) Name() string + func (table Table) Put(item interface{}) *Put + func (table Table) Scan() *Scan + func (table Table) Update(hashKey string, value interface{}) *Update + func (table Table) UpdateTable() *UpdateTable + type Throughput struct + DecsToday int64 + LastDec time.Time + LastInc time.Time + Read int64 + Write int64 + type Unmarshaler interface + UnmarshalDynamo func(av *dynamodb.AttributeValue) error + type Update struct + func (u *Update) Add(path string, value interface{}) *Update + func (u *Update) AddFloatsToSet(path string, values ...float64) *Update + func (u *Update) AddIntsToSet(path string, values ...int) *Update + func (u *Update) AddStringsToSet(path string, values ...string) *Update + func (u *Update) Append(path string, value interface{}) *Update + func (u *Update) ConsumedCapacity(cc *ConsumedCapacity) *Update + func (u *Update) DeleteFloatsFromSet(path string, values ...float64) *Update + func (u *Update) DeleteIntsFromSet(path string, values ...int) *Update + func (u *Update) DeleteStringsFromSet(path string, values ...string) *Update + func (u *Update) If(expr string, args ...interface{}) *Update + func (u *Update) OldValue(out interface{}) error + func (u *Update) OldValueWithContext(ctx aws.Context, out interface{}) error + func (u *Update) Prepend(path string, value interface{}) *Update + func (u *Update) Range(name string, value interface{}) *Update + func (u *Update) Remove(paths ...string) *Update + func (u *Update) RemoveExpr(expr string, args ...interface{}) *Update + func (u *Update) Run() error + func (u *Update) RunWithContext(ctx aws.Context) error + func (u *Update) Set(path string, value interface{}) *Update + func (u *Update) SetExpr(expr string, args ...interface{}) *Update + func (u *Update) SetIfNotExists(path string, value interface{}) *Update + func (u *Update) SetSet(path string, value interface{}) *Update + func (u *Update) Value(out interface{}) error + func (u *Update) ValueWithContext(ctx aws.Context, out interface{}) error + type UpdateTable struct + func (ut *UpdateTable) CreateIndex(index Index) *UpdateTable + func (ut *UpdateTable) DeleteIndex(name string) *UpdateTable + func (ut *UpdateTable) DisableStream() *UpdateTable + func (ut *UpdateTable) Provision(read, write int64) *UpdateTable + func (ut *UpdateTable) ProvisionIndex(name string, read, write int64) *UpdateTable + func (ut *UpdateTable) Run() (Description, error) + func (ut *UpdateTable) RunWithContext(ctx aws.Context) (Description, error) + func (ut *UpdateTable) Stream(view StreamView) *UpdateTable