authorization

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 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 Attributes

type Attributes struct {
	Actor      string
	APIName    string
	DomainName string
}

Attributes is input for authority to make decision. It can be extended in future if required auth on resources like WorkflowType and TaskList

type Authorizer

type Authorizer interface {
	Authorize(ctx context.Context, attributes *Attributes) (Result, error)
}

Authorizer is an interface for authorization

func NewNopAuthorizer

func NewNopAuthorizer() Authorizer

NewNopAuthorizer creates a no-op authority

type Decision

type Decision int

Decision is enum type for auth decision

const (
	// DecisionDeny means auth decision is deny
	DecisionDeny Decision = iota + 1
	// DecisionAllow means auth decision is allow
	DecisionAllow
)

type Result

type Result struct {
	Decision Decision
}

Result is result from authority.

Jump to

Keyboard shortcuts

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