Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var ( ChangeTypeNew = "NEW" ChangeTypeEqual = "MATCHED" ChangeTypeUpdate = "UPDATE" ChangeTypeDelete = "DELETE" ChangeTypeIgnore = "UNSUPPORTED" )
Functions ¶
This section is empty.
Types ¶
type ActionInfo ¶
type ActionInfo struct {
ActionUri string `validate:"required"`
}
type MetaInfo ¶
type MetaInfo struct { Version string `json:"Version,omitempty" validate:"required"` // this is the idql policy format version SourceData map[string]interface{} `json:",omitempty"` // Logistical information required to map in source provider, e.g. type, identifiers Description string `json:",omitempty"` Created *time.Time `json:",omitempty"` Modified *time.Time `json:",omitempty"` Etag string `json:",omitempty"` PolicyId *string `json:",omitempty"` PapId *string `json:",omitempty"` ProviderType string `json:",omitempty"` }
type ObjectInfo ¶
type ObjectInfo struct {
ResourceID string `json:"resource_id" validate:"required"`
}
type Policies ¶
type Policies struct { Policies []PolicyInfo `json:"policies"` App *string `json:"app,omitempty"` }
func (*Policies) AddPolicies ¶
func (*Policies) AddPolicy ¶
func (p *Policies) AddPolicy(info PolicyInfo)
func (*Policies) CalculateEtags ¶ added in v0.6.1
func (p *Policies) CalculateEtags()
func (*Policies) ReconcilePolicies ¶ added in v0.6.1
func (p *Policies) ReconcilePolicies(comparePolicies []PolicyInfo, diffsOnly bool) []PolicyDif
type PolicyDif ¶ added in v0.6.1
type PolicyDif struct { Type string PolicyId string Hash string DifTypes []string PolicyExist *[]PolicyInfo // for n to 1 PolicyCompare *PolicyInfo }
type PolicyInfo ¶
type PolicyInfo struct { Meta MetaInfo `validate:"required"` Subject SubjectInfo `validate:"required"` Actions []ActionInfo `validate:"required"` Object ObjectInfo `validate:"required"` Condition *conditions.ConditionInfo `json:",omitempty"` // Condition is optional }
func (*PolicyInfo) CalculateEtag ¶ added in v0.6.1
func (p *PolicyInfo) CalculateEtag() string
CalculateEtag calculates an ETAG hash value for the policy which includes the Subject, Actions, Object, and Conditions objects only
func (*PolicyInfo) Compare ¶ added in v0.6.1
func (p *PolicyInfo) Compare(hexaPolicy PolicyInfo) []string
func (*PolicyInfo) Equals ¶ added in v0.6.1
func (p *PolicyInfo) Equals(hexaPolicy PolicyInfo) bool
Equals compares values to determine if the policies are equal. Note: does NOT compare meta information.
func (*PolicyInfo) String ¶ added in v0.6.1
func (p *PolicyInfo) String() string
type PolicyInfoSaurabh ¶ added in v0.6.1
type PolicyInfoSaurabh struct {
Name string
}
type PolicyInfoSaurabhV2 ¶ added in v0.6.1
type PolicyInfoSaurabhV2 struct {
Name string
}
type SubjectInfo ¶
type SubjectInfo struct {
Members []string `validate:"required"`
}
Click to show internal directories.
Click to hide internal directories.