config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvDynamoDBEndpoint

func EnvDynamoDBEndpoint() string

EnvDynamoDBEndpoint get DynamoDB endpoint from env vars.

func EnvEC2Endpoint

func EnvEC2Endpoint() string

EnvEC2Endpoint get EC2 endpoint from env vars.

func EnvEndpoint

func EnvEndpoint() string

EnvEndpoint get endpoint from env vars.

func EnvKMSEndpoint added in v0.0.4

func EnvKMSEndpoint() string

EnvKMSEndpoint get KMS endpoint from env vars.

func EnvRegion

func EnvRegion() string

EnvRegion get region from env vars.

func EnvS3Endpoint

func EnvS3Endpoint() string

EnvS3Endpoint get S3 endpoint from env vars.

func EnvSNSEndpoint

func EnvSNSEndpoint() string

EnvSNSEndpoint get SNS endpoint from env vars.

func EnvSQSEndpoint

func EnvSQSEndpoint() string

EnvSQSEndpoint get SQS endpoint from env vars.

Types

type Config

type Config struct {
	Region         string
	CommonEndpoint string
	Endpoints      Endpoints
	Logger         log.Logger

	EnableDefaultCreds bool

	// Static Credentials
	AccessKey string
	SecretKey string

	// File Credentials
	Filename string
	Profile  string

	// DefaultPrefix is used for service resource prefix
	// e.g.) DynamoDB table, S3 bucket, SQS Queue
	DefaultPrefix string

	// Specific sevice's options
	S3ForcePathStyle bool

	// Custom Function to wrap errors.
	ErrWrap func(errors.ErrorData) error
}

Config has AWS settings.

func (Config) AWSConfig

func (c Config) AWSConfig() (aws.Config, error)

AWSConfig creates *aws.Config object from the fields.

func (Config) GetErrWrap

func (c Config) GetErrWrap() func(errors.ErrorData) error

func (Config) GetLogger

func (c Config) GetLogger() log.Logger

type Endpoints

type Endpoints struct {
	DynamoDB string
	EC2      string
	KMS      string
	S3       string
}

func (Endpoints) GetDynamoDB added in v0.0.3

func (e Endpoints) GetDynamoDB() aws.ResolveWithEndpoint

func (Endpoints) GetEC2

func (e Endpoints) GetEC2() aws.ResolveWithEndpoint

func (Endpoints) GetKMS added in v0.0.4

func (e Endpoints) GetKMS() aws.ResolveWithEndpoint

func (Endpoints) GetS3

func (e Endpoints) GetS3() aws.ResolveWithEndpoint

func (Endpoints) HasDynamoDB added in v0.0.3

func (e Endpoints) HasDynamoDB() bool

func (Endpoints) HasEC2

func (e Endpoints) HasEC2() bool

func (Endpoints) HasKMS added in v0.0.4

func (e Endpoints) HasKMS() bool

func (Endpoints) HasS3

func (e Endpoints) HasS3() bool

Jump to

Keyboard shortcuts

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