Documentation ¶
Overview ¶
Package pkg comments for pkg account account 管理后台相关功能
Index ¶
- Constants
- 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
- func (a Account) Apps() ([]*App, error)
- func (a Account) CheckPassword(pwd string) bool
- 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
- type App
- type SetOption
- type Token
Constants ¶
View Source
const ( EmailHostEnv = "EmailHost" EmailUserEnv = "EmailUser" EmailPasswordEnv = "EmailPassword" )
Variables ¶
This section is empty.
Functions ¶
func AdminNodeTypes ¶
func AdminNodeTypes() (*types.ResultNodeTypes, error)
func CreateAdminNodeType ¶
func CreateAdminNodeType(opt *adminNodeTypeOption) error
func SendToMail ¶
Types ¶
type Account ¶
type Account struct { ID int64 `json:"id"` Mail string `json:"mail"` // mail Name string `json:"name"` // name Avatar string `json:"avatar"` // avatar Description string `json:"description"` // description Status int64 `json:"status"` // status CreatedAt time.Time `json:"created_at"` // created_at // contains filtered or unexported fields }
func CreateAccount ¶
func RetrieveAccountByID ¶
func RetrieveAccountByMail ¶
func (Account) CheckPassword ¶
func (*Account) CreateSession ¶
func (*Account) DeleteAppByID ¶
func (*Account) DeleteSession ¶
func (*Account) UpdatePassword ¶
func (*Account) UpdateProfile ¶
type App ¶
type App struct { ID int64 `json:"id"` Name string `json:"name"` SecretKey string `json:"secretKey"` Status int64 `json:"desc"` AccountID int64 `json:"accountId"` // contains filtered or unexported fields }
func AppBySecretKey ¶
Click to show internal directories.
Click to hide internal directories.