rar

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 CompactMembers(existing, new []string) []string

func FlattenPolicy

func FlattenPolicy(origPolicies []hexapolicy.PolicyInfo) []hexapolicy.PolicyInfo

func MakeRarKeyForPolicy

func MakeRarKeyForPolicy(actionUri, resource string) string

MakeRarKeyForPolicy convert policy actionUri to rarKey e.g. "resrol-httpget-humanresources-us"

func SanitizeMembers

func SanitizeMembers(members []string) []string

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) Name

func (nv ResourceActionRoles) Name() string

Name see makeRarKey

func (ResourceActionRoles) Value

func (nv ResourceActionRoles) Value() string

Value returns a json string representing the roles array

Directories

Path Synopsis
tools
Package tools provides utilities for tests.
Package tools provides utilities for tests.

Jump to

Keyboard shortcuts

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