config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSCredentialType

type AWSCredentialType string
const (
	AWSCredentialTypeStatic AWSCredentialType = "static"
	AWSCredentialTypeRole   AWSCredentialType = "role"
)

type Config

type Config struct {
	Credentials Credentials `toml:"credentials"`
	SubnetID    string      `toml:"subnet_id"`
	Region      string      `toml:"region"`
}

func NewConfig

func NewConfig(cfgFile string) (*Config, error)

NewConfig returns a new Config

func (Config) GetAWSConfig

func (c Config) GetAWSConfig(ctx context.Context) (aws.Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Credentials

type Credentials struct {
	CredentialType    AWSCredentialType `toml:"credential_type"`
	StaticCredentials StaticCredentials `toml:"static"`
}

func (Credentials) Validate

func (c Credentials) Validate() error

type StaticCredentials

type StaticCredentials struct {
	// AWS Access key ID
	AccessKeyID string `toml:"access_key_id"`

	// AWS Secret Access Key
	SecretAccessKey string `toml:"secret_access_key"`

	// AWS Session Token
	SessionToken string `toml:"session_token"`
}

func (StaticCredentials) Validate

func (c StaticCredentials) Validate() error

Jump to

Keyboard shortcuts

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