awsconfig

package
v0.0.0-...-c43ff96 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAWSLoaderFromRole

func NewAWSLoaderFromRole(environment string, serviceName string, roleARN string, externalID string, sessionName string, duration time.Duration) config.Loader

NewAWSLoaderFromRole will return a new loader using the role provided to genereate credentials for Amazon

Types

type Loader

type Loader interface {
	Import(data []byte) error
	Initialize() error
	Get(key string) ([]byte, error)
	Put(key string, value []byte) error

	// Must functions will panic if they can't do what is requested.
	// They are maingly meant for use with configs that are required for an app to start up
	MustGetString(key string) string
	MustGetBool(key string) bool
	MustGetInt(key string) int
	MustGetDuration(key string) time.Duration
	MustGetObject(key string, obj interface{})
	MustGetPublicKey(key string) *rsa.PublicKey
	MustGetPrivateKey(key string) *rsa.PrivateKey
	MustGetCertificate(certKey string, privKeyKey string) *tls.Certificate
	MustGetEnv(key string) string
}

func NewAWSLoader

func NewAWSLoader(environment, serviceName string) Loader

NewAWSLoader creates a Loader that will cache the provided namespace on initialization and return data from that cache on Get

Jump to

Keyboard shortcuts

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