Documentation ¶
Overview ¶
Package user contains the type definitions for user accounts and the user server interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AccountNotFound = errors.New("Account not found")
Functions ¶
Types ¶
type Account ¶
type Account struct { Name Name UILocale string MainLanguage language.Code Email string Active bool PasswordHash []byte }
func NewAccount ¶
func NewAccount(r *NewAccountRequest) *Account
type NewAccountRequest ¶
type Server ¶
type Server interface { NewAccount(r *NewAccountRequest) (*Account, error) GetAccount(n Name) (*Account, error) GetAccountByEmail(email string) (*Account, error) UpdateAccount(a *Account) error NewToken(n Name) (string, error) ValidToken(n Name, token string) (bool, error) DeleteToken(n Name, token string) error }
Server is the interface a user server should comply to.
Directories ¶
Path | Synopsis |
---|---|
Package password provides password hashing and password checks.
|
Package password provides password hashing and password checks. |
Package rpc provides the rpc user client used by the Polyglottis Application and a simple user server wrapper.
|
Package rpc provides the rpc user client used by the Polyglottis Application and a simple user server wrapper. |
Click to show internal directories.
Click to hide internal directories.