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"` +}