state

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(c *State, filePath string) error

Write ..

Types

type State

type State struct {
	Current struct {
		Engine string `json:"engine,omitempty"`
		Role   string `json:"role,omitempty"`
	} `json:"current,omitempty"`
	AWSCredentials map[string]map[string]*client.AWSCredentials `json:"creds,omitempty"`
}

State ..

func Read

func Read(filePath string) (*State, error)

Read ..

func (*State) GetAWSCredentials

func (s *State) GetAWSCredentials(engine, role string) *client.AWSCredentials

GetAWSCredentials ..

func (*State) GetCachedEngineRoles

func (s *State) GetCachedEngineRoles(engine string) []string

GetCachedEngineRoles ..

func (*State) GetCachedEngines

func (s *State) GetCachedEngines() []string

GetCachedEngines ..

func (*State) GetCurrentAWSCredentials

func (s *State) GetCurrentAWSCredentials() *client.AWSCredentials

GetCurrentAWSCredentials ..

func (*State) SetAWSCredentials

func (s *State) SetAWSCredentials(engine, role string, creds *client.AWSCredentials)

SetAWSCredentials ..

func (*State) SetCurrentAWSCredentials

func (s *State) SetCurrentAWSCredentials(creds *client.AWSCredentials)

SetCurrentAWSCredentials ..

func (*State) SetCurrentEngine

func (s *State) SetCurrentEngine(engine string)

SetCurrentEngine ..

func (*State) SetCurrentRole

func (s *State) SetCurrentRole(role string)

SetCurrentRole ..

Jump to

Keyboard shortcuts

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