Documentation
¶
Overview ¶
Package adminapi exposes reusable HTTP handlers for authz administration UIs.
Index ¶
- func NewHandler(options Options) (http.Handler, error)
- type AttributePolicy
- type Authorizer
- type Capability
- type Decision
- type DecisionRequest
- type Declarations
- type Model
- type Options
- type Policy
- type PolicyRule
- type Principal
- type PrincipalResolver
- type ProjectionInputs
- type Provider
- type RelationCheck
- type RelationTuple
- type ResourceDeclaration
- type Role
- type RoleAssignment
- type Route
- type RouteCatalog
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttributePolicy ¶
type Authorizer ¶
type Capability ¶
type DecisionRequest ¶
type Declarations ¶
type Declarations struct {
Resources []ResourceDeclaration `json:"resources,omitempty"`
}
type Options ¶
type Options struct {
BasePath string
PrincipalResolver PrincipalResolver
Authorizer Authorizer
Provider Provider
}
type PolicyRule ¶
type PrincipalResolver ¶
type ProjectionInputs ¶
type Provider ¶
type Provider interface {
Roles(context.Context, Principal) ([]Role, error)
UpsertRole(context.Context, Principal, RoleAssignment) error
DeleteRole(context.Context, Principal, RoleAssignment) error
Scopes(context.Context, Principal) ([]Scope, error)
Capabilities(context.Context, Principal) ([]Capability, error)
Declarations(context.Context, Principal) (Declarations, error)
ProjectionInputs(context.Context, Principal) (ProjectionInputs, error)
Model(context.Context, Principal) (Model, error)
Policies(context.Context, Principal) ([]Policy, error)
UpsertPolicy(context.Context, Principal, PolicyRule) error
DeletePolicy(context.Context, Principal, PolicyRule) error
AttributePolicies(context.Context, Principal) ([]AttributePolicy, error)
UpsertAttributePolicy(context.Context, Principal, AttributePolicy) error
DeleteAttributePolicy(context.Context, Principal, AttributePolicy) error
RelationTuples(context.Context, Principal) ([]RelationTuple, error)
UpsertRelationTuple(context.Context, Principal, RelationTuple) error
DeleteRelationTuple(context.Context, Principal, RelationTuple) error
CheckRelation(context.Context, Principal, RelationCheck) (Decision, error)
Enforce(context.Context, Principal, DecisionRequest) (Decision, error)
}
type RelationCheck ¶
type RelationTuple ¶
type ResourceDeclaration ¶
type RoleAssignment ¶
type RouteCatalog ¶
func DefaultRoutes ¶
func DefaultRoutes() RouteCatalog
func RoutesForBasePath ¶
func RoutesForBasePath(basePath string) RouteCatalog
Click to show internal directories.
Click to hide internal directories.