Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access struct { ResourceDefinitions []ResourceDefinition `json:"resourceDefinitions,omitempty"` Permission string `json:"permission"` }
Access represents a permission and an optional resource definition
func (Access) Application ¶
Application returns the name of the application in the permission
type AccessList ¶
type AccessList []Access
AccessList is a slice of Accesses and is generally used to represent a principal's full set of permissions for an application
func (AccessList) IsAllowed ¶
func (l AccessList) IsAllowed(app, res, verb string) bool
IsAllowed returns whether an action against a resource is allowed by an AccessList taking wildcards into consideration TODO: Take resource definitions into account
type Client ¶
Client is used for making requests to the RBAC service
type PaginatedBody ¶
type PaginatedBody struct { Meta PaginationMeta `json:"meta"` Links PaginationLinks `json:"links"` Data interface{} `json:"data"` }
PaginatedBody represents the response body format from the RBAC service
type PaginationLinks ¶
type PaginationLinks struct { First string `json:"first"` Next string `json:"next"` Previous string `json:"previous"` Last string `json:"last"` }
PaginationLinks provides links to additional pages of response data
type PaginationMeta ¶
type PaginationMeta struct { Count int `json:"count"` Limit int `json:"limit"` Offset int `json:"offset"` }
PaginationMeta contains metadata for pagination
type ResourceDefinition ¶
type ResourceDefinition struct {
Filter ResourceDefinitionFilter `json:"attributeFilter"`
}
ResourceDefinition limits an Access to specific resources
type ResourceDefinitionFilter ¶
type ResourceDefinitionFilter struct { Key string `json:"key"` Operation string `json:"operation"` Value string `json:"value"` }
ResourceDefinitionFilter represents the key/values used for filtering