conf

package
v0.0.0-...-cd92494 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigInfo

type ConfigInfo struct {
	UserName     string `json:userName`
	Password     string `json:password`
	Host         string `json:host`
	Port         string `json:port`
	DbName       string `json:dbName`
	GrpcPort     string `json:grpcPort`
	HttpPort     string `json:httpPort`
	Verify       string `json:verify`
	Prefix       string `json:prefix`
	GrpcEndpoint string `json:grpcEndpoint`
	HttpEndpoint string `json:httpEndpoint`
	HttpHost     string `json:httpHost`

	AppKey       string `json:appKey`       // 百度云应用键值
	Secret       string `json:secret`       // 百度云应用秘钥
	AccessToken  string `json:accessToken`  // 调api使用的token
	ApiUrl       string `json:apiUrl`       // api路径 获取物品名
	ClassApiUrl1 string `json:ClassApiUrl1` // api路径1 获取分类

	ClassApiUrl2 string `json:ClassApiUrl2` // api路径2 获取分类
	ClassApiKey  string `json:classApiKey`  // 用户自己的APIKEY
}

定义配置文件解析后的结构

var Config ConfigInfo

func LoadConfig

func LoadConfig(filename string) (ConfigInfo, error)

加载配置文件

Jump to

Keyboard shortcuts

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