config

package
v0.0.0-...-ab77af6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetConfigFile

func SetConfigFile(path string)

SetConfigFile 设置配置文件地址

Types

type Config

type Config struct {
	Debug      bool   `yaml:"debug"`
	Device     string `yaml:"device"`
	OcrType    string `yaml:"ocr_type"`
	WdaAddress string `yaml:"wda_address"`

	//baidu ocr
	BaiduAPIKey    string `yaml:"baidu_api_key"`
	BaiduSecretKey string `yaml:"baidu_secret_key"`

	//截图题目位置
	QuestionX int `yaml:"question_x"`
	QuestionY int `yaml:"question_y"`
	QuestionW int `yaml:"question_w"`
	QuestionH int `yaml:"question_h"`

	//截取答案位置
	AnswerX int `yaml:"answer_x"`
	AnswerY int `yaml:"answer_y"`
	AnswerW int `yaml:"answer_w"`
	AnswerH int `yaml:"answer_h"`

	//自动答题
	Auto bool `yaml:"auto"`
}

Config 全局配置

func GetConfig

func GetConfig() *Config

GetConfig 解析配置

Jump to

Keyboard shortcuts

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