Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIdFieldMissing = errors.New("no ref id field found")
View Source
var ErrIdFieldNoString = errors.New("ref id field is not a string")
View Source
var ErrRefMissing = errors.New("no referenced target found")
Functions ¶
func Validate ¶
func Validate(res *AMResources) error
Validate checks the references in the provided AMResources instance to ensure that all referenced groups and policies exist. It iterates through the users, environment policies, and account policies, validating their references.
Types ¶
type AMResources ¶
type AMResources struct {
Policies map[string]Policy
Groups map[string]Group
Users map[string]User
}
func Load ¶
func Load(fs afero.Fs, rootPath string) (*AMResources, error)
Load loads account management resources from YAML configuration files located within the specified root directory path. It parses the YAML files, extracts policies, groups, and users data, and organizes them into a AMResources struct, which is then returned.
func (*AMResources) GroupExists ¶
func (a *AMResources) GroupExists(id string) bool
func (*AMResources) PolicyExists ¶
func (a *AMResources) PolicyExists(id string) bool
type Environment ¶
type Group ¶
type Group struct {
ID string `mapstructure:"id"`
Name string `mapstructure:"name"`
Description string `mapstructure:"description"`
Account *Account `mapstructure:"account"`
Environment []Environment `mapstructure:"environment"`
ManagementZone []ManagementZone `mapstructure:"managementZone" yaml:"managementZone"`
}
type ManagementZone ¶
type PolicyLevelAccount ¶
type PolicyLevelAccount struct {
Type string `mapstructure:"type"`
}
type PolicyLevelEnvironment ¶
Click to show internal directories.
Click to hide internal directories.