Commit fd5a402a authored by renovate's avatar renovate
Browse files

Update module github.com/olivere/elastic/v7 to v7.0.29

parent 023c2cf4
Pipeline #20958 passed with stages
in 54 seconds
......@@ -4,4 +4,4 @@ go 1.11
// go: no requirements found in vendor/vendor.json
require github.com/olivere/elastic/v7 v7.0.26
require github.com/olivere/elastic/v7 v7.0.29
......@@ -4,6 +4,7 @@ github.com/aws/aws-sdk-go v1.33.5/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU
github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
github.com/aws/aws-sdk-go v1.38.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.38.17/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.40.43/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
......@@ -18,6 +19,7 @@ github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
......@@ -39,6 +41,7 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
......@@ -63,6 +66,8 @@ github.com/olivere/elastic/v7 v7.0.25 h1:q3ef8PqC4PyT3b8BAcjDVo48KNzr0HVKosMqMsF
github.com/olivere/elastic/v7 v7.0.25/go.mod h1:ySKeM+7yrE9HmsUi6+vSp0anvWiDOuPa9kpuknxjKbU=
github.com/olivere/elastic/v7 v7.0.26 h1:KjLLCCpHb0ap+kA2s16c+Czs7kxBOk6DmPoy8D9ZozA=
github.com/olivere/elastic/v7 v7.0.26/go.mod h1:ySKeM+7yrE9HmsUi6+vSp0anvWiDOuPa9kpuknxjKbU=
github.com/olivere/elastic/v7 v7.0.29 h1:zvorjSPHFli/0owqfoLq0ZOtVhZSyHsMbRi29Vj7T14=
github.com/olivere/elastic/v7 v7.0.29/go.mod h1:8PlkMD2Xb690IPhIPii2SypuuXtXX3dDcSKGqnEGXzE=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
......@@ -94,6 +99,7 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
......@@ -104,9 +110,13 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
......
......@@ -25,6 +25,7 @@ _testmain.go
/.vscode/
/.idea/
/data
/debug.test
/generator
/cluster-test/cluster-test
......@@ -35,4 +36,3 @@ _testmain.go
/spec
/tmp
/CHANGELOG-3.0.html
......@@ -152,9 +152,10 @@ Muhammet Çakır [@cakirmuha](https://github.com/cakirmuha)
Munkyu Im [@munkyu](https://github.com/munkyu)
naimulhaider [@naimulhaider](https://github.com/naimulhaider)
Naoya Yoshizawa [@azihsoyn](https://github.com/azihsoyn)
navins [@ishare](https://github.com/ishare)
Naoya Tsutsumi [@tutuming](https://github.com/tutuming)
Nathan Macnamara [@nathanmac](https://github.com/nathanmac)
Nathan Lacey [@nlacey](https://github.com/nlacey)
navins [@ishare](https://github.com/ishare)
NeoCN [@NeoCN](https://github.com/NeoCN)
Nguyen Xuan Dung [@dungnx](https://github.com/dungnx)
Nicholas Wolff [@nwolff](https://github.com/nwolff)
......@@ -163,6 +164,7 @@ Nick Whyte [@nickw444](https://github.com/nickw444)
Nicolae Vartolomei [@nvartolomei](https://github.com/nvartolomei)
okhowang [@okhowang](https://github.com/okhowang)
Orne Brocaar [@brocaar](https://github.com/brocaar)
ottramst [@ottramst](https://github.com/ottramst)
Paul [@eyeamera](https://github.com/eyeamera)
Paul Oldenburg [@lr-paul](https://github.com/lr-paul)
Pedro [@otherview](https://github.com/otherview)
......
......@@ -295,10 +295,10 @@ Here are a few tips on how to get used to Elastic:
- [X] cat aliases
- [X] cat allocation
- [X] cat count
- [ ] cat fielddata
- [X] cat fielddata
- [X] cat health
- [X] cat indices
- [ ] cat master
- [x] cat master
- [ ] cat nodeattrs
- [ ] cat nodes
- [ ] cat pending tasks
......@@ -308,7 +308,7 @@ Here are a few tips on how to get used to Elastic:
- [ ] cat thread pool
- [ ] cat shards
- [ ] cat segments
- [ ] cat snapshots
- [X] cat snapshots
- [ ] cat templates
### Cluster APIs
......@@ -327,6 +327,13 @@ Here are a few tips on how to get used to Elastic:
- [ ] Nodes hot_threads
- [ ] Cluster Allocation Explain API
### Rollup APIs (XPack)
- [x] Create Job
- [x] Delete Job
- [x] Get Job
- [x] Start Job
- [x] Stop Job
### Query DSL
- [x] Match All Query
......@@ -340,6 +347,8 @@ Here are a few tips on how to get used to Elastic:
- [x] Common Terms Query
- [x] Query String Query
- [x] Simple Query String Query
- [x] Combined Fields Query
- [x] Intervals Query
- Term level queries
- [x] Term Query
- [x] Terms Query
......
// Copyright 2012-present Oliver Eilhard. All rights reserved.
// Use of this source code is governed by a MIT-license.
// See http://olivere.mit-license.org/license.txt for details.
package elastic
import (
"context"
"fmt"
"net/http"
"net/url"
"strings"
)
// CatMasterService shows information about the master node,
// including the ID, bound IP address, and name.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/7.12/cat-master.html
// for details.
type CatMasterService struct {
client *Client
pretty *bool // pretty format the returned JSON response
human *bool // return human readable values for statistics
errorTrace *bool // include the stack trace of returned errors
filterPath []string // list of filters used to reduce the response
headers http.Header // custom request-level HTTP headers
local *bool
masterTimeout string
columns []string
sort []string // list of columns for sort order
}
// NewCatMasterService creates a new CatMasterService
func NewCatMasterService(client *Client) *CatMasterService {
return &CatMasterService{
client: client,
}
}
// Pretty tells Elasticsearch whether to return a formatted JSON response.
func (s *CatMasterService) Pretty(pretty bool) *CatMasterService {
s.pretty = &pretty
return s
}
// Human specifies whether human readable values should be returned in
// the JSON response, e.g. "7.5mb".
func (s *CatMasterService) Human(human bool) *CatMasterService {
s.human = &human
return s
}
// ErrorTrace specifies whether to include the stack trace of returned errors.
func (s *CatMasterService) ErrorTrace(errorTrace bool) *CatMasterService {
s.errorTrace = &errorTrace
return s
}
// FilterPath specifies a list of filters used to reduce the response.
func (s *CatMasterService) FilterPath(filterPath ...string) *CatMasterService {
s.filterPath = filterPath
return s
}
// Header adds a header to the request.
func (s *CatMasterService) Header(name string, value string) *CatMasterService {
if s.headers == nil {
s.headers = http.Header{}
}
s.headers.Add(name, value)
return s
}
// Headers specifies the headers of the request.
func (s *CatMasterService) Headers(headers http.Header) *CatMasterService {
s.headers = headers
return s
}
// Local indicates to return local information, i.e. do not retrieve
// the state from master node (default: false).
func (s *CatMasterService) Local(local bool) *CatMasterService {
s.local = &local
return s
}
// MasterTimeout is the explicit operation timeout for connection to master node.
func (s *CatMasterService) MasterTimeout(masterTimeout string) *CatMasterService {
s.masterTimeout = masterTimeout
return s
}
// Columns to return in the response.
// To get a list of all possible columns to return, run the following command
// in your terminal:
//
// Example:
// curl 'http://localhost:9200/_cat/master?help'
//
// You can use Columns("*") to return all possible columns. That might take
// a little longer than the default set of columns.
func (s *CatMasterService) Columns(columns ...string) *CatMasterService {
s.columns = columns
return s
}
// Sort is a list of fields to sort by.
func (s *CatMasterService) Sort(fields ...string) *CatMasterService {
s.sort = fields
return s
}
// buildURL builds the URL for the operation.
func (s *CatMasterService) buildURL() (string, url.Values, error) {
// Build URL
path := "/_cat/master"
// Add query string parameters
params := url.Values{
"format": []string{"json"}, // always returns as JSON
}
if v := s.pretty; v != nil {
params.Set("pretty", fmt.Sprint(*v))
}
if v := s.human; v != nil {
params.Set("human", fmt.Sprint(*v))
}
if v := s.errorTrace; v != nil {
params.Set("error_trace", fmt.Sprint(*v))
}
if len(s.filterPath) > 0 {
params.Set("filter_path", strings.Join(s.filterPath, ","))
}
if v := s.local; v != nil {
params.Set("local", fmt.Sprint(*v))
}
if s.masterTimeout != "" {
params.Set("master_timeout", s.masterTimeout)
}
if len(s.sort) > 0 {
params.Set("s", strings.Join(s.sort, ","))
}
if len(s.columns) > 0 {
params.Set("h", strings.Join(s.columns, ","))
}
return path, params, nil
}
// Do executes the operation.
func (s *CatMasterService) Do(ctx context.Context) (CatMasterResponse, error) {
// Get URL for request
path, params, err := s.buildURL()
if err != nil {
return nil, err
}
// Get HTTP response
res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
Method: "GET",
Path: path,
Params: params,
Headers: s.headers,
})
if err != nil {
return nil, err
}
// Return operation response
var ret CatMasterResponse
if err := s.client.decoder.Decode(res.Body, &ret); err != nil {
return nil, err
}
return ret, nil
}
// -- Result of a get request.
// CatMasterResponse is the outcome of CatMasterService.Do.
type CatMasterResponse []CatMasterResponseRow
// CatMasterResponseRow is a single row in a CatMasterResponse.
// Notice that not all of these fields might be filled; that depends
// on the number of columns chose in the request (see CatMasterService.Columns).
type CatMasterResponseRow struct {
ID string `json:"id"`
Host string `json:"host"`
IP string `json:"ip"`
Node string `json:"node"`
}
// Copyright 2012-present Oliver Eilhard. All rights reserved.
// Use of this source code is governed by a MIT-license.
// See http://olivere.mit-license.org/license.txt for details.
package elastic
import (
"context"
"fmt"
"net/http"
"net/url"
"strings"
"github.com/olivere/elastic/v7/uritemplates"
)
// CatSnapshotsService returns the list of snapshots.
//
// See https://www.elastic.co/guide/en/elasticsearch/reference/7.13/cat-snapshots.html
// for details.
type CatSnapshotsService struct {
client *Client
pretty *bool // pretty format the returned JSON response
human *bool // return human readable values for statistics
errorTrace *bool // include the stack trace of returned errors
filterPath []string // list of filters used to reduce the response
headers http.Header // custom request-level HTTP headers
repository string // snapshot repository used to limit the request
masterTimeout string
columns []string
sort []string // list of columns for sort order
}
// NewCatSnapshotsService creates a new NewCatSnapshotsService.
func NewCatSnapshotsService(client *Client) *CatSnapshotsService {
return &CatSnapshotsService{
client: client,
}
}
// Pretty tells Elasticsearch whether to return a formatted JSON response.
func (s *CatSnapshotsService) Pretty(pretty bool) *CatSnapshotsService {
s.pretty = &pretty
return s
}
// Human specifies whether human readable values should be returned in
// the JSON response, e.g. "7.5mb".
func (s *CatSnapshotsService) Human(human bool) *CatSnapshotsService {
s.human = &human
return s
}
// ErrorTrace specifies whether to include the stack trace of returned errors.
func (s *CatSnapshotsService) ErrorTrace(errorTrace bool) *CatSnapshotsService {
s.errorTrace = &errorTrace
return s
}
// FilterPath specifies a list of filters used to reduce the response.
func (s *CatSnapshotsService) FilterPath(filterPath ...string) *CatSnapshotsService {
s.filterPath = filterPath
return s
}
// Header adds a header to the request.
func (s *CatSnapshotsService) Header(name string, value string) *CatSnapshotsService {
if s.headers == nil {
s.headers = http.Header{}
}
s.headers.Add(name, value)
return s
}
// Headers specifies the headers of the request.
func (s *CatSnapshotsService) Headers(headers http.Header) *CatSnapshotsService {
s.headers = headers
return s
}
// Repository specifies the napshot repository used to limit the request.
func (s *CatSnapshotsService) Repository(repository string) *CatSnapshotsService {
s.repository = repository
return s
}
// MasterTimeout is the explicit operation timeout for connection to master node.
func (s *CatSnapshotsService) MasterTimeout(masterTimeout string) *CatSnapshotsService {
s.masterTimeout = masterTimeout
return s
}
// Columns to return in the response.
// To get a list of all possible columns to return, run the following command
// in your terminal:
//
// Example:
// curl 'http://localhost:9200/_cat/snapshots/<repository>?help'
//
// You can use Columns("*") to return all possible columns. That might take
// a little longer than the default set of columns.
func (s *CatSnapshotsService) Columns(columns ...string) *CatSnapshotsService {
s.columns = columns
return s
}
// Sort is a list of fields to sort by.
func (s *CatSnapshotsService) Sort(fields ...string) *CatSnapshotsService {
s.sort = fields
return s
}
// buildURL builds the URL for the operation.
func (s *CatSnapshotsService) buildURL() (string, url.Values, error) {
// Build URL
var (
path string
err error
)
if s.repository != "" {
path, err = uritemplates.Expand("/_cat/snapshots/{repository}", map[string]string{
"repository": s.repository,
})
} else {
path = "/_cat/snapshots"
}
if err != nil {
return "", url.Values{}, err
}
// Add query string parameters
params := url.Values{
"format": []string{"json"}, // always returns as JSON
}
if v := s.pretty; v != nil {
params.Set("pretty", fmt.Sprint(*v))
}
if v := s.human; v != nil {
params.Set("human", fmt.Sprint(*v))
}
if v := s.errorTrace; v != nil {
params.Set("error_trace", fmt.Sprint(*v))
}
if len(s.filterPath) > 0 {
params.Set("filter_path", strings.Join(s.filterPath, ","))
}
if s.masterTimeout != "" {
params.Set("master_timeout", s.masterTimeout)
}
// TODO
if len(s.columns) > 0 {
// loop through all columns and apply alias if needed
for i, column := range s.columns {
if fullValueRaw, isAliased := catSnapshotsResponseRowAliasesMap[column]; isAliased {
// alias can be translated to multiple fields,
// so if translated value contains a comma, than replace the first value
// and append the others
if strings.Contains(fullValueRaw, ",") {
fullValues := strings.Split(fullValueRaw, ",")
s.columns[i] = fullValues[0]
s.columns = append(s.columns, fullValues[1:]...)
} else {
s.columns[i] = fullValueRaw
}
}
}
params.Set("h", strings.Join(s.columns, ","))
}
if len(s.sort) > 0 {
params.Set("s", strings.Join(s.sort, ","))
}
return path, params, nil
}
// Do executes the operation.
func (s *CatSnapshotsService) Do(ctx context.Context) (CatSnapshotsResponse, error) {
// Get URL for request
path, params, err := s.buildURL()
if err != nil {
return nil, err
}
// Get HTTP response
res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
Method: "GET",
Path: path,
Params: params,
Headers: s.headers,
})
if err != nil {
return nil, err
}
// Return operation response
var ret CatSnapshotsResponse
if err := s.client.decoder.Decode(res.Body, &ret); err != nil {
return nil, err
}
return ret, nil
}
// -- Result of a get request.
// CatSnapshotsResponse is the outcome of CatSnapshotsService.Do.
type CatSnapshotsResponse []CatSnapshotsResponseRow
// CatSnapshotssResponseRow specifies the data returned for one index
// of a CatSnapshotsResponse. Notice that not all of these fields might
// be filled; that depends on the number of columns chose in the
// request (see CatSnapshotsService.Columns).
type CatSnapshotsResponseRow struct {
ID string `json:"id"` // ID of the snapshot, such as "snap1".
Repository string `json:"repository"` // Name of the repository, such as "repo1".
Status string `json:"status"` // One of "FAILED", "INCOMPATIBLE", "IN_PROGRESS", "PARTIAL" or "SUCCESS".
StartEpoch string `json:"start_epoch"` // Unix epoch time at which the snapshot process started.
StartTime string `json:"start_time"` // HH:MM:SS time at which the snapshot process started.
EndEpoch string `json:"end_epoch"` // Unix epoch time at which the snapshot process ended.
EndTime string `json:"end_time"` // HH:MM:SS time at which the snapshot process ended.
Duration string `json:"duration"` // Time it took the snapshot process to complete in time units.
Indices string `json:"indices"` // Number of indices in the snapshot.
SuccessfulShards string `json:"successful_shards"` // Number of successful shards in the snapshot.
FailedShards string `json:"failed_shards"` // Number of failed shards in the snapshot.
TotalShards string `json:"total_shards"` // Total number of shards in the snapshot.
Reason string `json:"reason"` // Reason for any snapshot failures.
}
// catSnapshotsResponseRowAliasesMap holds the global map for columns aliases
// the map is used by CatSnapshotsService.buildURL.
// For backwards compatibility some fields are able to have the same aliases
// that means that one alias can be translated to different columns (from different elastic versions)
// example for understanding: rto -> RefreshTotal, RefreshExternalTotal
var catSnapshotsResponseRowAliasesMap = map[string]string{
"snapshot": "id",
"re": "repository",
"s": "status",
"ste": "start_epoch",
"sti": "start_time",
"ete": "end_epoch",
"eti": "end_time",
"dur": "duration",
"i": "indices",
"ss": "successful_shards",
"fs": "failed_shards",
"ts": "total_shards",
"`r": "reason",
}
......@@ -26,7 +26,7 @@ import (
const (
// Version is the current version of Elastic.
Version = "7.0.26"
Version = "7.0.29"
// DefaultURL is the default endpoint of Elasticsearch on the local machine.
// It is used e.g. when initializing a new Client without a specific URL.
......@@ -1885,7 +1885,6 @@ func (c *Client) GetFieldMapping() *IndicesGetFieldMappingService {
// -- cat APIs --
// TODO cat master
// TODO cat nodes
// TODO cat pending tasks
// TODO cat plugins
......@@ -1894,6 +1893,11 @@ func (c *Client) GetFieldMapping() *IndicesGetFieldMappingService {
// TODO cat shards
// TODO cat segments