policy

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 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 Allowed

type Allowed struct{}

type Decision

type Decision interface {
	// contains filtered or unexported methods
}

func AllowAll

func AllowAll(ctx context.Context, attrs map[string]string) Decision

func Check

func Check(r Registry, ctx context.Context, action string, attrs map[string]string) Decision

type Denied

type Denied struct {
	Reason string
}

type Registry

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

func New

func New() Registry

func Register

func Register(r Registry, action string, rule Rule) Registry

type RequiresApproval

type RequiresApproval struct {
	ToUser string
	TTL    int
}

type Rule

type Rule = func(context.Context, map[string]string) Decision

func DenyAll

func DenyAll(reason string) Rule

Jump to

Keyboard shortcuts

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