types

package
v2.14.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReferenceType          = "reference"
	PolicyLevelAccount     = "account"
	PolicyLevelEnvironment = "environment"
)
View Source
const (
	KeyUsers    string = "users"
	KeyGroups   string = "groups"
	KeyPolicies string = "policies"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Permissions []string       `yaml:"permissions,omitempty" json:"permissions,omitempty" jsonschema:"description=Permissions for the whole account."`
	Policies    ReferenceSlice `yaml:"policies,omitempty" json:"policies,omitempty" jsonschema:"description=Policies for the whole account."`
}

type Environment

type Environment struct {
	Name        string         `yaml:"environment" json:"environment" jsonschema:"required,description=Name/identifier of the environment."`
	Permissions []string       `yaml:"permissions,omitempty" json:"permissions,omitempty" jsonschema:"description=Permissions for this environment."`
	Policies    ReferenceSlice `yaml:"policies,omitempty" json:"policies,omitempty" jsonschema:"description=Policies for this environment."`
}

type File

type File struct {
	Policies []Policy `yaml:"policies,omitempty" json:"policies,omitempty" jsonschema:"description=Policies to configure for this account."`
	Groups   []Group  `yaml:"groups,omitempty" json:"groups,omitempty" jsonschema:"description=Groups to configure for this account."`
	Users    []User   `yaml:"users,omitempty" json:"users,omitempty" jsonschema:"description=Users to configure for this account."`
}

type Group

type Group struct {
	ID                       string   `` /* 147-byte string literal not displayed */
	Name                     string   `yaml:"name" json:"name" jsonschema:"required,description=The name of this group."`
	Description              string   `yaml:"description,omitempty" json:"description,omitempty" jsonschema:"A description of this group."`
	FederatedAttributeValues []string `` /* 138-byte string literal not displayed */
	// Account level permissions and policies that apply to users in this group
	Account *Account `` /* 148-byte string literal not displayed */
	// Environment level permissions and policies that apply to users in this group
	Environment []Environment `` /* 162-byte string literal not displayed */
	// ManagementZone level permissions that apply to users in this group
	ManagementZone []ManagementZone `` /* 158-byte string literal not displayed */
	OriginObjectID string           `` /* 237-byte string literal not displayed */
}

type ManagementZone

type ManagementZone struct {
	Environment    string   `` /* 133-byte string literal not displayed */
	ManagementZone string   `yaml:"managementZone" json:"managementZone" jsonschema:"required,description=Identifier of the management zone."`
	Permissions    []string `yaml:"permissions" json:"permissions" jsonschema:"required,description=Permissions for this management zone."`
}

type Policy

type Policy struct {
	ID             string      `` /* 148-byte string literal not displayed */
	Name           string      `yaml:"name" json:"name" jsonschema:"required,description=The name of this policy."`
	Level          PolicyLevel `yaml:"level" json:"level" jsonschema:"required,description=The level this policy applies to."`
	Description    string      `yaml:"description,omitempty" json:"description,omitempty" jsonschema:"A description of this policy."`
	Policy         string      `yaml:"policy" json:"policy" jsonschema:"required,description=The policy definition."`
	OriginObjectID string      `` /* 238-byte string literal not displayed */
}

type PolicyLevel

type PolicyLevel struct {
	Type        string `` /* 277-byte string literal not displayed */
	Environment string `` /* 155-byte string literal not displayed */
}

type Reference

type Reference struct {
	Type  string `yaml:"type" json:"type" mapstructure:"type" jsonschema:"enum=reference"`
	Id    string `yaml:"id" json:"id" mapstructure:"id" jsonschema:"description=The 'id' of the account configuration being referenced."`
	Value string `yaml:"-" json:"-" mapstructure:"-"` // omitted from being written/read
}

func (Reference) MarshalYAML

func (r Reference) MarshalYAML() (interface{}, error)

MarshalYAML is a custom yaml.Marshaler for Reference, able to write simple string values and actual references. As it is called when marshalling Reference values, it has a value receiver.

func (*Reference) UnmarshalYAML

func (r *Reference) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML is a custom yaml.Unmarshaler for Reference able to parse simple string values and actual references. As it unmarshalls data into the Reference r, it has a pointer receiver.

type ReferenceSlice added in v2.10.0

type ReferenceSlice []Reference

func (ReferenceSlice) JSONSchema added in v2.10.0

func (_ ReferenceSlice) JSONSchema() *jsonschema.Schema

JSONSchema defines a custom schema definition for ReferenceSlice as it contains either Reference objects or strings when being parsed, but our schema generator can not resolve such a nested "one-of" relation correctly for slices

type Resources

type Resources struct {
	Policies map[string]Policy
	Groups   map[string]Group
	Users    map[string]User
}

type User

type User struct {
	Email  secret.Email   `yaml:"email" json:"email" jsonschema:"required,description=Email address of this user."`
	Groups ReferenceSlice `` /* 178-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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