config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustReadCfgFile

func MustReadCfgFile()

MustReadCfgFile reads the config file stated with or without given config file location

Types

type Config

type Config struct {
	Copy []*DynamoDBMappingConfig `mapstructure:"copy"`
}

Config represents a global configuration

func BindCopyConfigByKey

func BindCopyConfigByKey(key string) (*Config, error)

BindCopyConfigByKey binds the read configurations to Copy Config struct

func MustBind

func MustBind() *Config

MustBind binds the read configurations to Config struct

type DynamoDBConfig

type DynamoDBConfig struct {
	Region    string `mapstructure:"region"`
	TableName string `mapstructure:"table"`
	// Required for DynamoDB local
	Endpoint        string `mapstructure:"endpoint"`
	AccessKeyID     string `mapstructure:"accessKeyID"`
	SecretAccessKey string `mapstructure:"secretAccessKey"`
}

DynamoDBConfig represents connection info for a specific table

type DynamoDBMappingConfig

type DynamoDBMappingConfig struct {
	Service string          `mapstructure:"service"`
	Origin  *DynamoDBConfig `mapstructure:"origin"`
	Target  *DynamoDBConfig `mapstructure:"target"`
}

DynamoDBMappingConfig maps origin and target configs for DynamoDB

Jump to

Keyboard shortcuts

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