ty

package
v0.0.0-...-593c55d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OddsCateMapFormat = "odds?lottery=%s&games=%s&_=%d"
)

Variables

View Source
var (
	//ErrFailedLogin = errors.New("登陆失败")
	ErrInvalidJSON = errors.New("json验证失败")
	ErrCookie      = errors.New("登录信息失效")
)
View Source
var (
	ErrGetOdds = errors.New("从目标网址抓取赔率信息失败,可能已封盘")
)

Functions

This section is empty.

Types

type BetStructure

type BetStructure struct {
	// contains filtered or unexported fields
}

type Login

type Login struct {
	CookieJar   http.CookieJar
	HostIndex   string
	UserId      string
	RawPassword string
	Attach      string
	Content     string
	SrcMember   string
	UserInfo
	UserAccount UserAccountProcessor `json:"-"`

	WsInstance model.WsProcess
	// contains filtered or unexported fields
}

func (*Login) GetBalance

func (l *Login) GetBalance() (bl float64, err error)

获取余额

func (*Login) KeepAlive

func (l *Login) KeepAlive()

func (*Login) LoginPost

func (l *Login) LoginPost() (err error)

* 登录并获取余额

func (*Login) OrderAction

func (l *Login) OrderAction(orderBean *model.FlySplitRecords) (err error)

* 下单

func (*Login) Post

func (l *Login) Post() (err error)

* 登录

func (*Login) SetWebSocket

func (l *Login) SetWebSocket(process model.WsProcess)

type OrderBean

type OrderBean struct {
	Gid        int `json:"gid"`
	OrderMoney int `json:"order_money"`
	PlayID     int `json:"play_id"`
}

type OrderProcessor

type OrderProcessor interface {
	GetGid() int64
	GetIssue() string
	//获取玩法
	GetPlayName() string
	//获取投注内容列表
	GetBetContents() string
	//获取投注金额
	GetBetMoney() int64
}

type Pk10OrderStructure

type Pk10OrderStructure struct {
	*Login
	OrderObj   OrderProcessor
	GameType   string
	RemoteGid  int
	Issue      string
	Gid        int64
	RateRawStr string
	PostData   []*OrderBean
	PlayId     int
}

func (*Pk10OrderStructure) Order

func (od *Pk10OrderStructure) Order() (err error)

b->Order

func (*Pk10OrderStructure) OrderSsc

func (od *Pk10OrderStructure) OrderSsc() (err error)

b->Order

func (*Pk10OrderStructure) ParseObj

func (od *Pk10OrderStructure) ParseObj() (err error)

a=>ParseObj

func (*Pk10OrderStructure) ParseSSObj

func (od *Pk10OrderStructure) ParseSSObj() (err error)

a=>ParseObj

type UserAccountProcessor

type UserAccountProcessor interface {
	SetAccount(balance float64)
	GetUriList() []string
	GetUserName() string
	GetPassword() string
}

type UserInfo

type UserInfo struct {
	UserName string
	UserSet  string
	Balance  float64
}

Jump to

Keyboard shortcuts

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