user

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: GPL-3.0 Imports: 3 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordUser added in v0.10.0

type PasswordUser struct {
	User
	Password string
}

PasswordUser is a user that contains a user with a password. This type is primarily used in the user store to authenticate or register a user. This reduces the risk of the password getting accidentally to places it does not belong

type User

type User struct {
	DisplayName       string
	Name              string
	Email             string
	RegistrationDate  time.Time
	IsAdmin           bool
	Biography         string
	IsShownPublic     bool
	IsEmailPublic     bool
	ProjectHeaderMode int32
	Image             string
	IsDeactivated     bool
}

The User struct contains information to represent a user in the system Image is a base64 encoded string

func New

func New(display, name, email string, isAdmin bool) User

New creates a new user with the given display name, account name and email address. Returns the created user.

func (*User) Deactivate

func (u *User) Deactivate()

func (User) ID

func (u User) ID() id.ActorID

ID returns the ID struct identifying this user

Jump to

Keyboard shortcuts

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