authorization

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionJobsRead    = "jobs_read"
	ActionJobsWrite   = "jobs_write"
	ActionJobsDelete  = "jobs_delete"
	ActionJobsTrigger = "jobs_trigger"
	ActionRunsRead    = "runs_read"
	ActionKeysRead    = "keys_read"
	ActionKeysWrite   = "keys_write"
)

Variables

View Source
var ErrForbidden = errors.New("forbidden")

Functions

This section is empty.

Types

type Authorizer

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

func NewAuthorizer

func NewAuthorizer() (*Authorizer, error)

func (*Authorizer) Require

func (a *Authorizer) Require(principal *auth.Principal, action string, resource Resource) error

type Resource

type Resource struct {
	TenantID *uuid.UUID
	OwnerID  *string
}

Jump to

Keyboard shortcuts

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