Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorReadingBody = errors.New("failed to read message body") ErrorParsingBody = errors.New("failed to parse json body") )
A list of errors returned from package
Functions ¶
This section is empty.
Types ¶
type Bundle ¶ added in v0.5.0
type Bundle map[string]EntityIDToPolicies
Bundle is the optimised lookup table for permissions.
type BundlePolicy ¶ added in v0.5.0
type BundlePolicy struct {
ID string `bson:"_id" json:"id,omitempty"`
Entities []string `bson:"entities" json:"-"`
Role string `bson:"role" json:"-"`
Conditions []Condition `bson:"conditions" json:"conditions,omitempty"`
}
BundlePolicy represents a policy tailored for the permissions bundle. The permissions bundle json does not include the entities and role fields.
type EntityIDToPolicies ¶ added in v0.5.0
type EntityIDToPolicies map[string][]*BundlePolicy
EntityIDToPolicies maps an entity ID to a slice of policies.
type NewPolicy ¶ added in v0.5.0
type NewPolicy struct {
Entities []string `json:"entities"`
Role string `json:"role"`
Conditions []Condition `json:"conditions,omitempty"`
}
func CreateNewPolicy ¶ added in v0.5.0
CreateNewPolicy manages the creation of a filter from reader
func (*NewPolicy) ValidateNewPolicy ¶ added in v0.5.0
ValidateNewPolicy checks that all the mandatory fields are non-empty
Click to show internal directories.
Click to hide internal directories.