Versions in this module Expand all Collapse all v0 v0.0.6 Sep 25, 2019 v0.0.5 Aug 23, 2019 v0.0.4 Jul 11, 2019 Changes in this version + func UpdateAccountProfile(id int64, opt *Option) error type Account + Password string + type Option struct + Avatar string + Description string + Name string v0.0.3 Dec 26, 2018 v0.0.2 Dec 25, 2018 v0.0.1 Dec 25, 2018 Changes in this version + const EmailHostEnv + const EmailPasswordEnv + const EmailUserEnv + func AdminNodeTypes() (*types.ResultNodeTypes, error) + func CreateAdminNodeType(opt *adminNodeTypeOption) error + func LoginAuth(username, password string) smtp.Auth + func NewOption(fs ...SetOption) (*option, error) + func SendToMail(user, password, host, to, subject, body, mailtype, replyToAddress string) error + type Account struct + Avatar string + CreatedAt time.Time + Description string + ID int64 + Mail string + Name string + Status int64 + func CreateAccount(mail, password string) (*Account, error) + func List(offset, limit int64) ([]*Account, error) + func RetrieveAccountByID(id int64) (*Account, error) + func RetrieveAccountByMail(mail string) (*Account, error) + func (a *Account) CreateApp(name string) (*App, error) + func (a *Account) CreateSession(loginType int64, expire time.Duration) (string, error) + func (a *Account) DeleteAppByID(id int64) error + func (a *Account) DeleteSession() error + func (a *Account) RetrieveAppByID(id int64) (*App, error) + func (a *Account) UpdatePassword(pwd string) error + func (a *Account) UpdateProfile(opt *option) error + func (a Account) Apps() ([]*App, error) + func (a Account) CheckPassword(pwd string) bool + type App struct + AccountID int64 + ID int64 + Name string + SecretKey string + Status int64 + func AppBySecretKey(secretKey string) (*App, error) + func (app App) Account() (*Account, error) + type SetOption func(option *option) error + func SetAvatar(avatar string) SetOption + func SetDescription(description string) SetOption + func SetName(name string) SetOption + type Token struct + AccountID int64 + ExpiredAt time.Time + LoginType int64 + Token string + func RetrieveToken(token string) (*Token, error) + func (t Token) Account() (*Account, error)