package
0.0.0-20250103092800-5f740930e12e
Repository: https://github.com/frankill/gotools.git
Documentation: pkg.go.dev
# Functions
CountQuery 将一个 SQL 查询语句转换为计数查询语句。 参数:
baseQuery - 原始的 SQL 查询语句。
返回:
转换后的计数查询语句。.
EsScript 返回一个 Elasticsearch 脚本 参数:
- lang: 脚本语言 - script: 脚本内容 - data: 脚本参数
返回:
- *elastic.Script: Elasticsearch 脚本.
EsScriptID 返回一个 Elasticsearch 脚本 参数:
- id: 脚本 ID - data: 脚本参数
返回:
- *elastic.Script: Elasticsearch 脚本.
EsSimple 返回一个简单的 Elasticsearch 客户端 参数:
- host: Elasticsearch 地址 ( http://localhost:9200) - User: Elasticsearch 用户名 - Pwd: Elasticsearch 密码
返回:
- *elastic.Client: Elasticsearch 客户端.
GetFieldMapValues 获取结构体的字段
obj - 结构体
返回 key-value 字典.
GetFieldValues 获取结构体的字段
obj - 结构体
返回 []T.
GetTags 获取结构体的 json 标签
obj - 结构体
返回 json 标签列表.
GetTags 获取结构体的 sql 标签
obj - 结构体
返回 sql 标签列表.
GetTags 获取结构体的 tag 标签
obj - 结构体 tag - tag 名称
返回 tag 标签列表.
GetUrl 获取url的数据.
No description provided by the author
No description provided by the author
创建 ElasticSearchClient 实例的工厂函数.
No description provided by the author
NewMysqlDB 创建一个新的MysqlDB实例,通过建立与MySQL数据库的连接。 参数:
con - 用于连接到MySQL数据库的连接字符串。
返回:
指向新创建的MysqlDB实例的指针。.
No description provided by the author
PasteUrl 拼接url.
PostUrl 发送post请求.
ToOne 将 ElasticBluk 转换为 T.
ToSource 将 ElasticBluk[T] 转换为 []T 参数:
- data: ElasticBluk[T]
返回:
- []T.
# Variables
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
MysqlDB 定义了一个与MySQL数据库交互的结构体。.
No description provided by the author
定义一个 ElasticSearchClient 的结构体.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author