principal

package
v0.30.22 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(subject security.Subject, ps ...security.Principal) bool

All return true if the subject possess all principals.

func Any

func Any(subject security.Subject, ps ...security.Principal) bool

Any return true if the subject possess any principals.

Types

type Group

type Group string

Group organizes users having common capabilities. i.e. admin

func (*Group) InitWithTag added in v0.30.6

func (g *Group) InitWithTag(tag reflect.StructTag) error

func (Group) Name added in v0.30.6

func (g Group) Name() string

type Id

type Id string

Id represents the identity of a subject. i.e. user

func (*Id) InitWithTag added in v0.30.6

func (i *Id) InitWithTag(tag reflect.StructTag) error

func (Id) Name added in v0.30.6

func (i Id) Name() string

type Role

type Role string

Role represents a certain level of authorization. i.e. operator

func (*Role) InitWithTag added in v0.30.6

func (r *Role) InitWithTag(tag reflect.StructTag) error

func (Role) Name added in v0.30.6

func (r Role) Name() string

type User

type User string

User identifies a username or account name. i.e. test1

func (*User) InitWithTag added in v0.30.6

func (u *User) InitWithTag(tag reflect.StructTag) error

func (User) Name added in v0.30.6

func (u User) Name() string

Jump to

Keyboard shortcuts

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