libertymodel

package
v0.0.0-...-cde4198 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2016 License: MPL-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUser

func GetUser(repo *himeji.Himeji, uid string, result *himeji.Data) <-chan bool

func GetUserByUsername

func GetUserByUsername(repo *himeji.Himeji, username string, result *himeji.Data) <-chan bool

func StoreUser

func StoreUser(repo *himeji.Himeji, user *himeji.Data) <-chan bool

Types

type ModelUser

type ModelUser struct {
	Uid
	UserInfo
	UserProps
	UserSecurity
	UserPermissions
}

type PostUser

type PostUser struct {
	UserInfo
	UserPassword
}

type PrivateUser

type PrivateUser struct {
	Email string `json:"email" bson:"email"`
}

type PublicUser

type PublicUser struct {
	UserId
	Name string `json:"name" bson:"name"`
}

type RequestPostUser

type RequestPostUser struct {
	Value PostUser `json:"data"`
}

func GetRequestPostUser

func GetRequestPostUser(c echo.Context) *RequestPostUser

type RequestPublicUser

type RequestPublicUser struct {
	Value PublicUser `json:"data"`
}

type RequestUserInfo

type RequestUserInfo struct {
	Value UserInfo `json:"data"`
}

func GetRequestUserInfo

func GetRequestUserInfo(c echo.Context) *RequestUserInfo

type RequestUserPassword

type RequestUserPassword struct {
	Value UserPassword `json:"data"`
}

func GetRequestUserPassword

func GetRequestUserPassword(c echo.Context) *RequestUserPassword

type Uid

type Uid struct {
	Id string `json:"id" bson:"_id"`
}

type UserDate

type UserDate struct {
	DateCreated int64 `json:"date-created" bson:"date-created"`
}

type UserId

type UserId struct {
	Username string `json:"username" bson:"username"`
}

type UserInfo

type UserInfo struct {
	PublicUser
	PrivateUser
}

type UserPassword

type UserPassword struct {
	Password string `json:"password"`
}

type UserPermissions

type UserPermissions struct {
	AccessLevel uint8   `json:"accesslevel" bson:"accesslevel"`
	AccessTags  []uint8 `json:"accesstags" bson:"accesstags"`
}

type UserProps

type UserProps struct {
	UserDate
}

type UserSecurity

type UserSecurity struct {
	Hash []byte `json:"hash" bson:"hash"`
	Salt []byte `json:"salt" bson:"salt"`
}

Jump to

Keyboard shortcuts

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