awsx

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RegionName - aws region name
	RegionName = "region"
	// AccessKeyIDName - aws access key id name
	AccessKeyIDName = "aws_access_key_id"
	// SecretAccessKeyName - aws secret access key name
	// #nosec
	SecretAccessKeyName = "aws_secret_access_key"
	// RoleArnName - role arn name
	RoleArnName = "role_arn"
	// ExternalIDName - external id name
	ExternalIDName = "external_id"
)

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error, codes ...string) (bool, bool)

CheckError - check aws error code.

func NewSession

func NewSession(conf Config) (*session.Session, error)

NewSession expects Config and returns the *session.Session object

Types

type Config

type Config struct {
	Name            string `json:"-" ini:"-"`
	Region          string `json:"region" ini:"-"`
	AccessKeyID     string `json:"aws_access_key_id" ini:"aws_access_key_id"`
	SecretAccessKey string `json:"aws_secret_access_key" ini:"aws_secret_access_key"`
	SessionToken    string `json:"aws_session_token" ini:"aws_session_token"`
	RoleArn         string `json:"role_arn" ini:"-"`
	ExternalID      string `json:"external_id" ini:"-"`
}

Config - simple aws session config

func NewConfig

func NewConfig(m map[string][]byte) Config

NewConfig expects the map of config data and returns the Config object

type Options added in v1.1.0

type Options struct {
	PermissionsBoundaryARN string
}

Options of AWS

func (*Options) BindFlags added in v1.1.0

func (o *Options) BindFlags(fs *flag.FlagSet)

BindFlags will parse the given flagset for aws arg flags.

type STS

type STS interface {
	GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error)
}

STS is the interface for the STS API calls

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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