user

package
v0.9.68 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminGet

func AdminGet(u *Users) (err error)

func Initialize

func Initialize() (err error)

Types

type User

type User struct {
	Uuid         string      `bson:"uuid" json:"uuid"`
	Username     string      `bson:"username" json:"username"`
	Fullname     string      `bson:"fullname" json:"fullname"`
	Email        string      `bson:"email" json:"email"`
	Password     string      `bson:"password" json:"-"`
	Admin        bool        `bson:"admin" json:"admin"`
	CustomFields interface{} `bson:"custom_fields" json:"custom_fields"`
}

User struct

func FindByUsernamePassword

func FindByUsernamePassword(username string, password string) (u *User, err error)

func FindByUuid

func FindByUuid(uuid string) (u *User, err error)

func New

func New(username string, password string, isAdmin bool) (u *User, err error)

func (*User) Save

func (u *User) Save() (err error)

func (*User) SetMongoInfo added in v0.9.3

func (u *User) SetMongoInfo() (err error)

type Users

type Users []User

Array of User

Jump to

Keyboard shortcuts

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