config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config prepares the AWS configuration that will be used by the AWS services. It handles the localstack configuration. It provides some means to generate errors useful in unitary tests

Index

Constants

View Source
const (
	// Env is the environment variable name for the localstack use.  If set, the aws library uses localstack.
	// Its value is irrelevant
	Env = "USE_LOCALSTACK"
	// EnvFaulty is the environment variable name for the faulty configuration use.  If set, the aws library uses
	// a faulty configuration.
	EnvFaulty = "USE_FAULTY_LOCALSTACK"
	// AwsProfile is the environment variable name for the aws profile to use.  If set, the aws library uses the
	// profile.
	AwsProfile = "GO_AWS_PROFILE" // Trying to avoid collision. Terraform uses AWS_PROFILE.

)

Variables

This section is empty.

Functions

func ClearCached

func ClearCached()

ClearCached clears the cached configuration.

func NewConfig

func NewConfig(opts ...config.LoadOptionsFunc) (cfg aws.Config, err error)

NewConfig returns a configuration with the given options. If there are no options, it is the default configuration. The supported options are `WithLocalStack`.

func SetProfile

func SetProfile(profile string) (string, error)

SetProfile sets the AWS profile to use by `go-aws`. If the profile is empty, it uses the default profile. It returns the current profile used by `go-aws` and an error if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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