api docs: refine logging api description
Signed-off-by: huanggze <loganhuang@yunify.com>
This commit is contained in:
@@ -285,11 +285,12 @@ func createQueryRequest(param QueryParameters) (int, []byte, error) {
|
||||
return operation, queryRequest, err
|
||||
}
|
||||
|
||||
// Fore more info, refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-search-API.html
|
||||
type Response struct {
|
||||
Status int `json:"status" description:"query status"`
|
||||
Workspace string `json:"workspace,omitempty" description:"workspace the query was performed against"`
|
||||
Shards Shards `json:"_shards" description:"tells shard information"`
|
||||
Hits Hits `json:"hits" description:"search results"`
|
||||
Hits Hits `json:"hits" description:"query results"`
|
||||
Aggregations json.RawMessage `json:"aggregations" description:"aggregation results"`
|
||||
}
|
||||
|
||||
@@ -306,15 +307,15 @@ type Hits struct {
|
||||
}
|
||||
|
||||
type Hit struct {
|
||||
Source Source `json:"_source" description:"search result item"`
|
||||
HighLight HighLight `json:"highlight" description:"highlighted log fragment"`
|
||||
Source Source `json:"_source" description:"a search result"`
|
||||
HighLight HighLight `json:"highlight" description:"highlighted log information"`
|
||||
Sort []int64 `json:"sort" description:"sort key for results"`
|
||||
}
|
||||
|
||||
type Source struct {
|
||||
Log string `json:"log" description:"the log message"`
|
||||
Log string `json:"log" description:"log message"`
|
||||
Time string `json:"time" description:"log timestamp"`
|
||||
Kubernetes Kubernetes `json:"kubernetes" description:"kubernetes addon information on the log"`
|
||||
Kubernetes Kubernetes `json:"kubernetes" description:"kubernetes information"`
|
||||
}
|
||||
|
||||
type Kubernetes struct {
|
||||
|
||||
@@ -72,16 +72,16 @@ type Plugin struct {
|
||||
// Fluent-bit output plugins
|
||||
type OutputPlugin struct {
|
||||
Plugin
|
||||
Id string `json:"id,omitempty" description:"output plugin uuid"`
|
||||
Enable bool `json:"enable" description:"current output plugin status, one of true, false"`
|
||||
Updatetime time.Time `json:"updatetime,omitempty" description:"last updatetime of the output plugin"`
|
||||
Id string `json:"id,omitempty" description:"output uuid"`
|
||||
Enable bool `json:"enable" description:"active status, one of true, false"`
|
||||
Updatetime time.Time `json:"updatetime,omitempty" description:"last updatetime"`
|
||||
}
|
||||
|
||||
// Parameter generic parameter type to handle values from different sources
|
||||
type Parameter struct {
|
||||
Name string `json:"name" description:"configuration parameter key, eg. Name. refer to fluent bit official doc for more information."`
|
||||
Name string `json:"name" description:"configuration parameter key, eg. Name. refer to Fluent bit's Output Plugins Section for more configuration parameters."`
|
||||
ValueFrom *ValueFrom `json:"valueFrom,omitempty"`
|
||||
Value string `json:"value" description:"configuration parameter value, eg. es. refer to fluent bit official doc for more information."`
|
||||
Value string `json:"value" description:"configuration parameter value, eg. es. refer to Fluent bit's Output Plugins Section for more configuration parameters."`
|
||||
}
|
||||
|
||||
// ValueFrom generic type to determine value origin
|
||||
|
||||
Reference in New Issue
Block a user