Documentation ¶
Index ¶
- type Assignments
- type BindAssignment
- type GooglePolicyMapper
- func (m *GooglePolicyMapper) MapBindingAssignmentToPolicy(bindAssignment BindAssignment) ([]hexapolicy.PolicyInfo, error)
- func (m *GooglePolicyMapper) MapBindingAssignmentsToPolicy(bindAssignments []*BindAssignment) ([]hexapolicy.PolicyInfo, error)
- func (m *GooglePolicyMapper) MapBindingToPolicy(objectId string, binding iam.Binding) (hexapolicy.PolicyInfo, error)
- func (m *GooglePolicyMapper) MapPoliciesToBindings(policies []hexapolicy.PolicyInfo) []*BindAssignment
- func (m *GooglePolicyMapper) MapPolicyToBinding(policy hexapolicy.PolicyInfo) (*iam.Binding, error)
- func (m *GooglePolicyMapper) Name() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assignments ¶
type Assignments struct {
BindAssignments []*BindAssignment
}
func (*Assignments) UnmarshalJSON ¶
func (d *Assignments) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type BindAssignment ¶
type BindAssignment struct { ResourceId string `json:"resource_id"` Bindings []iam.Binding `json:"bindings"` }
BindAssignment is an array of GCP Bindings combined with a resource identifier.
func ParseBindings ¶
func ParseBindings(bindingBytes []byte) ([]*BindAssignment, error)
ParseBindings will read either an iam.Binding or GcpBindAssignment structure and returns a []*GcpBindAssignment type. Note that if a single binding is provided, the GcpBindAssignment.ResourceId value will be nil
func ParseFile ¶
func ParseFile(path string) ([]*BindAssignment, error)
ParseFile will load a file from the specified path and will auto-detect format and convert to GcpBindAssignment. See ParseBindings
type GooglePolicyMapper ¶
type GooglePolicyMapper struct {
// contains filtered or unexported fields
}
func New ¶
func New(nameMap map[string]string) *GooglePolicyMapper
func (*GooglePolicyMapper) MapBindingAssignmentToPolicy ¶
func (m *GooglePolicyMapper) MapBindingAssignmentToPolicy(bindAssignment BindAssignment) ([]hexapolicy.PolicyInfo, error)
func (*GooglePolicyMapper) MapBindingAssignmentsToPolicy ¶
func (m *GooglePolicyMapper) MapBindingAssignmentsToPolicy(bindAssignments []*BindAssignment) ([]hexapolicy.PolicyInfo, error)
func (*GooglePolicyMapper) MapBindingToPolicy ¶
func (m *GooglePolicyMapper) MapBindingToPolicy(objectId string, binding iam.Binding) (hexapolicy.PolicyInfo, error)
func (*GooglePolicyMapper) MapPoliciesToBindings ¶
func (m *GooglePolicyMapper) MapPoliciesToBindings(policies []hexapolicy.PolicyInfo) []*BindAssignment
func (*GooglePolicyMapper) MapPolicyToBinding ¶
func (m *GooglePolicyMapper) MapPolicyToBinding(policy hexapolicy.PolicyInfo) (*iam.Binding, error)
func (*GooglePolicyMapper) Name ¶
func (m *GooglePolicyMapper) Name() string
Click to show internal directories.
Click to hide internal directories.