config

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDebugTransport = &DebugTransport{
	Transport: http.DefaultTransport,
}

Functions

func EnvAthenaEndpoint added in v0.2.6

func EnvAthenaEndpoint() string

EnvAthenaEndpoint get Athena endpoint from env vars.

func EnvCloudwatchLogsEndpoint added in v0.2.4

func EnvCloudwatchLogsEndpoint() string

EnvCloudwatchLogsEndpoint get CloudwatchLogs endpoint from env vars.

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 EnvPinpointEmailEndpoint added in v0.2.3

func EnvPinpointEmailEndpoint() string

EnvPinpointEmailEndpoint get PinpointEmail endpoint from env vars.

func EnvPinpointEndpoint added in v0.3.1

func EnvPinpointEndpoint() string

EnvPinpointEndpoint get Pinpoint 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 EnvSESEndpoint added in v0.2.7

func EnvSESEndpoint() string

EnvSESEndpoint get SES 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.

func EnvSSMEndpoint added in v0.2.1

func EnvSSMEndpoint() string

EnvSSMEndpoint get SSM 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

	// Custom HTTP Client
	CustomHTTPClient *http.Client
	// Showing req/resp data when `true` (Cannot use with CustomHTTPClient)
	UseDebugRequest bool
}

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 DebugTransport added in v0.2.0

type DebugTransport struct {
	Transport http.RoundTripper
}

DebugTransport implements http.RoundTripper and showing request/response contents.

func (*DebugTransport) RoundTrip added in v0.2.0

func (t *DebugTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Endpoints

type Endpoints struct {
	Athena         string
	CloudwatchLogs string
	DynamoDB       string
	EC2            string
	KMS            string
	Pinpoint       string
	PinpointEmail  string
	S3             string
	SES            string
	SQS            string
	SSM            string
}

func (Endpoints) GetAthena added in v0.2.6

func (e Endpoints) GetAthena() aws.ResolveWithEndpoint

func (Endpoints) GetCloudwatchLogs added in v0.2.4

func (e Endpoints) GetCloudwatchLogs() aws.ResolveWithEndpoint

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) GetPinpoint added in v0.3.1

func (e Endpoints) GetPinpoint() aws.ResolveWithEndpoint

func (Endpoints) GetPinpointEmail added in v0.2.3

func (e Endpoints) GetPinpointEmail() aws.ResolveWithEndpoint

func (Endpoints) GetS3

func (e Endpoints) GetS3() aws.ResolveWithEndpoint

func (Endpoints) GetSES added in v0.2.7

func (e Endpoints) GetSES() aws.ResolveWithEndpoint

func (Endpoints) GetSQS added in v0.3.5

func (e Endpoints) GetSQS() aws.ResolveWithEndpoint

func (Endpoints) GetSSM added in v0.2.1

func (e Endpoints) GetSSM() aws.ResolveWithEndpoint

func (Endpoints) HasAthena added in v0.2.6

func (e Endpoints) HasAthena() bool

func (Endpoints) HasCloudwatchLogs added in v0.2.4

func (e Endpoints) HasCloudwatchLogs() bool

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) HasPinpoint added in v0.3.1

func (e Endpoints) HasPinpoint() bool

func (Endpoints) HasPinpointEmail added in v0.2.3

func (e Endpoints) HasPinpointEmail() bool

func (Endpoints) HasS3

func (e Endpoints) HasS3() bool

func (Endpoints) HasSES added in v0.2.7

func (e Endpoints) HasSES() bool

func (Endpoints) HasSQS added in v0.3.5

func (e Endpoints) HasSQS() bool

func (Endpoints) HasSSM added in v0.2.1

func (e Endpoints) HasSSM() bool

Jump to

Keyboard shortcuts

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