dynamo

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New(p client.ConfigProvider, cfgs ...*aws.Config) (*Store, error)

New creates a new instance of the DynamoDB client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config. Item size is 400K in DynamoDB. Use GetStore to get a automatically split items.

func (*Store) CreateSet

func (s *Store) CreateSet(ctx context.Context, set string, provision *dynamodb.ProvisionedThroughput) error

CreateSet will create a table that can be used for as a set for storing data.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, set, key string) error

func (*Store) Get

func (s *Store) Get(ctx context.Context, set, key string) ([]byte, error)

func (*Store) GetStore

func (s *Store) GetStore() blobstore.Store

GetStore will return a blobstore that will respect the 400K item limit of DynamoDB.

func (*Store) Set

func (s *Store) Set(ctx context.Context, set, key string, val []byte) error

func (*Store) SetAttributeNames

func (s *Store) SetAttributeNames(id, blob string)

SetAttributeNames will set the names of the id and blob attributes to use. Unless changed, attribute names are "id" and "blob".

Jump to

Keyboard shortcuts

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