core

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: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeUriMOA     = "MOA"
	TypeUriSGWin   = "SGWIN"
	TypeUriSGWinCD = "SGWINCD"
	TypeUriIDC     = "IDC"
	TypeUriJF      = "JF"
	TypeUriPHX     = "PHX"
	TypeUriALI     = "ALI"
	TypeUriTY      = "TY"
)
View Source
const (
	SoundDLu   = "denglu.mp3"
	SoundDx    = "diaoxian.mp3"
	SoundZhYc  = "zhyc.mp3"
	SoundOrder = "prompt.mp3"
)

Variables

View Source
var (
	Secret = "UAOKSPXI4JQ85P93G47FBL6Y2UX174KH"

	UserInfo       = &model.Users{}
	FlySettingList = make([]*model.VFlyRoomSetting, 0)
)
View Source
var (
	//BaseHost         = "127.0.0.1:39200"
	//BaseHost         = "chat.0755yicai.cn"
	ErrConnectRefuse = errors.New("服务器拒绝访问")
	ErrConnectClosed = errors.New("服务器断开连接,网络中断")
	ErrAuthInvalid   = errors.New("房主账号或密码错误")
)

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

func StartRun

func StartRun()

Types

type Conf

type Conf struct {
	HostIndex int `comment:"飞单网站:测试=>1,远航=>0,必赢=>2"`

	SearchCode string `comment:"搜索码"`

	ServerAddr string `comment:"服务器地址,带端口"`

	LoopLogin LoopLoginSetting `json:"loop_login" comment:"飞单账号循环登录配置"`
	// contains filtered or unexported fields
}

func NewConf

func NewConf() *Conf

func (*Conf) Sync

func (c *Conf) Sync()

type FlyDataRepository

type FlyDataRepository interface {
	//插入一条记录
	//如果id 已存在,则返回错误
	InsertOne() (err error)
}

type LoopLoginSetting

type LoopLoginSetting struct {
	IntervalSeconds int64 `comment:"循环间隔时长(秒)"`

	Cycles    int `comment:"循环登录次数"`
	CyclesBet int `comment:"飞单失败后,循环飞单次数"`
}

账号循环登录配置

type RouterConfig

type RouterConfig struct {
	SearchCode string
	Domain     string
}

type WsConn

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

func (*WsConn) BindMsg

func (w *WsConn) BindMsg(bean interface{}) (err error)

func (*WsConn) GetOrder

func (w *WsConn) GetOrder(beans []*model.FlySplitRecords) (err error)

GetOrder

func (*WsConn) IsClosed

func (w *WsConn) IsClosed() bool

func (*WsConn) SendBalance

func (w *WsConn) SendBalance() (err error)

SendBalance

func (*WsConn) SendMsg

func (w *WsConn) SendMsg(typeStr string, msg interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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