Documentation ¶
Index ¶
- func DeleteOnRelease() models.AcquireLockOption
- func FailIfLocked() models.AcquireLockOption
- func ReplaceData() models.AcquireLockOption
- func WithAdditionalAttributes(attr map[string]types.AttributeValue) models.AcquireLockOption
- func WithCustomPartitionKey(partitionKey string) models.CreateTableOption
- func WithData(data []byte) models.AcquireLockOption
- func WithProvisionedThroughput(provisionedThroughput *types.ProvisionedThroughput) models.CreateTableOption
- type Client
- type ClientOption
- type EncryptedClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteOnRelease ¶
func DeleteOnRelease() models.AcquireLockOption
func FailIfLocked ¶
func FailIfLocked() models.AcquireLockOption
func ReplaceData ¶
func ReplaceData() models.AcquireLockOption
func WithAdditionalAttributes ¶
func WithAdditionalAttributes(attr map[string]types.AttributeValue) models.AcquireLockOption
func WithCustomPartitionKey ¶
func WithCustomPartitionKey(partitionKey string) models.CreateTableOption
func WithData ¶
func WithData(data []byte) models.AcquireLockOption
func WithProvisionedThroughput ¶
func WithProvisionedThroughput(provisionedThroughput *types.ProvisionedThroughput) models.CreateTableOption
Types ¶
type Client ¶
type Client struct { TableName string OwnerName string PartitionKeyName string EncryptionKey string Encryption bool Lock *lock.LockManager DynamoDB providers.DynamoDbProvider }
func NewDynalockClient ¶
func NewDynalockClient(dynamoDb providers.DynamoDbProvider, tableName string, opts ...ClientOption) *Client
func NewDynalockClientWithEncryption ¶
func NewDynalockClientWithEncryption(dynamoDb providers.DynamoDbProvider, tableName string, opts ...EncryptedClientOption) *Client
func (*Client) AcquireLock ¶
func (*Client) CreateTable ¶
func (c *Client) CreateTable(ctx context.Context, tableName string, opts ...models.CreateTableOption) (*dynamodb.CreateTableOutput, error)
type ClientOption ¶
type ClientOption func(*Client)
func WithLockOwnerName ¶
func WithLockOwnerName(name string) ClientOption
func WithPartitionKeyName ¶
func WithPartitionKeyName(pkn string) ClientOption
type EncryptedClientOption ¶
type EncryptedClientOption func(*Client)
func WithDataEncryption ¶
func WithDataEncryption(key string) EncryptedClientOption
Click to show internal directories.
Click to hide internal directories.