Documentation
¶
Index ¶
- func NewAssignmentEntitlement(resource *v2.Resource, name string, entitlementOptions ...EntitlementOption) *v2.Entitlement
- func NewEntitlement(resource *v2.Resource, name, purposeStr string, ...) *v2.Entitlement
- func NewEntitlementID(resource *v2.Resource, permission string) string
- func NewOwnershipEntitlement(resource *v2.Resource, name string, entitlementOptions ...EntitlementOption) *v2.Entitlement
- func NewPermissionEntitlement(resource *v2.Resource, name string, entitlementOptions ...EntitlementOption) *v2.Entitlement
- type EntitlementOption
- func WithAnnotation(msgs ...proto.Message) EntitlementOption
- func WithDescription(description string) EntitlementOption
- func WithDisplayName(displayName string) EntitlementOption
- func WithExclusionGroup(exclusionGroupID string) EntitlementOption
- func WithExclusionGroupDefault(exclusionGroupID string, order uint32) EntitlementOption
- func WithExclusionGroupOrder(exclusionGroupID string, order uint32) EntitlementOption
- func WithGrantableTo(grantableTo ...*v2.ResourceType) EntitlementOption
- func WithSlug(slug string) EntitlementOption
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 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