voter

package
v2.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: OSL-3.0 Imports: 4 Imported by: 0

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 IsLoggedOutVoter

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

func (*IsLoggedOutVoter) Inject

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

func (*IsLoggedOutVoter) Vote

func (v *IsLoggedOutVoter) 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