config

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Username            string     `json:"username"`
	OktaHost            string     `json:"okta_host,omitempty"`
	OktaAppPath         string     `json:"okta_app_path,omitempty"`
	PreferredFactorType string     `json:"preferred_factor_type,omitempty"`
	Profiles            []*Profile `json:"profiles"`
	CredentialsFilepath string     `json:"-"`
	// contains filtered or unexported fields
}

Config contains the configuration of this CLI.

func New

func New(fp string) (*Config, error)

New creates a new Config reference with the given filepath.

func (*Config) Load

func (c *Config) Load() error

Load loads data from the config file into the Config struct.

func (*Config) Save

func (c *Config) Save() error

Save saves data from the Config struct into the config file.

type Profile

type Profile struct {
	Name     string `json:"name"`
	RoleARN  string `json:"role_arn"`
	Duration int64  `json:"duration"`
}

Profile contains the configuration of each AWS profile.

Jump to

Keyboard shortcuts

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