dynamodbstore

package
v0.0.0-...-ba1b225 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDefaultTable

func CreateDefaultTable(client *dynamodb.DynamoDB, tableName string) error

Types

type AWSBackendClient

type AWSBackendClient struct {
	dynamodbiface.DynamoDBAPI
}

type AtomicWriteOperation

type AtomicWriteOperation struct {
	Backend *Backend
	// contains filtered or unexported fields
}

func (*AtomicWriteOperation) CAS

func (op *AtomicWriteOperation) CAS(key string, oldValue, newValue string) keyvaluestore.AtomicWriteResult

func (*AtomicWriteOperation) Delete

func (*AtomicWriteOperation) Exec

func (op *AtomicWriteOperation) Exec() (bool, error)

func (*AtomicWriteOperation) SetNX

func (op *AtomicWriteOperation) SetNX(key string, value interface{}) keyvaluestore.AtomicWriteResult

type Backend

type Backend struct {
	Client                         BackendClient
	TableName                      string
	AllowEventuallyConsistentReads bool
}

func (*Backend) AddInt

func (b *Backend) AddInt(key string, n int64) (int64, error)

func (*Backend) AtomicWrite

func (b *Backend) AtomicWrite() keyvaluestore.AtomicWriteOperation

func (*Backend) Batch

func (*Backend) CAS

func (b *Backend) CAS(key string, transform func(prev *string) (interface{}, error)) (bool, error)

func (*Backend) Delete

func (b *Backend) Delete(key string) (bool, error)

func (*Backend) Get

func (b *Backend) Get(key string) (*string, error)

func (*Backend) SAdd

func (b *Backend) SAdd(key string, member interface{}, members ...interface{}) error

func (*Backend) SMembers

func (b *Backend) SMembers(key string) ([]string, error)

func (*Backend) SRem

func (b *Backend) SRem(key string, member interface{}, members ...interface{}) error

func (*Backend) Set

func (b *Backend) Set(key string, value interface{}) error

func (*Backend) SetNX

func (b *Backend) SetNX(key string, value interface{}) (bool, error)

func (*Backend) SetXX

func (b *Backend) SetXX(key string, value interface{}) (bool, error)

func (*Backend) WithEventuallyConsistentReads

func (b *Backend) WithEventuallyConsistentReads() *Backend

func (*Backend) WithProfiler

func (b *Backend) WithProfiler(profiler Profiler) *Backend

func (*Backend) ZAdd

func (b *Backend) ZAdd(key string, member interface{}, score float64) error

func (*Backend) ZCount

func (b *Backend) ZCount(key string, min, max float64) (int, error)

func (*Backend) ZIncrBy

func (b *Backend) ZIncrBy(key string, member string, n float64) (float64, error)

func (*Backend) ZLexCount

func (b *Backend) ZLexCount(key, min, max string) (int, error)

func (*Backend) ZRangeByLex

func (b *Backend) ZRangeByLex(key string, min, max string, limit int) ([]string, error)

func (*Backend) ZRangeByScore

func (b *Backend) ZRangeByScore(key string, min, max float64, limit int) ([]string, error)

func (*Backend) ZRangeByScoreWithScores

func (b *Backend) ZRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)

func (*Backend) ZRem

func (b *Backend) ZRem(key string, member interface{}) error

func (*Backend) ZRevRangeByLex

func (b *Backend) ZRevRangeByLex(key string, min, max string, limit int) ([]string, error)

func (*Backend) ZRevRangeByScore

func (b *Backend) ZRevRangeByScore(key string, min, max float64, limit int) ([]string, error)

func (*Backend) ZRevRangeByScoreWithScores

func (b *Backend) ZRevRangeByScoreWithScores(key string, min, max float64, limit int) (keyvaluestore.ScoredMembers, error)

func (*Backend) ZScore

func (b *Backend) ZScore(key string, member interface{}) (*float64, 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) Exec

func (op *BatchOperation) Exec() error

func (*BatchOperation) Get

func (*BatchOperation) SMembers

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

type DaxBackendClient

type DaxBackendClient struct {
	*dax.Dax
}

type Profiler

type Profiler interface {
	ConsumeDynamoDBReadCapacity(capacity float64)
	ConsumeDynamoDBWriteCapacity(capacity float64)
	AddDynamoDBRequestProfile(operationName string, duration time.Duration)
}

type ProfilingBackendClient

type ProfilingBackendClient struct {
	Client   BackendClient
	Profiler Profiler
}

func (*ProfilingBackendClient) BatchGetItem

func (*ProfilingBackendClient) BatchWriteItem

func (*ProfilingBackendClient) DeleteItem

func (*ProfilingBackendClient) GetItem

func (*ProfilingBackendClient) PutItem

func (*ProfilingBackendClient) Query

func (*ProfilingBackendClient) TransactWriteItems

func (*ProfilingBackendClient) UpdateItem

type TransactWriteErr

type TransactWriteErr interface {
	awserr.RequestFailure
	CancellationReasons() []awserr.Error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL