voter

package
v0.0.0-...-fd23dd1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: OSL-3.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const (
	AccessAbstained = iota
	AccessGranted
	AccessDenied
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IsLoggedInVoter

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

func (*IsLoggedInVoter) Inject

func (v *IsLoggedInVoter) Inject(rs role.Service)

func (*IsLoggedInVoter) Vote

func (v *IsLoggedInVoter) Vote(ctx context.Context, session *web.Session, permission string, _ interface{}) int

type RoleVoter

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

func (*RoleVoter) Inject

func (v *RoleVoter) Inject(rs role.Service)

func (*RoleVoter) Vote

func (v *RoleVoter) Vote(ctx context.Context, session *web.Session, permission string, object interface{}) int

type SecurityVoter

type SecurityVoter interface {
	Vote(context.Context, *web.Session, string, interface{}) int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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