Documentation ¶
Index ¶
- Variables
- type DB
- type DynamoDB
- func (db *DynamoDB) Delete(ctx context.Context, email string, timestamp int64) error
- func (db *DynamoDB) Get(ctx context.Context, email string) (*User, int64, error)
- func (db *DynamoDB) Put(ctx context.Context, user *User) (int64, error)
- func (db *DynamoDB) Scan(ctx context.Context, f func(*User, int64)) error
- func (db *DynamoDB) Update(ctx context.Context, user *User, timestamp int64) (int64, error)
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSuchUser = errors.New("no such user")
View Source
var ErrOptimisticLock = errors.New("lock error")
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { Get(ctx context.Context, name string) (*User, int64, error) Scan(ctx context.Context, f func(*User, int64)) error Put(ctx context.Context, user *User) (int64, error) Update(ctx context.Context, user *User, timestamp int64) (int64, error) Delete(ctx context.Context, name string, timestamp int64) error }
type DynamoDB ¶
type DynamoDB struct {
// contains filtered or unexported fields
}
func NewDynamoDB ¶
func NewDynamoDB( api dynamodbiface.DynamoDBAPI, table string, ) *DynamoDB
Click to show internal directories.
Click to hide internal directories.