Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EID ¶
type EID struct { // Type of the entity. // e.g. in GCP::Project::dev // it is 'GCP::Project' Type string `json:"type"` // ID of the entity. // e.g. in GCP::Project::dev // it is 'dev' ID string `json:"id"` }
EID is a unique identifier for an entity which includes both it's type and ID.
e.g. 'GCP::Project::dev'
func FromAPI ¶
func FromAPI(eid *entityv1alpha1.EID) EID
func Parse ¶
Parse extracts a EID from the input string. Unlike Cedar policies, we accept EIDs without mandatory double quotes around the ID component.
For example: AWS::Account::123456789012 is a valid Common Fate EID, but is an invalid Cedar EID.
We are more relaxed about parsing because nearly all of our EIDs do not contain any whitespace, so it saves users having to type additional quote characters when using our CLI.
If the ID component of the EID contains any whitespace it must be enclosed in double quotes.
func (EID) ToAPI ¶
func (u EID) ToAPI() *entityv1alpha1.EID
func (EID) ToSpecifier ¶
func (u EID) ToSpecifier() *accessv1alpha1.Specifier
ToSpecifier returns a Specifier which will match the EID.