Documentation ¶
Index ¶
- func CreateDefaultTable(ctx context.Context, client *dynamodb.Client, tableName string) error
- type AtomicWriteOperation
- func (op *AtomicWriteOperation) Delete(key string) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) DeleteXX(key string) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) Exec() (bool, error)
- func (op *AtomicWriteOperation) HDel(key, field string, fields ...string) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) HSet(key, field string, value interface{}, fields ...keyvaluestore.KeyValue) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) HSetNX(key, field string, value interface{}) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) NIncrBy(key string, n int64) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) SAdd(key string, member interface{}, members ...interface{}) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) SRem(key string, member interface{}, members ...interface{}) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) Set(key string, value interface{}) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) SetEQ(key string, value, oldValue interface{}) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) SetNX(key string, value interface{}) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) SetXX(key string, value interface{}) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) ZAdd(key string, member interface{}, score float64) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) ZAddNX(key string, member interface{}, score float64) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) ZHAdd(key, field string, member interface{}, score float64) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) ZHRem(key, field string) keyvaluestore.AtomicWriteResult
- func (op *AtomicWriteOperation) ZRem(key string, member interface{}) keyvaluestore.AtomicWriteResult
- type Backend
- func (b *Backend) AtomicWrite() keyvaluestore.AtomicWriteOperation
- func (b *Backend) Batch() keyvaluestore.BatchOperation
- func (b *Backend) Delete(key string) (bool, error)
- func (b *Backend) Get(key string) (*string, error)
- func (b *Backend) HDel(key, field string, fields ...string) error
- func (b *Backend) HGet(key, field string) (*string, error)
- func (b *Backend) HGetAll(key string) (map[string]string, error)
- func (b *Backend) HSet(key, field string, value interface{}, fields ...keyvaluestore.KeyValue) error
- func (b *Backend) NIncrBy(key string, n int64) (int64, error)
- func (b *Backend) SAdd(key string, member interface{}, members ...interface{}) error
- func (b *Backend) SMembers(key string) ([]string, error)
- func (b *Backend) SRem(key string, member interface{}, members ...interface{}) error
- func (b *Backend) Set(key string, value interface{}) error
- func (b *Backend) SetEQ(key string, value, oldValue interface{}) (bool, error)
- func (b *Backend) SetNX(key string, value interface{}) (bool, error)
- func (b *Backend) SetXX(key string, value interface{}) (bool, error)
- func (b *Backend) Unwrap() keyvaluestore.Backend
- func (b *Backend) WithEventuallyConsistentReads() keyvaluestore.Backend
- func (b *Backend) WithProfiler(profiler interface{}) keyvaluestore.Backend
- func (b *Backend) ZAdd(key string, member interface{}, score float64) error
- func (b *Backend) ZCount(key string, min, max float64) (int, error)
- func (b *Backend) ZHAdd(key, field string, member interface{}, score float64) error
- func (b *Backend) ZHGet(key, field string) (*string, error)
- func (b *Backend) ZHRangeByLex(key string, min, max string, limit int) ([]string, error)
- func (b *Backend) ZHRangeByScore(key string, min, max float64, limit int) ([]string, error)
- func (b *Backend) ZHRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)
- func (b *Backend) ZHRem(key, field string) error
- func (b *Backend) ZHRevRangeByLex(key string, min, max string, limit int) ([]string, error)
- func (b *Backend) ZHRevRangeByScore(key string, min, max float64, limit int) ([]string, error)
- func (b *Backend) ZHRevRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)
- func (b *Backend) ZIncrBy(key string, member interface{}, n float64) (float64, error)
- func (b *Backend) ZLexCount(key, min, max string) (int, error)
- func (b *Backend) ZRangeByLex(key string, min, max string, limit int) ([]string, error)
- func (b *Backend) ZRangeByScore(key string, min, max float64, limit int) ([]string, error)
- func (b *Backend) ZRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)
- func (b *Backend) ZRem(key string, member interface{}) error
- func (b *Backend) ZRevRangeByLex(key string, min, max string, limit int) ([]string, error)
- func (b *Backend) ZRevRangeByScore(key string, min, max float64, limit int) ([]string, error)
- func (b *Backend) ZRevRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)
- func (b *Backend) ZScore(key string, member interface{}) (*float64, error)
- type BackendClient
- type BasicProfiler
- func (p *BasicProfiler) AddDynamoDBRequestProfile(operationName string, duration time.Duration)
- func (p *BasicProfiler) ConsumeDynamoDBReadCapacity(capacity float64)
- func (p *BasicProfiler) ConsumeDynamoDBWriteCapacity(capacity float64)
- func (p *BasicProfiler) DynamoDBReadCapacityConsumed() float64
- func (p *BasicProfiler) DynamoDBRequestCount() int
- func (p *BasicProfiler) DynamoDBRequestDuration() time.Duration
- func (p *BasicProfiler) DynamoDBWriteCapacityConsumed() float64
- type BatchOperation
- func (op *BatchOperation) Delete(key string) keyvaluestore.ErrorResult
- func (op *BatchOperation) Exec() error
- func (op *BatchOperation) Get(key string) keyvaluestore.GetResult
- func (op *BatchOperation) SMembers(key string) keyvaluestore.SMembersResult
- func (op *BatchOperation) Set(key string, value interface{}) keyvaluestore.ErrorResult
- func (op *BatchOperation) ZAdd(key string, member interface{}, score float64) keyvaluestore.ErrorResult
- func (op *BatchOperation) ZHGet(key, field string) keyvaluestore.GetResult
- func (op *BatchOperation) ZScore(key string, member interface{}) keyvaluestore.ZScoreResult
- type Profiler
- type ProfilingBackendClient
- func (c *ProfilingBackendClient) BatchGetItem(ctx context.Context, input *dynamodb.BatchGetItemInput, ...) (*dynamodb.BatchGetItemOutput, error)
- func (c *ProfilingBackendClient) BatchWriteItem(ctx context.Context, input *dynamodb.BatchWriteItemInput, ...) (*dynamodb.BatchWriteItemOutput, error)
- func (c *ProfilingBackendClient) DeleteItem(ctx context.Context, input *dynamodb.DeleteItemInput, ...) (*dynamodb.DeleteItemOutput, error)
- func (c *ProfilingBackendClient) GetItem(ctx context.Context, input *dynamodb.GetItemInput, ...) (*dynamodb.GetItemOutput, error)
- func (c *ProfilingBackendClient) PutItem(ctx context.Context, input *dynamodb.PutItemInput, ...) (*dynamodb.PutItemOutput, error)
- func (c *ProfilingBackendClient) Query(ctx context.Context, input *dynamodb.QueryInput, ...) (*dynamodb.QueryOutput, error)
- func (c *ProfilingBackendClient) TransactWriteItems(ctx context.Context, input *dynamodb.TransactWriteItemsInput, ...) (*dynamodb.TransactWriteItemsOutput, error)
- func (c *ProfilingBackendClient) UpdateItem(ctx context.Context, input *dynamodb.UpdateItemInput, ...) (*dynamodb.UpdateItemOutput, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AtomicWriteOperation ¶
type AtomicWriteOperation struct { Backend *Backend // contains filtered or unexported fields }
func (*AtomicWriteOperation) Delete ¶
func (op *AtomicWriteOperation) Delete(key string) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) DeleteXX ¶
func (op *AtomicWriteOperation) DeleteXX(key string) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) Exec ¶
func (op *AtomicWriteOperation) Exec() (bool, error)
func (*AtomicWriteOperation) HDel ¶
func (op *AtomicWriteOperation) HDel(key, field string, fields ...string) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) HSet ¶
func (op *AtomicWriteOperation) HSet(key, field string, value interface{}, fields ...keyvaluestore.KeyValue) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) HSetNX ¶
func (op *AtomicWriteOperation) HSetNX(key, field string, value interface{}) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) NIncrBy ¶
func (op *AtomicWriteOperation) NIncrBy(key string, n int64) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) SAdd ¶
func (op *AtomicWriteOperation) SAdd(key string, member interface{}, members ...interface{}) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) SRem ¶
func (op *AtomicWriteOperation) SRem(key string, member interface{}, members ...interface{}) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) Set ¶
func (op *AtomicWriteOperation) Set(key string, value interface{}) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) SetEQ ¶
func (op *AtomicWriteOperation) SetEQ(key string, value, oldValue interface{}) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) SetNX ¶
func (op *AtomicWriteOperation) SetNX(key string, value interface{}) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) SetXX ¶
func (op *AtomicWriteOperation) SetXX(key string, value interface{}) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) ZAdd ¶
func (op *AtomicWriteOperation) ZAdd(key string, member interface{}, score float64) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) ZAddNX ¶
func (op *AtomicWriteOperation) ZAddNX(key string, member interface{}, score float64) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) ZHAdd ¶
func (op *AtomicWriteOperation) ZHAdd(key, field string, member interface{}, score float64) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) ZHRem ¶
func (op *AtomicWriteOperation) ZHRem(key, field string) keyvaluestore.AtomicWriteResult
func (*AtomicWriteOperation) ZRem ¶
func (op *AtomicWriteOperation) ZRem(key string, member interface{}) keyvaluestore.AtomicWriteResult
type Backend ¶
type Backend struct { Context context.Context Client BackendClient TableName string AllowEventuallyConsistentReads bool }
func (*Backend) AtomicWrite ¶
func (b *Backend) AtomicWrite() keyvaluestore.AtomicWriteOperation
func (*Backend) Batch ¶
func (b *Backend) Batch() keyvaluestore.BatchOperation
func (*Backend) HSet ¶
func (b *Backend) HSet(key, field string, value interface{}, fields ...keyvaluestore.KeyValue) error
func (*Backend) Unwrap ¶
func (b *Backend) Unwrap() keyvaluestore.Backend
func (*Backend) WithEventuallyConsistentReads ¶
func (b *Backend) WithEventuallyConsistentReads() keyvaluestore.Backend
func (*Backend) WithProfiler ¶
func (b *Backend) WithProfiler(profiler interface{}) keyvaluestore.Backend
func (*Backend) ZHRangeByLex ¶
func (*Backend) ZHRangeByScore ¶
func (*Backend) ZHRangeByScoreWithScores ¶
func (b *Backend) ZHRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)
func (*Backend) ZHRevRangeByLex ¶
func (*Backend) ZHRevRangeByScore ¶
func (*Backend) ZHRevRangeByScoreWithScores ¶
func (b *Backend) ZHRevRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)
func (*Backend) ZRangeByLex ¶
func (*Backend) ZRangeByScore ¶
func (*Backend) ZRangeByScoreWithScores ¶
func (b *Backend) ZRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)
func (*Backend) ZRevRangeByLex ¶
func (*Backend) ZRevRangeByScore ¶
func (*Backend) ZRevRangeByScoreWithScores ¶
func (b *Backend) ZRevRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)
type BackendClient ¶
type BackendClient interface { BatchGetItem(context.Context, *dynamodb.BatchGetItemInput, ...func(*dynamodb.Options)) (*dynamodb.BatchGetItemOutput, error) BatchWriteItem(context.Context, *dynamodb.BatchWriteItemInput, ...func(*dynamodb.Options)) (*dynamodb.BatchWriteItemOutput, error) DeleteItem(context.Context, *dynamodb.DeleteItemInput, ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error) GetItem(context.Context, *dynamodb.GetItemInput, ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error) PutItem(context.Context, *dynamodb.PutItemInput, ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error) Query(context.Context, *dynamodb.QueryInput, ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error) UpdateItem(context.Context, *dynamodb.UpdateItemInput, ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error) TransactWriteItems(context.Context, *dynamodb.TransactWriteItemsInput, ...func(*dynamodb.Options)) (*dynamodb.TransactWriteItemsOutput, error) }
type BasicProfiler ¶
type BasicProfiler struct {
// contains filtered or unexported fields
}
func (*BasicProfiler) AddDynamoDBRequestProfile ¶
func (p *BasicProfiler) AddDynamoDBRequestProfile(operationName string, duration time.Duration)
func (*BasicProfiler) ConsumeDynamoDBReadCapacity ¶
func (p *BasicProfiler) ConsumeDynamoDBReadCapacity(capacity float64)
func (*BasicProfiler) ConsumeDynamoDBWriteCapacity ¶
func (p *BasicProfiler) ConsumeDynamoDBWriteCapacity(capacity float64)
func (*BasicProfiler) DynamoDBReadCapacityConsumed ¶
func (p *BasicProfiler) DynamoDBReadCapacityConsumed() float64
func (*BasicProfiler) DynamoDBRequestCount ¶
func (p *BasicProfiler) DynamoDBRequestCount() int
func (*BasicProfiler) DynamoDBRequestDuration ¶
func (p *BasicProfiler) DynamoDBRequestDuration() time.Duration
func (*BasicProfiler) DynamoDBWriteCapacityConsumed ¶
func (p *BasicProfiler) DynamoDBWriteCapacityConsumed() float64
type BatchOperation ¶
type BatchOperation struct { *keyvaluestore.FallbackBatchOperation Backend *Backend // contains filtered or unexported fields }
func (*BatchOperation) Delete ¶
func (op *BatchOperation) Delete(key string) keyvaluestore.ErrorResult
func (*BatchOperation) Exec ¶
func (op *BatchOperation) Exec() error
func (*BatchOperation) Get ¶
func (op *BatchOperation) Get(key string) keyvaluestore.GetResult
func (*BatchOperation) SMembers ¶
func (op *BatchOperation) SMembers(key string) keyvaluestore.SMembersResult
func (*BatchOperation) Set ¶
func (op *BatchOperation) Set(key string, value interface{}) keyvaluestore.ErrorResult
func (*BatchOperation) ZAdd ¶
func (op *BatchOperation) ZAdd(key string, member interface{}, score float64) keyvaluestore.ErrorResult
func (*BatchOperation) ZHGet ¶
func (op *BatchOperation) ZHGet(key, field string) keyvaluestore.GetResult
func (*BatchOperation) ZScore ¶
func (op *BatchOperation) ZScore(key string, member interface{}) keyvaluestore.ZScoreResult
type ProfilingBackendClient ¶
type ProfilingBackendClient struct { Client BackendClient Profiler Profiler }
func (*ProfilingBackendClient) BatchGetItem ¶
func (c *ProfilingBackendClient) BatchGetItem(ctx context.Context, input *dynamodb.BatchGetItemInput, options ...func(*dynamodb.Options)) (*dynamodb.BatchGetItemOutput, error)
func (*ProfilingBackendClient) BatchWriteItem ¶
func (c *ProfilingBackendClient) BatchWriteItem(ctx context.Context, input *dynamodb.BatchWriteItemInput, options ...func(*dynamodb.Options)) (*dynamodb.BatchWriteItemOutput, error)
func (*ProfilingBackendClient) DeleteItem ¶
func (c *ProfilingBackendClient) DeleteItem(ctx context.Context, input *dynamodb.DeleteItemInput, options ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error)
func (*ProfilingBackendClient) GetItem ¶
func (c *ProfilingBackendClient) GetItem(ctx context.Context, input *dynamodb.GetItemInput, options ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error)
func (*ProfilingBackendClient) PutItem ¶
func (c *ProfilingBackendClient) PutItem(ctx context.Context, input *dynamodb.PutItemInput, options ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
func (*ProfilingBackendClient) Query ¶
func (c *ProfilingBackendClient) Query(ctx context.Context, input *dynamodb.QueryInput, options ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error)
func (*ProfilingBackendClient) TransactWriteItems ¶
func (c *ProfilingBackendClient) TransactWriteItems(ctx context.Context, input *dynamodb.TransactWriteItemsInput, options ...func(*dynamodb.Options)) (*dynamodb.TransactWriteItemsOutput, error)
func (*ProfilingBackendClient) UpdateItem ¶
func (c *ProfilingBackendClient) UpdateItem(ctx context.Context, input *dynamodb.UpdateItemInput, options ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error)
Click to show internal directories.
Click to hide internal directories.