Documentation ¶
Index ¶
- type Account
- type AccountSet
- type Cartogram
- type Pack
- func (cp Pack) AllProfiles() []string
- func (cp Pack) Find(args []string) (Account, error)
- func (cp Pack) FindWithPrompt(args []string, prompt list.Prompt) (Account, error)
- func (cp Pack) Load() error
- func (cp Pack) Lookup(accountID string) (bool, Account)
- func (cp Pack) Search(tfs TagFilterSet) AccountSet
- func (cp Pack) Write() error
- type Role
- type RoleSet
- type Source
- type SourceSet
- type SpecVersionError
- type TagFilter
- type TagFilterSet
- type Tags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Account string `json:"account"` Region string `json:"region"` Roles RoleSet `json:"roles"` Tags Tags `json:"tags"` }
Account defines the spec for a role assumption target
func (Account) AllProfiles ¶ added in v2.6.0
AllProfiles returns all unique profiles found
type AccountSet ¶
type AccountSet []Account
AccountSet is a set of accounts
func (AccountSet) AllProfiles ¶ added in v2.6.0
func (as AccountSet) AllProfiles() []string
AllProfiles returns all unique profiles found
func (AccountSet) Lookup ¶
func (as AccountSet) Lookup(accountID string) (bool, Account)
Lookup finds an account in a Cartogram based on its ID
func (AccountSet) Search ¶
func (as AccountSet) Search(tfs TagFilterSet) AccountSet
Search finds accounts based on their tags
type Cartogram ¶
type Cartogram struct { Version int `json:"version"` Created time.Time `json:"created"` AccountSet AccountSet `json:"accounts"` }
Cartogram defines a set of accounts and their metadata
func NewCartogram ¶
func NewCartogram(as AccountSet) Cartogram
NewCartogram creates a new cartogram from an account set
func (Cartogram) AllProfiles ¶ added in v2.6.0
AllProfiles returns all unique profiles found
func (Cartogram) Search ¶
func (c Cartogram) Search(tfs TagFilterSet) AccountSet
Search finds accounts based on their tags
type Pack ¶
Pack defines a group of Cartograms
func (Pack) AllProfiles ¶ added in v2.6.0
AllProfiles returns all unique profiles found
func (Pack) FindWithPrompt ¶
FindWithPrompt checks both Lookup and Search for an account with a custom prompt
func (Pack) Search ¶
func (cp Pack) Search(tfs TagFilterSet) AccountSet
Search finds accounts based on their tags
type Role ¶
type Role struct { Name string `json:"name"` Mfa bool `json:"mfa"` Sources SourceSet `json:"sources"` }
Role holds information about authenticating to a role
func (Role) AllProfiles ¶ added in v2.6.0
AllProfiles returns all unique profiles found
type RoleSet ¶
type RoleSet []Role
RoleSet is a list of Roles
func (RoleSet) AllProfiles ¶ added in v2.6.0
AllProfiles returns all unique profiles found
type Source ¶
type Source struct {
Path string `json:"path"`
}
Source defines the previous hop for accessing a role
func (Source) AllProfiles ¶ added in v2.6.0
AllProfiles returns all unique profiles found
type SourceSet ¶ added in v2.6.0
type SourceSet []Source
SourceSet is a list of Sources
func (SourceSet) AllProfiles ¶ added in v2.6.0
AllProfiles returns all unique profiles found
type SpecVersionError ¶
type SpecVersionError struct {
ActualVersion, ExpectedVersion int
}
SpecVersionError indicates the cartogram version doesn't match voyager version
func (SpecVersionError) Error ¶
func (s SpecVersionError) Error() string
type TagFilterSet ¶
type TagFilterSet []TagFilter
TagFilterSet describes a set of tag filters
func (*TagFilterSet) LoadFromArgs ¶
func (tfs *TagFilterSet) LoadFromArgs(args []string) error
LoadFromArgs parses key:value args into a TagFilterSet
func (TagFilterSet) Match ¶
func (tfs TagFilterSet) Match(a Account) bool
Match checks if an account matches the tag filter set