1 Star 0 Fork 0

ichub / goconfig

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
elastic_client_dto.go 726 Bytes
一键复制 编辑 原始数据 按行查看 历史
leijmdas 提交于 2024-05-05 12:24 . add
package baseconfig
type ElasticClientDto struct {
IchubClientDto
URL string `json:"url"` //("http://192.168.4.111:9200,"),
// 设置基于http base auth验证的账号和密码
//elastic.SetBasicAuth("elastic", "123456"),
Username string `json:"username"`
Password string `json:"password"`
// 启用gzip压缩
Gzip bool `json:"gzip"`
}
func NewElasticClientDto() *ElasticClientDto {
var client = &ElasticClientDto{
Gzip: false,
}
client.InitProxy(client)
return client
}
func (this *ElasticClientDto) Parse() *ElasticClientDto {
this.URL = this.ParseValue("URL", this.URL)
this.Username = this.ParseValue("Username", this.Username)
this.Password = this.ParseValue("Password", this.Password)
return this
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ichub/goconfig.git
git@gitee.com:ichub/goconfig.git
ichub
goconfig
goconfig
v1.0.408

搜索帮助

344bd9b3 5694891 D2dac590 5694891