Documentation ¶
Index ¶
- Constants
- func BuildPolicies(resourceActionRolesList []ResourceActionRoles) []hexapolicy.PolicyInfo
- func CompactActions(existing, new []hexapolicy.ActionInfo) []hexapolicy.ActionInfo
- func CompactMembers(existing, new []string) []string
- func FlattenPolicy(origPolicies []hexapolicy.PolicyInfo) []hexapolicy.PolicyInfo
- func MakeRarKeyForPolicy(actionUri, resource string) string
- func SanitizeMembers(members []string) []string
- type ResourceActionRoles
- func CalcResourceActionRolesForUpdate(existing []ResourceActionRoles, policyInfos []hexapolicy.PolicyInfo) []ResourceActionRoles
- func NewResourceActionRoles(resource, httpMethod string, roles []string) ResourceActionRoles
- func NewResourceActionRolesFromProviderValue(resActionKey string, roles []string) ResourceActionRoles
- func NewResourceActionUriRoles(resource, actionUri string, roles []string) ResourceActionRoles
Constants ¶
View Source
const ActionUriPrefix = "http:"
Variables ¶
This section is empty.
Functions ¶
func BuildPolicies ¶
func BuildPolicies(resourceActionRolesList []ResourceActionRoles) []hexapolicy.PolicyInfo
func CompactActions ¶
func CompactActions(existing, new []hexapolicy.ActionInfo) []hexapolicy.ActionInfo
func CompactMembers ¶
func FlattenPolicy ¶
func FlattenPolicy(origPolicies []hexapolicy.PolicyInfo) []hexapolicy.PolicyInfo
func MakeRarKeyForPolicy ¶
MakeRarKeyForPolicy convert policy actionUri to rarKey e.g. "resrol-httpget-humanresources-us"
func SanitizeMembers ¶
Types ¶
type ResourceActionRoles ¶
type ResourceActionRoles struct { Action string // http method e.g GET Resource string Roles []string }
func CalcResourceActionRolesForUpdate ¶
func CalcResourceActionRolesForUpdate(existing []ResourceActionRoles, policyInfos []hexapolicy.PolicyInfo) []ResourceActionRoles
CalcResourceActionRolesForUpdate Builds ResourceActionRoles that need to be updated only for those policies that match an existing resource action. If existing is empty, returns empty slice If policyInfos is empty, returns empty slice
func NewResourceActionRoles ¶
func NewResourceActionRoles(resource, httpMethod string, roles []string) ResourceActionRoles
func NewResourceActionRolesFromProviderValue ¶
func NewResourceActionRolesFromProviderValue(resActionKey string, roles []string) ResourceActionRoles
NewResourceActionRolesFromProviderValue Build ResourceActionRoles from resAction, roles from provider
func NewResourceActionUriRoles ¶
func NewResourceActionUriRoles(resource, actionUri string, roles []string) ResourceActionRoles
func (ResourceActionRoles) Value ¶
func (nv ResourceActionRoles) Value() string
Value returns a json string representing the roles array
Source Files ¶
Click to show internal directories.
Click to hide internal directories.