users

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: MIT Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(id string) bool

func LoadUsersData

func LoadUsersData()

func SaveUsersData

func SaveUsersData()

Types

type User

type User struct {
	ID               string `json:"id"`
	DisplayName      string `json:"displayName"`
	Login            string `json:"login"`
	Role             string `json:"role"`
	CreatedAt        int64  `json:"createdAt"`
	LastDisconection int64  `json:"lastDisconnection"`
	PasswordHash     string `json:"passwordHash"`
	PasswordSalt     string `json:"passwordSalt"`
}

func GetAll

func GetAll() []*User

func GetByID

func GetByID(id string) *User

func GetByLogin

func GetByLogin(login string) *User

func New

func New(displayName, login, hash, salt string) *User

type UsersData

type UsersData struct {
	Users []*User `json:"users"`
}

Jump to

Keyboard shortcuts

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