dynamodb

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DynamoDB = "dynamo"

DynamoDB is the path to the configuration structure needed to connect to a dynamo DB instance.

Variables

This section is empty.

Functions

func ProvideDynamoDB added in v0.3.6

func ProvideDynamoDB(unmarshaller config.Unmarshaller, measures metric.Measures, logger log.Logger) (store.S, error)

Types

type Config

type Config struct {
	// Table is the name of the target DB table.
	// (Optional) Defaults to 'gifnoc'
	Table string

	// Endpoint is the HTTP(S) URL to the DB.
	// (Optional) Defaults to endpoint generated by the aws sdk.
	Endpoint string

	// Region is the AWS region of the running DB.
	Region string `validate:"required"`

	// MaxRetries is the number of times DB operations will be retried on error.
	// (Optional) Defaults to 3.
	MaxRetries int

	// AccessKey is the AWS AccessKey credential.
	AccessKey string `validate:"required"`

	// SecretKey is the AWS SecretKey credential.
	SecretKey string `validate:"required"`

	// DisableDualStack indicates whether the connection to the DB should be
	// dual stack (IPv4 and IPv6).
	// (Optional) Defaults to False.
	DisableDualStack bool
}

Config contains all fields needed to establish a connection with a dynamoDB instance.

Jump to

Keyboard shortcuts

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