Documentation ¶
Index ¶
- Constants
- func CheckToken(token string, key []byte, fromIP *net.IP) bool
- func GenToken(ip net.IP, key []byte) string
- type AppConfig
- func (a *AppConfig) AddLinks(in *LinksItem)
- func (a *AppConfig) Close()
- func (a *AppConfig) GetLastLogin() time.Time
- func (a *AppConfig) GetLinks() []LinksItem
- func (a *AppConfig) GetNormalConfig() *NormalConfig
- func (a *AppConfig) GetPWD() (*ScryptJSON, bool)
- func (a *AppConfig) GetToken() string
- func (a *AppConfig) RemoveLinks(urlIn string) bool
- func (a *AppConfig) SetLastLogin(in time.Time)
- func (a *AppConfig) SetNormalConfig(in ...string) error
- func (a *AppConfig) SetPWD(in *ScryptJSON)
- func (a *AppConfig) SetToken(token string)
- func (a *AppConfig) Start(filePath string) error
- type LinksItem
- type NormalConfig
- type ScryptJSON
Constants ¶
View Source
const ( ScryptInitN = 262144 ScryptInitR = 8 ScryptInitP = 4 ScryptLength = 32 )
View Source
const ( K_title = "title" K_subTitle = "subTitle" K_name = "name" K_say = "say" K_ipc = "ipc" K_github = "github" K_mail = "email" K_avatar = "avatar" )
Variables ¶
This section is empty.
Functions ¶
func CheckToken ¶
CheckToken 校验token是否有效, 包括IP
Types ¶
type AppConfig ¶
type AppConfig struct { NormalConfig NormalConfig `json:"normalConfig"` PWD ScryptJSON `json:"pwd"` LastLogin int64 `json:"lastLogin"` Token string `json:"token"` FriendLinks []LinksItem `json:"friendLinks"` // contains filtered or unexported fields }
func (*AppConfig) GetLastLogin ¶
func (*AppConfig) GetNormalConfig ¶
func (a *AppConfig) GetNormalConfig() *NormalConfig
func (*AppConfig) GetPWD ¶
func (a *AppConfig) GetPWD() (*ScryptJSON, bool)
func (*AppConfig) SetLastLogin ¶
func (*AppConfig) SetNormalConfig ¶
type NormalConfig ¶
type ScryptJSON ¶
Click to show internal directories.
Click to hide internal directories.