access

package
v1.0.0-...-34f284f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IGate

type IGate interface {
	WithContext(ctx context.Context) IGate
	Allows(ability string, arguments map[string]any) bool
	Denies(ability string, arguments map[string]any) bool
	Inspect(ability string, arguments map[string]any) IResponse
	Define(ability string, callback func(ctx context.Context, arguments map[string]any) IResponse)
	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) IResponse)
	After(callback func(ctx context.Context, ability string, arguments map[string]any, result IResponse) IResponse)
}

type IResponse

type IResponse interface {
	Allowed() bool
	Message() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL