users

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	RID         string          `json:"real-id"`
	EID         string          `json:"enjin-id"`
	Name        string          `json:"name"`
	Email       string          `json:"email"`
	Image       string          `json:"image"`
	Origin      string          `json:"origin"`
	Groups      feature.Groups  `json:"groups"`
	Actions     feature.Actions `json:"actions"`
	Context     context.Context `json:"context"`
	Active      bool            `json:"active"`
	AdminLocked bool            `json:"admin-locked"`
}

func NewUser added in v0.5.6

func NewUser(id, name, email, image string, ctx context.Context) (user *User)

func (*User) Bytes added in v0.5.6

func (u *User) Bytes() (data []byte)

func (*User) Can

func (u *User) Can(actions ...feature.Action) (allowed bool)

func (*User) CanAll

func (u *User) CanAll(actions ...feature.Action) (allowed bool)

func (*User) GetActions

func (u *User) GetActions() (actions feature.Actions)

func (*User) GetActive added in v0.5.6

func (u *User) GetActive() (active bool)

func (*User) GetAdminLocked added in v0.5.6

func (u *User) GetAdminLocked() (locked bool)

func (*User) GetEID added in v0.5.6

func (u *User) GetEID() (eid string)

func (*User) GetEmail added in v0.5.6

func (u *User) GetEmail() (email string)

func (*User) GetGroups

func (u *User) GetGroups() (groups feature.Groups)

func (*User) GetImage added in v0.5.6

func (u *User) GetImage() (image string)

func (*User) GetName added in v0.5.6

func (u *User) GetName() (name string)

func (*User) GetOrigin

func (u *User) GetOrigin() (origin string)

func (*User) GetRID added in v0.5.6

func (u *User) GetRID() (rid string)

func (*User) GetSetting added in v0.5.6

func (u *User) GetSetting(key string) (value interface{})

func (*User) GetSettings added in v0.5.6

func (u *User) GetSettings(limitKeys ...string) (settings context.Context)

func (*User) IsVisitor added in v0.5.6

func (u *User) IsVisitor() (visitor bool)

func (*User) SafeContext added in v0.5.6

func (u *User) SafeContext(includeKeys ...string) (ctx context.Context)

func (*User) UnsafeContext added in v0.5.6

func (u *User) UnsafeContext() (ctx context.Context)

Jump to

Keyboard shortcuts

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