Documentation ¶
Index ¶
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
type AccountSet ¶
type AccountSet []Account
AccountSet is a set of accounts
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) 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) 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 []Source `json:"sources"` }
Role holds information about authenticating to a role
type Source ¶
type Source struct {
Path string `json:"path"`
}
Source defines the previous hop for accessing a role
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