Documentation
¶
Overview ¶
Package authz defines the authorization interface.
The framework provides only the interface and a function adapter. Concrete implementations (Casbin, OPA, custom logic) are provided by the application or optional sub-packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
type Authorizer interface {
// Authorize checks whether subject may perform action on object.
Authorize(ctx context.Context, subject, object, action string) (bool, error)
}
Authorizer makes authorization decisions.
type AuthorizerFunc ¶
AuthorizerFunc adapts a plain function into an Authorizer.
Click to show internal directories.
Click to hide internal directories.