entitlement

package
v0.9.14 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 147

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAssignmentEntitlement

func NewAssignmentEntitlement(resource *v2.Resource, name string, entitlementOptions ...EntitlementOption) *v2.Entitlement

func NewEntitlement added in v0.3.9

func NewEntitlement(resource *v2.Resource, name, purposeStr string, entitlementOptions ...EntitlementOption) *v2.Entitlement

func NewEntitlementID

func NewEntitlementID(resource *v2.Resource, permission string) string

func NewOwnershipEntitlement added in v0.6.17

func NewOwnershipEntitlement(resource *v2.Resource, name string, entitlementOptions ...EntitlementOption) *v2.Entitlement

func NewPermissionEntitlement

func NewPermissionEntitlement(resource *v2.Resource, name string, entitlementOptions ...EntitlementOption) *v2.Entitlement

Types

type EntitlementOption

type EntitlementOption func(*v2.Entitlement)

func WithAnnotation

func WithAnnotation(msgs ...proto.Message) EntitlementOption

func WithDescription

func WithDescription(description string) EntitlementOption

func WithDisplayName

func WithDisplayName(displayName string) EntitlementOption

func WithExclusionGroup added in v0.9.12

func WithExclusionGroup(exclusionGroupID string) EntitlementOption

WithExclusionGroup marks this entitlement as belonging to a mutually exclusive group. Two entitlements on the same resource with the same exclusionGroupID cannot be simultaneously granted to the same principal.

func WithExclusionGroupDefault added in v0.9.12

func WithExclusionGroupDefault(exclusionGroupID string, order uint32) EntitlementOption

WithExclusionGroupDefault marks this entitlement as the default for a mandatory exclusion group. When another entitlement in the group is revoked without an explicit replacement, this entitlement is granted as the fallback.

Setting is_default on any entitlement in a group signals to ConductorOne that the group is mandatory (a principal must always hold exactly one).

func WithExclusionGroupOrder added in v0.9.12

func WithExclusionGroupOrder(exclusionGroupID string, order uint32) EntitlementOption

WithExclusionGroupOrder is like WithExclusionGroup but also sets an ordering hint. Higher order values indicate higher privilege levels.

func WithGrantableTo

func WithGrantableTo(grantableTo ...*v2.ResourceType) EntitlementOption

func WithSlug added in v0.6.19

func WithSlug(slug string) EntitlementOption

Jump to

Keyboard shortcuts

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