Documentation
¶
Overview ¶
Package types exposes domain types for permissions-api.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶ added in v0.1.4
type Condition struct { RoleBinding *ConditionRoleBinding RelationshipAction *ConditionRelationshipAction }
Condition represents a required condition for performing an action.
type ConditionRelationshipAction ¶ added in v0.1.4
ConditionRelationshipAction represents a condition where an action must be able to be performed on another resource along a relation to perform an action.
type ConditionRoleBinding ¶ added in v0.1.4
type ConditionRoleBinding struct{}
ConditionRoleBinding represents a condition where a role binding is necessary to perform an action.
type Relationship ¶
Relationship represents a named association between a resource and a subject.
type Resource ¶
type Resource struct { Type string ID gidx.PrefixedID }
Resource is the object to be acted upon by an subject
type ResourceType ¶
type ResourceType struct { Name string IDPrefix string Relationships []ResourceTypeRelationship Actions []Action }
ResourceType defines a type of resource managed by the api
type ResourceTypeRelationship ¶
ResourceTypeRelationship is a relationship for a resource type.
type Role ¶
type Role struct { ID gidx.PrefixedID Name string Actions []string ResourceID gidx.PrefixedID CreatedBy gidx.PrefixedID UpdatedBy gidx.PrefixedID CreatedAt time.Time UpdatedAt time.Time }
Role is a collection of permissions.