header

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUser

func NewUser(r *http.Request) ident.Ident

NewUser reads user info from http request

Types

type User

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

User implements ident.Ident

func (User) GetAspect

func (m User) GetAspect() string

GetAspect returns aspect

func (User) GetDisplay

func (m User) GetDisplay() string

GetDisplay returns human friendly name

func (User) GetGroups

func (m User) GetGroups() []string

GetGroups returns empty list

func (User) GetIdentity

func (m User) GetIdentity() string

GetIdentity returns username

func (User) GetMeta

func (m User) GetMeta() map[string]string

GetMeta returns empty list

func (User) GetRoles

func (m User) GetRoles() []string

GetRoles returns empty list

func (User) HasGroup

func (m User) HasGroup(g ...string) bool

HasGroup returns bool for tested groups

func (User) HasRole

func (m User) HasRole(r ...string) bool

HasRole returns bool for tested roles

func (User) IsActive

func (m User) IsActive() bool

IsActive returns bool for logged in state

Jump to

Keyboard shortcuts

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