utils

package
v0.0.0-...-50815b3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AWSDebugEnv = "AWS_DEBUG"

AWSDebugEnv is the key used for the env variable that toggles debug logs

Variables

This section is empty.

Functions

func AWSConfig

func AWSConfig(dev bool, logger ...Logger) (cfg *aws.Config)

AWSConfig generates an AWS session Configuration. Only the first provided logger is used.

func AWSSession

func AWSSession(cfg ...*aws.Config) (*session.Session, error)

AWSSession initializes an AWS API session with given configs

func NewLogger

func NewLogger(dev bool, logpath string) (sugar *zap.SugaredLogger, err error)

NewLogger creates a default "sugared" logger based on dev toggle. A non-blank logpath will use the json encoder and write to the provided filepath.

Types

type Logger

type Logger interface {
	Debug(...interface{})
	Error(...interface{})
}

Logger defines a logger that can be configured for use with the AWS SDK

Jump to

Keyboard shortcuts

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