1 Star 1 Fork 1

xiaoyutab / xgotool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
init.go 768 Bytes
一键复制 编辑 原始数据 按行查看 历史
xiaoyutab 提交于 2023-11-10 12:45 . plan_id配置项迁移
// 百度人脸识别/人脸认证SDK
package xfaceprint
// 百度人脸识别配置项
type Config struct {
Domain string // 人脸识别接口域名
AppId string // 百度开发者平台的AppId
AppKey string // 百度开发者平台的AK
SecretKey string // 百度开发者平台的密钥信息
PlanId string // 获取鉴权ID
}
var _default Config = Config{
Domain: "https://aip.baidubce.com/",
}
// 配置项注入
func Regedit(c *Config) {
if c == nil {
return
}
if c.Domain != "" {
_default.Domain = c.Domain
}
if c.AppId != "" {
_default.AppId = c.AppId
}
if c.AppKey != "" {
_default.AppKey = c.AppKey
}
if c.SecretKey != "" {
_default.SecretKey = c.SecretKey
}
if c.PlanId != "" {
_default.PlanId = c.PlanId
}
}
Go
1
https://gitee.com/xiaoyutab/xgotool.git
git@gitee.com:xiaoyutab/xgotool.git
xiaoyutab
xgotool
xgotool
v0.3.13

搜索帮助