Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gate ¶
type Gate interface {
WithContext(ctx context.Context) Gate
Allows(ability string, arguments map[string]any) bool
Denies(ability string, arguments map[string]any) bool
Inspect(ability string, arguments map[string]any) *Response
Define(ability string, callback func(ctx context.Context, arguments map[string]any) *Response)
Any(abilities []string, arguments map[string]any) bool
None(abilities []string, arguments map[string]any) bool
Before(callback func(ctx context.Context, ability string, arguments map[string]any) *Response)
After(callback func(ctx context.Context, ability string, arguments map[string]any, result *Response) *Response)
}
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func NewAllowResponse ¶
func NewAllowResponse() *Response
func NewDenyResponse ¶
Click to show internal directories.
Click to hide internal directories.