Documentation ¶
Index ¶
- Constants
- func Boot()
- func CheckAndExit(err error)
- func CheckErr(err error) bool
- func CheckRoot()
- func Install()
- func RandStr(n int) string
- func Reinstall()
- func Uninstall()
- type AppleID
- func (appID AppleID) AnswerQuestion(sstt, location string) (string, string, error)
- func (appID AppleID) Check() bool
- func (appID AppleID) RestPassword(sstt, location string) error
- func (appID AppleID) SelectAuthenticationMethod(sstt string) (string, string, error)
- func (appID AppleID) Unlock() error
- func (appID AppleID) UnlockAppleID(sstt, location string) (string, string, error)
- func (appID AppleID) ValidateAppleID() (string, error)
- func (appID AppleID) ValidateBirthday(sstt, location string) (string, string, error)
- func (appID AppleID) ValidatePassword(sstt, location string) error
- type Question
- type Questions
- type SMTPConfig
Constants ¶
View Source
const ( UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36" Host = "iforgot.apple.com" BaseURL = "https://iforgot.apple.com" Referer = BaseURL + "/password/verify/appleid" AcceptEncoding = "" AcceptLanguage = "zh-CN,zh;q=0.9,en;q=0.8" AcceptJSON = "application/json, text/javascript, */*; q=0.01" AcceptHTML = "text/html;format=fragmented" ContentType = "application/json" )
View Source
const ( JSON = "json" HTML = "HTML" )
View Source
const SystemdConfig = `` /* 332-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func CheckAndExit ¶
func CheckAndExit(err error)
Types ¶
type AppleID ¶
type AppleID struct { ID string `yml:"id"` Birthday string `yml:"birthday"` Password string `yml:"password"` Questions map[string]string `yml:"questions"` Client *http.Client `yml:"client,omitempty"` Cron string `yml:"cron"` }
func ExampleConfig ¶
func ExampleConfig() []*AppleID
func (AppleID) AnswerQuestion ¶
func (AppleID) RestPassword ¶
func (AppleID) SelectAuthenticationMethod ¶
func (AppleID) UnlockAppleID ¶
func (AppleID) ValidateAppleID ¶
func (AppleID) ValidateBirthday ¶
func (AppleID) ValidatePassword ¶
type SMTPConfig ¶
type SMTPConfig struct { UserName string `yml:"username"` Password string `yml:"password"` From string `yml:"from"` To []string `yml:"to"` Server string `yml:"Server"` }
func SMTPExampleConfig ¶
func SMTPExampleConfig() *SMTPConfig
func (*SMTPConfig) Send ¶
func (cfg *SMTPConfig) Send(message string)
Click to show internal directories.
Click to hide internal directories.