Documentation ¶
Index ¶
- Constants
- func CutImage(src image.Image, x, y, w, h int) (image.Image, error)
- func GetCache() *cache.Cache
- func HTTPGet(uri string, timeout int32) ([]byte, error)
- func HTTPGetCustom(uri string, timeout int32, proxyURL string, header http.Header) ([]byte, error)
- func MkDirIfNotExist(path string) error
- func MustInt32(str string) int32
- func OpenImageToBase64(filename string) (string, error)
- func OpenPNG(filename string) (image.Image, error)
- func PostForm(uri string, data url.Values, timeout int32) ([]byte, error)
- func SavePNG(filename string, pic image.Image) error
- func SetConfigFile(path string)
- func SubString(str string, begin, length int) (substr string)
- func UnicodeIndex(str, substr string) int
- type Config
Constants ¶
View Source
const ( DeviceiOS = "ios" DeviceAndroid = "android" ImagePath = "./images/" QuestionImage = ImagePath + "question.png" AnswerImage = ImagePath + "answer.png" BaiduAccessTokenKey = "qanswer_baidu_access_token" QuestionInCache = "something else" )
Variables ¶
This section is empty.
Functions ¶
func HTTPGetCustom ¶
HTTPGetCustom custom http client
func OpenImageToBase64 ¶
OpenImageToBase64 OpenImageToBase64
Types ¶
type Config ¶
type Config struct { Debug bool `yaml:"debug"` APP string `yaml:"app"` Auto bool `yaml:"automatic"` Device string `yaml:"device"` OCR string `yaml:"ocr"` AdbAddress string `yaml:"adb_address"` WdaAddress string `yaml:"wda_address"` BaiduAPIKey string `yaml:"Baidu_API_Key"` BaiduSecretKey string `yaml:"Baidu_Secret_Key"` //西瓜视频截图题目位置 XgQx int `yaml:"xg_q_x"` XgQy int `yaml:"xg_q_y"` XgQw int `yaml:"xg_q_w"` XgQh int `yaml:"xg_q_h"` //西瓜视频截取答案位置 XgAx int `yaml:"xg_a_x"` XgAy int `yaml:"xg_a_y"` XgAw int `yaml:"xg_a_w"` XgAh int `yaml:"xg_a_h"` //冲顶大会截图题目位置 CdQx int `yaml:"cd_q_x"` CdQy int `yaml:"cd_q_y"` CdQw int `yaml:"cd_q_w"` CdQh int `yaml:"cd_q_h"` //冲顶大会截取答案位置 CdAx int `yaml:"cd_a_x"` CdAy int `yaml:"cd_a_y"` CdAw int `yaml:"cd_a_w"` CdAh int `yaml:"cd_a_h"` //花椒直播截图题目位置 HjQx int `yaml:"hj_q_x"` HjQy int `yaml:"hj_q_y"` HjQw int `yaml:"hj_q_w"` HjQh int `yaml:"hj_q_h"` //花椒直播截取答案位置 HjAx int `yaml:"hj_a_x"` HjAy int `yaml:"hj_a_y"` HjAw int `yaml:"hj_a_w"` HjAh int `yaml:"hj_a_h"` //芝士超人截图题目位置 ZsQx int `yaml:"zs_q_x"` ZsQy int `yaml:"zs_q_y"` ZsQw int `yaml:"zs_q_w"` ZsQh int `yaml:"zs_q_h"` //芝士超人截取答案位置 ZsAx int `yaml:"zs_a_x"` ZsAy int `yaml:"zs_a_y"` ZsAw int `yaml:"zs_a_w"` ZsAh int `yaml:"zs_a_h"` }
Config 全局配置
Click to show internal directories.
Click to hide internal directories.