awsconfig

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 6 Imported by: 6

Documentation

Overview

Package awsconfig loads AWS configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncPrintf

type FuncPrintf func(format string, v ...any)

FuncPrintf is a helper type for logging function.

type Options

type Options struct {
	Region          string
	RoleArn         string
	RoleSessionName string
	RoleExternalID  string
	Printf          FuncPrintf // defaults to log.Printf
}

Options provide optional parameters for AwsConfig.

type Output added in v0.1.0

type Output struct {
	AwsConfig    aws.Config // AwsConfig holds the desired configuration.
	StsAccountID string
	StsArn       string
	StsUserID    string
}

Output holds returned result.

func AwsConfig

func AwsConfig(opt Options) (Output, error)

AwsConfig provides a configuration to initialize clients for AWS services. If roleArn is provided, it assumes the role. Otherwise it works with default credentials.

Jump to

Keyboard shortcuts

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