user

package
v0.0.0-...-c937b9e Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2015 License: MIT Imports: 4 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 {
	Id       bson.ObjectId `json:"id,omitempty" bson:"_id"`
	Nickname string        `json:"nickname"`
	Email    string        `json:"email"`
	Password string        `json:"-"` // password hash in passlib format: $hashAlgo[$values]$hexdigest_hash$
	Avatar   string        `json:"avatar,omitempty"`

	Created time.Time `json:"created,omitempty"`
	Updated time.Time `json:"updated,omitempty"`

	Admin bool `json:"admin" bson:"-"`
}

func (*User) IdStr

func (u *User) IdStr() string

Id in hex

func (*User) IsAdmin

func (u *User) IsAdmin() bool

func (*User) String

func (u *User) String() string

type UserList

type UserList struct {
	pagination.Meta `json:",inline"`
	Results         []*User `json:"results"`
}

Jump to

Keyboard shortcuts

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