capsdk

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

Documentation

Index

Constants

View Source
const (
	BaseUri = "http://upload.chaojiying.net/Upload/"

	OcrAPI         = BaseUri + "Processing.php"
	QueryAPI       = BaseUri + "GetScore.php"
	ReportErrorAPI = BaseUri + "ReportError.php"
	UserRegAPI     = BaseUri + "UserReg.php"
	UserPayAPI     = BaseUri + "UserPay.php"

	//4位纯数字
	NumCodeType4 = 4004
	//4位英文+数字;速度快
	MixCodeType4 = 1902
)

Variables

View Source
var (
	//全局只有一个识别实例
	NormalOcr = &OcrObj{
		User:     "woniu123",
		Pass2:    utils.Md5([]byte("ABC154948abc")),
		SoftID:   897319,
		CodeType: NumCodeType4,
	}
)

Functions

This section is empty.

Types

type OcrInterface

type OcrInterface interface {
	GetCodeString(fileData []byte) (code string, err error)
}

type OcrObj

type OcrObj struct {
	User       string `json:"user"`
	Pass       string `json:"pass"`
	Pass2      string `json:"pass2"`
	SoftID     int    `json:"softid"`
	CodeType   int    `json:"codetype"`
	LenMin     int    `json:"len_min"`
	FileBase64 string `json:"file_base64"`
	// contains filtered or unexported fields
}

func (*OcrObj) GetCodeString

func (o *OcrObj) GetCodeString(fileData []byte) (code string, err1 error)

GetCodeString 获取验证码内容

type ResultObj

type ResultObj struct {
	ErrNo  int    `json:"err_no"`
	ErrStr string `json:"err_str"`
	PicID  string `json:"pic_id"`
	PicStr string `json:"pic_str"`
	Md5    string `json:"md5"`
	Tifen  int64  `json:"tifen"`
}

Jump to

Keyboard shortcuts

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