lock

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UA             = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
	Host           = "idmsa.apple.com"
	WidgetKey      = "af1139274f266b22b68c2a3e7ad932cb3c0bbe854e13a79af78dcc73136882c3"
	BaseURL        = "https://idmsa.apple.com"
	Referer        = BaseURL + "/appleauth/auth/signin?widgetKey=" + WidgetKey + "&language=zh_CN&rv=1"
	AcceptEncoding = ""
	AcceptLanguage = "zh-CN,zh;q=0.9,en;q=0.8"
	AcceptJSON     = "application/json, text/javascript, */*; q=0.01"
	ContentType    = "application/json"
)

Variables

This section is empty.

Functions

func Boot

func Boot()

func CheckAndExit

func CheckAndExit(err error)

func CheckErr

func CheckErr(err error) bool

func CheckRoot

func CheckRoot()

func RandString

func RandString(n int) string

Types

type AppleID

type AppleID struct {
	ID    string `yml:"id"`
	State bool   `yml:"state:omitempty"`
}

func ExampleConfig

func ExampleConfig() []*AppleID

func (*AppleID) Lock

func (appleID *AppleID) Lock(client *http.Client) error

type IP

type IP struct {
	IP   string
	Port string
	// contains filtered or unexported fields
}

func (*IP) Check

func (ip *IP) Check() bool

func (*IP) CheckAndUse

func (ip *IP) CheckAndUse() bool

func (*IP) Use

func (ip *IP) Use()

type IPPool

type IPPool struct {
	Min      int
	Max      int
	IPCount  int
	ApiAddr  string
	Interval string
	// contains filtered or unexported fields
}

func (*IPPool) GetIP

func (pool *IPPool) GetIP() (*IP, error)

func (*IPPool) PutIP

func (pool *IPPool) PutIP()

func (*IPPool) Start

func (pool *IPPool) Start() error

func (*IPPool) WaitReady

func (pool *IPPool) WaitReady() chan int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL