access

package
v0.0.0-...-4ca5139 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gate

type Gate struct {
	// contains filtered or unexported fields
}

func NewGate

func NewGate(ctx context.Context) *Gate

func (*Gate) After

func (r *Gate) After(callback func(ctx context.Context, ability string, arguments map[string]any, result access.Response) access.Response)

func (*Gate) Allows

func (r *Gate) Allows(ability string, arguments map[string]any) bool

func (*Gate) Any

func (r *Gate) Any(abilities []string, arguments map[string]any) bool

func (*Gate) Before

func (r *Gate) Before(callback func(ctx context.Context, ability string, arguments map[string]any) access.Response)

func (*Gate) Define

func (r *Gate) Define(ability string, callback func(ctx context.Context, arguments map[string]any) access.Response)

func (*Gate) Denies

func (r *Gate) Denies(ability string, arguments map[string]any) bool

func (*Gate) Inspect

func (r *Gate) Inspect(ability string, arguments map[string]any) access.Response

func (*Gate) None

func (r *Gate) None(abilities []string, arguments map[string]any) bool

func (*Gate) WithContext

func (r *Gate) WithContext(ctx context.Context) access.Gate

Jump to

Keyboard shortcuts

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