Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListOrString ¶
type ListOrString struct {
Values []string
}
func (*ListOrString) UnmarshalYAML ¶
func (ls *ListOrString) UnmarshalYAML(unmarshal func(interface{}) error) error
type Vendors ¶
type Vendors []struct { Name string `yaml:"name"` Source ListOrString `yaml:"source"` Accounts ListOrString `yaml:"accounts"` }
func NewVendorMap ¶
func NewVendorMap() *Vendors
Function that uses the constructor pattern. You can use this or instantiate your struct without it.
func (*Vendors) GetAccountIdsFromVendorName ¶
GetAccountIdsFromVendorName retrieves the account IDs associated with a specific vendor name. It searches through the Vendors collection and returns a slice of account IDs that match the given vendor name. If no matching vendor name is found, an empty slice is returned.
func (*Vendors) GetVendorNameFromAccountID ¶
GetVendorNameFromAccountID retrieves the vendor name associated with the given account ID. It searches through the Vendors collection and returns the vendor name if a matching account ID is found. If no matching account ID is found, it returns an empty string.
func (*Vendors) PopulateKnownAWSAccounts ¶
func (v *Vendors) PopulateKnownAWSAccounts()
This function downloads the accounts.yaml file from https://raw.githubusercontent.com/fwdcloudsec/known_aws_accounts/main/accounts.yaml and populates the Vendors variable