From 994ed9e6392123db1742a466a05ebef9750d3db5 Mon Sep 17 00:00:00 2001 From: yuguojian <104118155@qq.com> Date: Fri, 11 Jul 2025 00:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- log/elasticsearch_map.go | 85 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 log/elasticsearch_map.go diff --git a/log/elasticsearch_map.go b/log/elasticsearch_map.go new file mode 100644 index 0000000..d1d6755 --- /dev/null +++ b/log/elasticsearch_map.go @@ -0,0 +1,85 @@ +package log + +type T struct { + Mappings Mappings `json:"mappings"` +} + +type Mappings struct { + Properties Properties `json:"properties"` +} + +type Properties struct { + Caller Caller `json:"caller"` + CreatedAt CreatedAt `json:"created_at"` + Level Level `json:"level"` + Log Log `json:"log"` +} + +type Caller struct { + Type string `json:"type"` + Fields struct { + Keyword struct { + Type string `json:"type"` + IgnoreAbove int `json:"ignore_above"` + } `json:"keyword"` + } `json:"fields"` +} + +type CreatedAt struct { + Type string `json:"type"` + Fields struct { + Keyword struct { + Type string `json:"type"` + IgnoreAbove int `json:"ignore_above"` + } `json:"keyword"` + } `json:"fields"` +} + +type Level struct { + Type string `json:"type"` + Fields struct { + Keyword struct { + Type string `json:"type"` + IgnoreAbove int `json:"ignore_above"` + } `json:"keyword"` + } `json:"fields"` +} + +type Log struct { + Properties struct { + At struct { + Type string `json:"type"` + Fields struct { + Keyword struct { + Type string `json:"type"` + IgnoreAbove int `json:"ignore_above"` + } `json:"keyword"` + } `json:"fields"` + } `json:"at"` + LogType struct { + Type string `json:"type"` + Fields struct { + Keyword struct { + Type string `json:"type"` + IgnoreAbove int `json:"ignore_above"` + } `json:"keyword"` + } `json:"fields"` + } `json:"log_type"` + Param struct { + } `json:"param"` + Result struct { + } `json:"result"` + Timestamp struct { + Type string `json:"type"` + } `json:"timestamp"` + Title struct { + Type string `json:"type"` + Fields struct { + Keyword struct { + Type string `json:"type"` + IgnoreAbove int `json:"ignore_above"` + } `json:"keyword"` + } `json:"fields"` + } `json:"title"` + } `json:"properties"` +}