internal

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountCache map[string]*pkg.LoadedProfile

Functions

func AppHomePath

func AppHomePath() string

Return the path to the base dir of the application config/cache

func ClearCache

func ClearCache()

func ExitOnError

func ExitOnError(err error)

func ExitWithError

func ExitWithError(err string, code int)

func HomePath

func HomePath() string

func LoadCache

func LoadCache()

func PanicOnError

func PanicOnError(err error)

Types

type Credential

type Credential struct {
	Expiration time.Time `ini:"expiration"`
	AccessKey  string    `ini:"aws_access_key_id"`
	SecretKey  string    `ini:"aws_secret_access_key"`
	Token      string    `ini:"aws_session_token"`
}

type Credentials

type Credentials struct {
	Credentials map[string]*Credential
	// contains filtered or unexported fields
}

func NewCredentials

func NewCredentials(data *ini.File) Credentials

func ReadCredentials

func ReadCredentials() *Credentials

func (Credentials) Add

func (c Credentials) Add(name string, credential *Credential)

func (Credentials) Delete

func (c Credentials) Delete(name string)

func (Credentials) Load

func (c Credentials) Load(section *ini.Section)

func (Credentials) Save

func (c Credentials) Save()

type Profile

type Profile struct {
	Profile string `ini:"roller_profile,omitempty"`
	Account string `ini:"roller_account"`
	Role    string `ini:"roller_role"`
	Region  string `ini:"region,omitempty"`
	Roller  bool   `ini:"roller"`
	RoleArn string `ini:"role_arn,omitempty"`
	TTL     string `ini:"roller_ttl,omitempty"`
}

func (Profile) GenerateName

func (p Profile) GenerateName() string

func (Profile) ParseRoleArn

func (p Profile) ParseRoleArn() (string, string)

type Profiles

type Profiles struct {
	Profiles map[string]*Profile
	// contains filtered or unexported fields
}

func NewProfiles

func NewProfiles(data *ini.File) Profiles

func ReadProfiles

func ReadProfiles() *Profiles

func (Profiles) Add

func (p Profiles) Add(name string, profile *Profile)

func (Profiles) Delete

func (p Profiles) Delete(name string)

func (Profiles) Load

func (p Profiles) Load(section *ini.Section)

func (Profiles) Save

func (p Profiles) Save()

func (Profiles) Update

func (p Profiles) Update(name string, profile *Profile)

type SerialisedCache

type SerialisedCache struct {
	ValidUntil time.Time
	Data       *[]pkg.LoadedProfile
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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