diff --git a/pkg/controllers/status/cluster_condition_cache_test.go b/pkg/controllers/status/cluster_condition_cache_test.go index aed6f985de89..3697dcd8a73d 100644 --- a/pkg/controllers/status/cluster_condition_cache_test.go +++ b/pkg/controllers/status/cluster_condition_cache_test.go @@ -176,6 +176,60 @@ func TestThresholdAdjustedReadyCondition(t *testing.T) { Status: metav1.ConditionTrue, }, }, + { + name: "ready condition changes from true to false", + clusterData: &clusterData{ + readyCondition: metav1.ConditionTrue, + thresholdStartTime: time.Now().Add(-10 * time.Minute), + }, + currentCondition: &metav1.Condition{ + Type: clusterv1alpha1.ClusterConditionReady, + Status: metav1.ConditionTrue, + }, + observedCondition: &metav1.Condition{ + Type: clusterv1alpha1.ClusterConditionReady, + Status: metav1.ConditionFalse, + }, + expectedCondition: &metav1.Condition{ + Type: clusterv1alpha1.ClusterConditionReady, + Status: metav1.ConditionTrue, // should retain old status due to threshold + }, + }, + { + name: "ready condition changes from false to true", + clusterData: &clusterData{ + readyCondition: metav1.ConditionFalse, + thresholdStartTime: time.Now().Add(-10 * time.Minute), + }, + currentCondition: &metav1.Condition{ + Type: clusterv1alpha1.ClusterConditionReady, + Status: metav1.ConditionFalse, + }, + observedCondition: &metav1.Condition{ + Type: clusterv1alpha1.ClusterConditionReady, + Status: metav1.ConditionTrue, + }, + expectedCondition: &metav1.Condition{ + Type: clusterv1alpha1.ClusterConditionReady, + Status: metav1.ConditionFalse, // should retain old status due to threshold + }, + }, + { + name: "current condition is nil, should return observed condition", + clusterData: &clusterData{ + readyCondition: metav1.ConditionFalse, + thresholdStartTime: time.Now().Add(-clusterFailureThreshold), + }, + currentCondition: nil, // No current condition + observedCondition: &metav1.Condition{ + Type: clusterv1alpha1.ClusterConditionReady, + Status: metav1.ConditionTrue, + }, + expectedCondition: &metav1.Condition{ + Type: clusterv1alpha1.ClusterConditionReady, + Status: metav1.ConditionTrue, + }, + }, } for _, tt := range tests { diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go b/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go index 5599082ae9cb..bf71684f4560 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/api.go b/vendor/github.com/Azure/go-ansiterm/winterm/api.go index 6055e33b912b..2f297601b56c 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/api.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/api.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go b/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go index cbec8f728f49..644d8b2b4829 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go index 3ee06ea72824..6b4b8a1ef169 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go index 244b5fa25efb..1298544a3328 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go b/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go index 2d27fa1d0288..03ab280c1831 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go b/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go index afa7635d77ba..3535349f0ed2 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go index 2d40fb75ad0b..1e19ea0c3772 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go index e24f0c5d5c04..663159c50336 100644 --- a/vendor/github.com/BurntSushi/toml/decode.go +++ b/vendor/github.com/BurntSushi/toml/decode.go @@ -82,7 +82,7 @@ func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error { // UnmarshalText method. See the Unmarshaler example for a demonstration with // time duration strings. // -// Key mapping +// # Key mapping // // TOML keys can map to either keys in a Go map or field names in a Go struct. // The special `toml` struct tag can be used to map TOML keys to struct fields diff --git a/vendor/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go index dee4e6d31961..b5692b853b6b 100644 --- a/vendor/github.com/BurntSushi/toml/encode.go +++ b/vendor/github.com/BurntSushi/toml/encode.go @@ -638,16 +638,15 @@ func (enc *Encoder) newline() { // Write a key/value pair: // -// key = +// key = // // This is also used for "k = v" in inline tables; so something like this will // be written in three calls: // -// ┌────────────────────┐ -// │ ┌───┐ ┌─────┐│ -// v v v v vv -// key = {k = v, k2 = v2} -// +// ┌────────────────────┐ +// │ ┌───┐ ┌─────┐│ +// v v v v vv +// key = {k = v, k2 = v2} func (enc *Encoder) writeKeyValue(key Key, val reflect.Value, inline bool) { if len(key) == 0 { encPanic(errNoKey) diff --git a/vendor/github.com/BurntSushi/toml/error.go b/vendor/github.com/BurntSushi/toml/error.go index 36edc46554ed..e49a453a24d8 100644 --- a/vendor/github.com/BurntSushi/toml/error.go +++ b/vendor/github.com/BurntSushi/toml/error.go @@ -12,44 +12,44 @@ import ( // In addition to the error message itself, you can also print detailed location // information with context by using ErrorWithLocation(): // -// toml: error: Key 'fruit' was already created and cannot be used as an array. +// toml: error: Key 'fruit' was already created and cannot be used as an array. // -// At line 4, column 2-7: +// At line 4, column 2-7: // -// 2 | fruit = [] -// 3 | -// 4 | [[fruit]] # Not allowed -// ^^^^^ +// 2 | fruit = [] +// 3 | +// 4 | [[fruit]] # Not allowed +// ^^^^^ // // Furthermore, the ErrorWithUsage() can be used to print the above with some // more detailed usage guidance: // -// toml: error: newlines not allowed within inline tables +// toml: error: newlines not allowed within inline tables // -// At line 1, column 18: +// At line 1, column 18: // -// 1 | x = [{ key = 42 # -// ^ +// 1 | x = [{ key = 42 # +// ^ // -// Error help: +// Error help: // -// Inline tables must always be on a single line: +// Inline tables must always be on a single line: // -// table = {key = 42, second = 43} +// table = {key = 42, second = 43} // -// It is invalid to split them over multiple lines like so: +// It is invalid to split them over multiple lines like so: // -// # INVALID -// table = { -// key = 42, -// second = 43 -// } +// # INVALID +// table = { +// key = 42, +// second = 43 +// } // -// Use regular for this: +// Use regular for this: // -// [table] -// key = 42 -// second = 43 +// [table] +// key = 42 +// second = 43 type ParseError struct { Message string // Short technical message. Usage string // Longer message with usage guidance; may be blank. diff --git a/vendor/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go index 63ef20f47453..394c9a2ad312 100644 --- a/vendor/github.com/BurntSushi/toml/lex.go +++ b/vendor/github.com/BurntSushi/toml/lex.go @@ -756,7 +756,7 @@ func lexRawString(lx *lexer) stateFn { } // lexMultilineRawString consumes a raw string. Nothing can be escaped in such -// a string. It assumes that the beginning "'''" has already been consumed and +// a string. It assumes that the beginning "”'" has already been consumed and // ignored. func lexMultilineRawString(lx *lexer) stateFn { r := lx.next() diff --git a/vendor/github.com/MakeNowJust/heredoc/heredoc.go b/vendor/github.com/MakeNowJust/heredoc/heredoc.go index 1fc04695551f..fd3dd86c0520 100644 --- a/vendor/github.com/MakeNowJust/heredoc/heredoc.go +++ b/vendor/github.com/MakeNowJust/heredoc/heredoc.go @@ -6,27 +6,27 @@ // // Golang supports raw-string syntax. // -// doc := ` -// Foo -// Bar -// ` +// doc := ` +// Foo +// Bar +// ` // // But raw-string cannot recognize indentation. Thus such content is an indented string, equivalent to // -// "\n\tFoo\n\tBar\n" +// "\n\tFoo\n\tBar\n" // // I dont't want this! // // However this problem is solved by package heredoc. // -// doc := heredoc.Doc(` -// Foo -// Bar -// `) +// doc := heredoc.Doc(` +// Foo +// Bar +// `) // // Is equivalent to // -// "Foo\nBar\n" +// "Foo\nBar\n" package heredoc import ( diff --git a/vendor/github.com/NYTimes/gziphandler/gzip_go18.go b/vendor/github.com/NYTimes/gziphandler/gzip_go18.go index fa9665b7e801..05d8bcf3d524 100644 --- a/vendor/github.com/NYTimes/gziphandler/gzip_go18.go +++ b/vendor/github.com/NYTimes/gziphandler/gzip_go18.go @@ -1,3 +1,4 @@ +//go:build go1.8 // +build go1.8 package gziphandler diff --git a/vendor/github.com/asaskevich/govalidator/types.go b/vendor/github.com/asaskevich/govalidator/types.go index c573abb51aff..e846711696d4 100644 --- a/vendor/github.com/asaskevich/govalidator/types.go +++ b/vendor/github.com/asaskevich/govalidator/types.go @@ -177,7 +177,7 @@ type ISO3166Entry struct { Numeric string } -//ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes" +// ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes" var ISO3166List = []ISO3166Entry{ {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"}, {"Albania", "Albanie (l')", "AL", "ALB", "008"}, @@ -467,7 +467,7 @@ type ISO693Entry struct { English string } -//ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json +// ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json var ISO693List = []ISO693Entry{ {Alpha3bCode: "aar", Alpha2Code: "aa", English: "Afar"}, {Alpha3bCode: "abk", Alpha2Code: "ab", English: "Abkhazian"}, diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go index c9c4fac0655a..4779e820e35b 100644 --- a/vendor/github.com/asaskevich/govalidator/validator.go +++ b/vendor/github.com/asaskevich/govalidator/validator.go @@ -37,25 +37,32 @@ const rfc3339WithoutZone = "2006-01-02T15:04:05" // SetFieldsRequiredByDefault causes validation to fail when struct fields // do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). // This struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): -// type exampleStruct struct { -// Name string `` -// Email string `valid:"email"` +// +// type exampleStruct struct { +// Name string `` +// Email string `valid:"email"` +// // This, however, will only fail when Email is empty or an invalid email address: -// type exampleStruct2 struct { -// Name string `valid:"-"` -// Email string `valid:"email"` +// +// type exampleStruct2 struct { +// Name string `valid:"-"` +// Email string `valid:"email"` +// // Lastly, this will only fail when Email is an invalid email address but not when it's empty: -// type exampleStruct2 struct { -// Name string `valid:"-"` -// Email string `valid:"email,optional"` +// +// type exampleStruct2 struct { +// Name string `valid:"-"` +// Email string `valid:"email,optional"` func SetFieldsRequiredByDefault(value bool) { fieldsRequiredByDefault = value } // SetNilPtrAllowedByRequired causes validation to pass for nil ptrs when a field is set to required. // The validation will still reject ptr fields in their zero value state. Example with this enabled: -// type exampleStruct struct { -// Name *string `valid:"required"` +// +// type exampleStruct struct { +// Name *string `valid:"required"` +// // With `Name` set to "", this will be considered invalid input and will cause a validation error. // With `Name` set to nil, this will be considered valid by validation. // By default this is disabled. @@ -154,8 +161,8 @@ func IsAlpha(str string) bool { return rxAlpha.MatchString(str) } -//IsUTFLetter checks if the string contains only unicode letter characters. -//Similar to IsAlpha but for all languages. Empty string is valid. +// IsUTFLetter checks if the string contains only unicode letter characters. +// Similar to IsAlpha but for all languages. Empty string is valid. func IsUTFLetter(str string) bool { if IsNull(str) { return true @@ -398,8 +405,8 @@ const ulidEncodedSize = 26 // IsULID checks if the string is a ULID. // // Implementation got from: -// https://github.com/oklog/ulid (Apache-2.0 License) // +// https://github.com/oklog/ulid (Apache-2.0 License) func IsULID(str string) bool { // Check if a base32 encoded ULID is the right length. if len(str) != ulidEncodedSize { @@ -454,26 +461,26 @@ func IsCreditCard(str string) bool { if !rxCreditCard.MatchString(sanitized) { return false } - + number, _ := ToInt(sanitized) - number, lastDigit := number / 10, number % 10 + number, lastDigit := number/10, number%10 var sum int64 - for i:=0; number > 0; i++ { + for i := 0; number > 0; i++ { digit := number % 10 - - if i % 2 == 0 { + + if i%2 == 0 { digit *= 2 if digit > 9 { digit -= 9 } } - + sum += digit number = number / 10 } - - return (sum + lastDigit) % 10 == 0 + + return (sum+lastDigit)%10 == 0 } // IsISBN10 checks if the string is an ISBN version 10. @@ -595,7 +602,7 @@ func IsFilePath(str string) (bool, int) { return false, Unknown } -//IsWinFilePath checks both relative & absolute paths in Windows +// IsWinFilePath checks both relative & absolute paths in Windows func IsWinFilePath(str string) bool { if rxARWinPath.MatchString(str) { //check windows path limit see: @@ -608,7 +615,7 @@ func IsWinFilePath(str string) bool { return false } -//IsUnixFilePath checks both relative & absolute paths in Unix +// IsUnixFilePath checks both relative & absolute paths in Unix func IsUnixFilePath(str string) bool { if rxARUnixPath.MatchString(str) { return true @@ -1000,7 +1007,8 @@ func ValidateArray(array []interface{}, iterator ConditionIterator) bool { // result will be equal to `false` if there are any errors. // s is the map containing the data to be validated. // m is the validation map in the form: -// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}} +// +// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}} func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) { if s == nil { return true, nil diff --git a/vendor/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go index d7d14f8eb63d..593625434f2d 100644 --- a/vendor/github.com/beorn7/perks/quantile/stream.go +++ b/vendor/github.com/beorn7/perks/quantile/stream.go @@ -9,7 +9,7 @@ // // For more detailed information about the algorithm used, see: // -// Effective Computation of Biased Quantiles over Data Streams +// # Effective Computation of Biased Quantiles over Data Streams // // http://www.cs.rutgers.edu/~muthu/bquant.pdf package quantile diff --git a/vendor/github.com/blang/semver/v4/range.go b/vendor/github.com/blang/semver/v4/range.go index 95f7139b9770..b6ee1d8bcb88 100644 --- a/vendor/github.com/blang/semver/v4/range.go +++ b/vendor/github.com/blang/semver/v4/range.go @@ -67,8 +67,8 @@ func (vr *versionRange) rangeFunc() Range { // Range represents a range of versions. // A Range can be used to check if a Version satisfies it: // -// range, err := semver.ParseRange(">1.0.0 <2.0.0") -// range(semver.MustParse("1.1.1") // returns true +// range, err := semver.ParseRange(">1.0.0 <2.0.0") +// range(semver.MustParse("1.1.1") // returns true type Range func(Version) bool // OR combines the existing Range with another Range using logical OR. @@ -108,7 +108,7 @@ func (rf Range) AND(f Range) Range { // // Ranges can be combined by both AND and OR // -// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` +// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` func ParseRange(s string) (Range, error) { parts := splitAndTrim(s) orParts, err := splitORParts(parts) diff --git a/vendor/github.com/cenkalti/backoff/v4/exponential.go b/vendor/github.com/cenkalti/backoff/v4/exponential.go index 2c56c1e7189b..392d100e877b 100644 --- a/vendor/github.com/cenkalti/backoff/v4/exponential.go +++ b/vendor/github.com/cenkalti/backoff/v4/exponential.go @@ -11,17 +11,17 @@ period for each retry attempt using a randomization function that grows exponent NextBackOff() is calculated using the following formula: - randomized interval = - RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor]) + randomized interval = + RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor]) In other words NextBackOff() will range between the randomization factor percentage below and above the retry interval. For example, given the following parameters: - RetryInterval = 2 - RandomizationFactor = 0.5 - Multiplier = 2 + RetryInterval = 2 + RandomizationFactor = 0.5 + Multiplier = 2 the actual backoff period used in the next retry attempt will range between 1 and 3 seconds, multiplied by the exponential, that is, between 2 and 6 seconds. @@ -36,18 +36,18 @@ The elapsed time can be reset by calling Reset(). Example: Given the following default arguments, for 10 tries the sequence will be, and assuming we go over the MaxElapsedTime on the 10th try: - Request # RetryInterval (seconds) Randomized Interval (seconds) + Request # RetryInterval (seconds) Randomized Interval (seconds) - 1 0.5 [0.25, 0.75] - 2 0.75 [0.375, 1.125] - 3 1.125 [0.562, 1.687] - 4 1.687 [0.8435, 2.53] - 5 2.53 [1.265, 3.795] - 6 3.795 [1.897, 5.692] - 7 5.692 [2.846, 8.538] - 8 8.538 [4.269, 12.807] - 9 12.807 [6.403, 19.210] - 10 19.210 backoff.Stop + 1 0.5 [0.25, 0.75] + 2 0.75 [0.375, 1.125] + 3 1.125 [0.562, 1.687] + 4 1.687 [0.8435, 2.53] + 5 2.53 [1.265, 3.795] + 6 3.795 [1.897, 5.692] + 7 5.692 [2.846, 8.538] + 8 8.538 [4.269, 12.807] + 9 12.807 [6.403, 19.210] + 10 19.210 backoff.Stop Note: Implementation is not thread-safe. */ @@ -112,7 +112,8 @@ func (b *ExponentialBackOff) Reset() { } // NextBackOff calculates the next backoff interval using the formula: -// Randomized interval = RetryInterval * (1 ± RandomizationFactor) +// +// Randomized interval = RetryInterval * (1 ± RandomizationFactor) func (b *ExponentialBackOff) NextBackOff() time.Duration { // Make sure we have not gone over the maximum elapsed time. elapsed := b.GetElapsedTime() @@ -145,7 +146,8 @@ func (b *ExponentialBackOff) incrementCurrentInterval() { } // Returns a random value from the following interval: -// [currentInterval - randomizationFactor * currentInterval, currentInterval + randomizationFactor * currentInterval]. +// +// [currentInterval - randomizationFactor * currentInterval, currentInterval + randomizationFactor * currentInterval]. func getRandomValueFromInterval(randomizationFactor, random float64, currentInterval time.Duration) time.Duration { if randomizationFactor == 0 { return currentInterval // make sure no randomness is used when randomizationFactor is 0. diff --git a/vendor/github.com/chai2010/gettext-go/doc.go b/vendor/github.com/chai2010/gettext-go/doc.go index 50dfea3305bc..642c87d14b56 100644 --- a/vendor/github.com/chai2010/gettext-go/doc.go +++ b/vendor/github.com/chai2010/gettext-go/doc.go @@ -6,6 +6,7 @@ Package gettext implements a basic GNU's gettext library. Example: + import ( "github.com/chai2010/gettext-go" ) @@ -54,6 +55,7 @@ Translate directory struct("./examples/locale.zip"): \-poems.txt # $(lang)/$(domain)/poems.txt See: + http://en.wikipedia.org/wiki/Gettext http://www.gnu.org/software/gettext/manual/html_node http://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html diff --git a/vendor/github.com/chai2010/gettext-go/gettext.go b/vendor/github.com/chai2010/gettext-go/gettext.go index 7747188ab4fb..a4cb030e2716 100644 --- a/vendor/github.com/chai2010/gettext-go/gettext.go +++ b/vendor/github.com/chai2010/gettext-go/gettext.go @@ -52,16 +52,18 @@ func init() { // BindLocale sets and queries program's domains. // // Examples: +// // BindLocale(New("poedit", "locale")) // bind "poedit" domain // // Use zip file: +// // BindLocale(New("poedit", "locale.zip")) // bind "poedit" domain // BindLocale(New("poedit", "locale.zip", zipData)) // bind "poedit" domain // // Use FileSystem: +// // BindLocale(New("poedit", "name", OS("path/to/dir"))) // bind "poedit" domain // BindLocale(New("poedit", "name", OS("path/to.zip"))) // bind "poedit" domain -// func BindLocale(g Gettexter) { if g != nil { defaultGettexter.Gettexter = g @@ -81,6 +83,7 @@ func BindLocale(g Gettexter) { // Returns is the current locale. // // Examples: +// // SetLanguage("") // get locale: return DefaultLocale // SetLanguage("zh_CN") // set locale: return zh_CN // SetLanguage("") // get locale: return zh_CN @@ -98,6 +101,7 @@ func SetLanguage(lang string) string { // Returns is the all used domains. // // Examples: +// // SetDomain("poedit") // set domain: poedit // SetDomain("") // get domain: return poedit func SetDomain(domain string) string { @@ -111,6 +115,7 @@ func SetDomain(domain string) string { // It use the caller's function name as the msgctxt. // // Examples: +// // func Foo() { // msg := gettext.Gettext("Hello") // msgctxt is "" // } @@ -122,6 +127,7 @@ func Gettext(msgid string) string { // by looking up the translation in a message catalog. // // Examples: +// // func Foo() { // Textdomain("hello") // BindLocale("hello", "locale.zip", nilOrZipData) @@ -138,6 +144,7 @@ func Getdata(name string) []byte { // It use the caller's function name as the msgctxt. // // Examples: +// // func Foo() { // msg := gettext.NGettext("%d people", "%d peoples", 2) // } @@ -149,6 +156,7 @@ func NGettext(msgid, msgidPlural string, n int) string { // by looking up the translation in a message catalog. // // Examples: +// // func Foo() { // msg := gettext.PGettext("gettext-go.example", "Hello") // msgctxt is "gettext-go.example" // } @@ -161,6 +169,7 @@ func PGettext(msgctxt, msgid string) string { // catalog. // // Examples: +// // func Foo() { // msg := gettext.PNGettext("gettext-go.example", "%d people", "%d peoples", 2) // } @@ -171,6 +180,7 @@ func PNGettext(msgctxt, msgid, msgidPlural string, n int) string { // DGettext like Gettext(), but looking up the message in the specified domain. // // Examples: +// // func Foo() { // msg := gettext.DGettext("poedit", "Hello") // } @@ -181,6 +191,7 @@ func DGettext(domain, msgid string) string { // DNGettext like NGettext(), but looking up the message in the specified domain. // // Examples: +// // func Foo() { // msg := gettext.PNGettext("poedit", "gettext-go.example", "%d people", "%d peoples", 2) // } @@ -191,6 +202,7 @@ func DNGettext(domain, msgid, msgidPlural string, n int) string { // DPGettext like PGettext(), but looking up the message in the specified domain. // // Examples: +// // func Foo() { // msg := gettext.DPGettext("poedit", "gettext-go.example", "Hello") // } @@ -201,6 +213,7 @@ func DPGettext(domain, msgctxt, msgid string) string { // DPNGettext like PNGettext(), but looking up the message in the specified domain. // // Examples: +// // func Foo() { // msg := gettext.DPNGettext("poedit", "gettext-go.example", "%d people", "%d peoples", 2) // } @@ -211,6 +224,7 @@ func DPNGettext(domain, msgctxt, msgid, msgidPlural string, n int) string { // DGetdata like Getdata(), but looking up the resource in the specified domain. // // Examples: +// // func Foo() { // msg := gettext.DGetdata("hello", "poems.txt") // } diff --git a/vendor/github.com/chai2010/gettext-go/mo/doc.go b/vendor/github.com/chai2010/gettext-go/mo/doc.go index 5fefc1893084..637c08c41621 100644 --- a/vendor/github.com/chai2010/gettext-go/mo/doc.go +++ b/vendor/github.com/chai2010/gettext-go/mo/doc.go @@ -6,6 +6,7 @@ Package mo provides support for reading and writing GNU MO file. Examples: + import ( "github.com/chai2010/gettext-go/mo" ) diff --git a/vendor/github.com/chai2010/gettext-go/plural/doc.go b/vendor/github.com/chai2010/gettext-go/plural/doc.go index 31cb8fae9fef..0ad6f5c217fc 100644 --- a/vendor/github.com/chai2010/gettext-go/plural/doc.go +++ b/vendor/github.com/chai2010/gettext-go/plural/doc.go @@ -6,6 +6,7 @@ Package plural provides standard plural formulas. Examples: + import ( "github.com/chai2010/gettext-go/plural" ) diff --git a/vendor/github.com/chai2010/gettext-go/po/doc.go b/vendor/github.com/chai2010/gettext-go/po/doc.go index 6cfa2a24be9f..757ae4693d77 100644 --- a/vendor/github.com/chai2010/gettext-go/po/doc.go +++ b/vendor/github.com/chai2010/gettext-go/po/doc.go @@ -6,6 +6,7 @@ Package po provides support for reading and writing GNU PO file. Examples: + import ( "github.com/chai2010/gettext-go/po" ) diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go index 792994785e36..70ddeaad3e56 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -18,6 +18,7 @@ // tag is deprecated and thus should not be used. // Go versions prior to 1.4 are disabled because they use a different layout // for interfaces which make the implementation of unsafeReflectValue more complex. +//go:build !js && !appengine && !safe && !disableunsafe && go1.4 // +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go index 205c28d68c47..5e2d890d6ac8 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -16,6 +16,7 @@ // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. +//go:build js || appengine || safe || disableunsafe || !go1.4 // +build js appengine safe disableunsafe !go1.4 package spew diff --git a/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/davecgh/go-spew/spew/config.go index 2e3d22f31202..161895fc6db8 100644 --- a/vendor/github.com/davecgh/go-spew/spew/config.go +++ b/vendor/github.com/davecgh/go-spew/spew/config.go @@ -254,15 +254,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by modifying the public members of c. See ConfigState for options documentation. @@ -295,12 +295,12 @@ func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) // NewDefaultConfig returns a ConfigState with the following default settings. // -// Indent: " " -// MaxDepth: 0 -// DisableMethods: false -// DisablePointerMethods: false -// ContinueOnMethod: false -// SortKeys: false +// Indent: " " +// MaxDepth: 0 +// DisableMethods: false +// DisablePointerMethods: false +// ContinueOnMethod: false +// SortKeys: false func NewDefaultConfig() *ConfigState { return &ConfigState{Indent: " "} } diff --git a/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/davecgh/go-spew/spew/doc.go index aacaac6f1e1e..722e9aa7912c 100644 --- a/vendor/github.com/davecgh/go-spew/spew/doc.go +++ b/vendor/github.com/davecgh/go-spew/spew/doc.go @@ -21,35 +21,36 @@ debugging. A quick overview of the additional features spew provides over the built-in printing facilities for Go data types are as follows: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output (only when using - Dump style) + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output (only when using + Dump style) There are two different approaches spew allows for dumping Go data structures: - * Dump style which prints with newlines, customizable indentation, - and additional debug information such as types and all pointer addresses - used to indirect to the final value - * A custom Formatter interface that integrates cleanly with the standard fmt - package and replaces %v, %+v, %#v, and %#+v to provide inline printing - similar to the default %v while providing the additional functionality - outlined above and passing unsupported format verbs such as %x and %q - along to fmt + - Dump style which prints with newlines, customizable indentation, + and additional debug information such as types and all pointer addresses + used to indirect to the final value + - A custom Formatter interface that integrates cleanly with the standard fmt + package and replaces %v, %+v, %#v, and %#+v to provide inline printing + similar to the default %v while providing the additional functionality + outlined above and passing unsupported format verbs such as %x and %q + along to fmt -Quick Start +# Quick Start This section demonstrates how to quickly get started with spew. See the sections below for further details on formatting and configuration options. To dump a variable with full newlines, indentation, type, and pointer information use Dump, Fdump, or Sdump: + spew.Dump(myVar1, myVar2, ...) spew.Fdump(someWriter, myVar1, myVar2, ...) str := spew.Sdump(myVar1, myVar2, ...) @@ -58,12 +59,13 @@ Alternatively, if you would prefer to use format strings with a compacted inline printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses): + spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -Configuration Options +# Configuration Options Configuration of spew is handled by fields in the ConfigState type. For convenience, all of the top-level functions use a global state available @@ -74,51 +76,52 @@ equivalent to the top-level functions. This allows concurrent configuration options. See the ConfigState documentation for more details. The following configuration options are available: - * Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - - * MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - - * DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - - * DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. - Pointer method invocation is enabled by default. - - * DisablePointerAddresses - DisablePointerAddresses specifies whether to disable the printing of - pointer addresses. This is useful when diffing data structures in tests. - - * DisableCapacities - DisableCapacities specifies whether to disable the printing of - capacities for arrays, slices, maps and channels. This is useful when - diffing data structures in tests. - - * ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - - * SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are - supported with other types sorted according to the - reflect.Value.String() output which guarantees display - stability. Natural map order is used by default. - - * SpewKeys - Specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only - considered if SortKeys is true. - -Dump Usage + + - Indent + String to use for each indentation level for Dump functions. + It is a single space by default. A popular alternative is "\t". + + - MaxDepth + Maximum number of levels to descend into nested data structures. + There is no limit by default. + + - DisableMethods + Disables invocation of error and Stringer interface methods. + Method invocation is enabled by default. + + - DisablePointerMethods + Disables invocation of error and Stringer interface methods on types + which only accept pointer receivers from non-pointer variables. + Pointer method invocation is enabled by default. + + - DisablePointerAddresses + DisablePointerAddresses specifies whether to disable the printing of + pointer addresses. This is useful when diffing data structures in tests. + + - DisableCapacities + DisableCapacities specifies whether to disable the printing of + capacities for arrays, slices, maps and channels. This is useful when + diffing data structures in tests. + + - ContinueOnMethod + Enables recursion into types after invoking error and Stringer interface + methods. Recursion after method invocation is disabled by default. + + - SortKeys + Specifies map keys should be sorted before being printed. Use + this to have a more deterministic, diffable output. Note that + only native types (bool, int, uint, floats, uintptr and string) + and types which implement error or Stringer interfaces are + supported with other types sorted according to the + reflect.Value.String() output which guarantees display + stability. Natural map order is used by default. + + - SpewKeys + Specifies that, as a last resort attempt, map keys should be + spewed to strings and sorted by those strings. This is only + considered if SortKeys is true. + +# Dump Usage Simply call spew.Dump with a list of variables you want to dump: @@ -133,7 +136,7 @@ A third option is to call spew.Sdump to get the formatted output as a string: str := spew.Sdump(myVar1, myVar2, ...) -Sample Dump Output +# Sample Dump Output See the Dump example for details on the setup of the types and variables being shown here. @@ -150,13 +153,14 @@ shown here. Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C command as shown. + ([]uint8) (len=32 cap=32) { 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| 00000020 31 32 |12| } -Custom Formatter +# Custom Formatter Spew provides a custom formatter that implements the fmt.Formatter interface so that it integrates cleanly with standard fmt package printing functions. The @@ -170,7 +174,7 @@ standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). -Custom Formatter Usage +# Custom Formatter Usage The simplest way to make use of the spew custom formatter is to call one of the convenience functions such as spew.Printf, spew.Println, or spew.Printf. The @@ -184,15 +188,17 @@ functions have syntax you are most likely already familiar with: See the Index for the full list convenience functions. -Sample Formatter Output +# Sample Formatter Output Double pointer to a uint8: + %v: <**>5 %+v: <**>(0xf8400420d0->0xf8400420c8)5 %#v: (**uint8)5 %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 Pointer to circular struct with a uint8 field and a pointer to itself: + %v: <*>{1 <*>} %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} @@ -201,7 +207,7 @@ Pointer to circular struct with a uint8 field and a pointer to itself: See the Printf example for details on the setup of variables being shown here. -Errors +# Errors Since it is possible for custom Stringer/error interfaces to panic, spew detects them and handles them internally by printing the panic information diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go index f78d89fc1f6c..8323041a4811 100644 --- a/vendor/github.com/davecgh/go-spew/spew/dump.go +++ b/vendor/github.com/davecgh/go-spew/spew/dump.go @@ -488,15 +488,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by an exported package global, spew.Config. See ConfigState for options documentation. diff --git a/vendor/github.com/emicklei/go-restful/v3/curly.go b/vendor/github.com/emicklei/go-restful/v3/curly.go index ba1fc5d5f15a..d7a27a9a87db 100644 --- a/vendor/github.com/emicklei/go-restful/v3/curly.go +++ b/vendor/github.com/emicklei/go-restful/v3/curly.go @@ -72,7 +72,7 @@ func (c CurlyRouter) matchesRouteByPathTokens(routeTokens, requestTokens []strin return false, 0, 0 } requestToken := requestTokens[i] - if routeHasCustomVerb && hasCustomVerb(routeToken){ + if routeHasCustomVerb && hasCustomVerb(routeToken) { if !isMatchCustomVerb(routeToken, requestToken) { return false, 0, 0 } diff --git a/vendor/github.com/emicklei/go-restful/v3/doc.go b/vendor/github.com/emicklei/go-restful/v3/doc.go index 69b13057d017..5bdb9bb1864e 100644 --- a/vendor/github.com/emicklei/go-restful/v3/doc.go +++ b/vendor/github.com/emicklei/go-restful/v3/doc.go @@ -1,7 +1,7 @@ /* Package restful , a lean package for creating REST-style WebServices without magic. -WebServices and Routes +# WebServices and Routes A WebService has a collection of Route objects that dispatch incoming Http Requests to a function calls. Typically, a WebService has a root path (e.g. /users) and defines common MIME types for its routes. @@ -30,14 +30,14 @@ The (*Request, *Response) arguments provide functions for reading information fr See the example https://github.com/emicklei/go-restful/blob/v3/examples/user-resource/restful-user-resource.go with a full implementation. -Regular expression matching Routes +# Regular expression matching Routes A Route parameter can be specified using the format "uri/{var[:regexp]}" or the special version "uri/{var:*}" for matching the tail of the path. For example, /persons/{name:[A-Z][A-Z]} can be used to restrict values for the parameter "name" to only contain capital alphabetic characters. Regular expressions must use the standard Go syntax as described in the regexp package. (https://code.google.com/p/re2/wiki/Syntax) This feature requires the use of a CurlyRouter. -Containers +# Containers A Container holds a collection of WebServices, Filters and a http.ServeMux for multiplexing http requests. Using the statements "restful.Add(...) and restful.Filter(...)" will register WebServices and Filters to the Default Container. @@ -47,7 +47,7 @@ You can create your own Container and create a new http.Server for that particul container := restful.NewContainer() server := &http.Server{Addr: ":8081", Handler: container} -Filters +# Filters A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses. You can use filters to perform generic logging, measurement, authentication, redirect, set response headers etc. @@ -60,22 +60,21 @@ Use the following statement to pass the request,response pair to the next filter chain.ProcessFilter(req, resp) -Container Filters +# Container Filters These are processed before any registered WebService. // install a (global) filter for the default container (processed before any webservice) restful.Filter(globalLogging) -WebService Filters +# WebService Filters These are processed before any Route of a WebService. // install a webservice filter (processed before any route) ws.Filter(webserviceLogging).Filter(measureTime) - -Route Filters +# Route Filters These are processed before calling the function associated with the Route. @@ -84,7 +83,7 @@ These are processed before calling the function associated with the Route. See the example https://github.com/emicklei/go-restful/blob/v3/examples/filters/restful-filters.go with full implementations. -Response Encoding +# Response Encoding Two encodings are supported: gzip and deflate. To enable this for all responses: @@ -95,20 +94,20 @@ Alternatively, you can create a Filter that performs the encoding and install it See the example https://github.com/emicklei/go-restful/blob/v3/examples/encoding/restful-encoding-filter.go -OPTIONS support +# OPTIONS support By installing a pre-defined container filter, your Webservice(s) can respond to the OPTIONS Http request. Filter(OPTIONSFilter()) -CORS +# CORS By installing the filter of a CrossOriginResourceSharing (CORS), your WebService(s) can handle CORS requests. cors := CrossOriginResourceSharing{ExposeHeaders: []string{"X-My-Header"}, CookiesAllowed: false, Container: DefaultContainer} Filter(cors.Filter) -Error Handling +# Error Handling Unexpected things happen. If a request cannot be processed because of a failure, your service needs to tell via the response what happened and why. For this reason HTTP status codes exist and it is important to use the correct code in every exceptional situation. @@ -137,11 +136,11 @@ The request does not have or has an unknown Accept Header set for this operation The request does not have or has an unknown Content-Type Header set for this operation. -ServiceError +# ServiceError In addition to setting the correct (error) Http status code, you can choose to write a ServiceError message on the response. -Performance options +# Performance options This package has several options that affect the performance of your service. It is important to understand them and how you can change it. @@ -156,30 +155,27 @@ Default value is true If content encoding is enabled then the default strategy for getting new gzip/zlib writers and readers is to use a sync.Pool. Because writers are expensive structures, performance is even more improved when using a preloaded cache. You can also inject your own implementation. -Trouble shooting +# Trouble shooting This package has the means to produce detail logging of the complete Http request matching process and filter invocation. Enabling this feature requires you to set an implementation of restful.StdLogger (e.g. log.Logger) instance such as: restful.TraceLogger(log.New(os.Stdout, "[restful] ", log.LstdFlags|log.Lshortfile)) -Logging +# Logging The restful.SetLogger() method allows you to override the logger used by the package. By default restful uses the standard library `log` package and logs to stdout. Different logging packages are supported as long as they conform to `StdLogger` interface defined in the `log` sub-package, writing an adapter for your preferred package is simple. -Resources +# Resources -[project]: https://github.com/emicklei/go-restful +(c) 2012-2015, http://ernestmicklei.com. MIT License +[project]: https://github.com/emicklei/go-restful [examples]: https://github.com/emicklei/go-restful/blob/master/examples - -[design]: http://ernestmicklei.com/2012/11/11/go-restful-api-design/ - +[design]: http://ernestmicklei.com/2012/11/11/go-restful-api-design/ [showcases]: https://github.com/emicklei/mora, https://github.com/emicklei/landskape - -(c) 2012-2015, http://ernestmicklei.com. MIT License */ package restful diff --git a/vendor/github.com/emicklei/go-restful/v3/json.go b/vendor/github.com/emicklei/go-restful/v3/json.go index 871165166a16..23a83fb4095e 100644 --- a/vendor/github.com/emicklei/go-restful/v3/json.go +++ b/vendor/github.com/emicklei/go-restful/v3/json.go @@ -1,3 +1,4 @@ +//go:build !jsoniter // +build !jsoniter package restful diff --git a/vendor/github.com/emicklei/go-restful/v3/jsoniter.go b/vendor/github.com/emicklei/go-restful/v3/jsoniter.go index 11b8f8ae7f17..ba9dd9abf07f 100644 --- a/vendor/github.com/emicklei/go-restful/v3/jsoniter.go +++ b/vendor/github.com/emicklei/go-restful/v3/jsoniter.go @@ -1,3 +1,4 @@ +//go:build jsoniter // +build jsoniter package restful diff --git a/vendor/github.com/emicklei/go-restful/v3/response.go b/vendor/github.com/emicklei/go-restful/v3/response.go index a41a92cc2c35..09fb3c752814 100644 --- a/vendor/github.com/emicklei/go-restful/v3/response.go +++ b/vendor/github.com/emicklei/go-restful/v3/response.go @@ -14,7 +14,7 @@ import ( // DefaultResponseMimeType is DEPRECATED, use DefaultResponseContentType(mime) var DefaultResponseMimeType string -//PrettyPrintResponses controls the indentation feature of XML and JSON serialization +// PrettyPrintResponses controls the indentation feature of XML and JSON serialization var PrettyPrintResponses = true // Response is a wrapper on the actual http ResponseWriter @@ -40,7 +40,8 @@ func NewResponse(httpWriter http.ResponseWriter) *Response { // If Accept header matching fails, fall back to this type. // Valid values are restful.MIME_JSON and restful.MIME_XML // Example: -// restful.DefaultResponseContentType(restful.MIME_JSON) +// +// restful.DefaultResponseContentType(restful.MIME_JSON) func DefaultResponseContentType(mime string) { DefaultResponseMimeType = mime } diff --git a/vendor/github.com/emicklei/go-restful/v3/web_service.go b/vendor/github.com/emicklei/go-restful/v3/web_service.go index 789c4df259fb..336a0bc2c96b 100644 --- a/vendor/github.com/emicklei/go-restful/v3/web_service.go +++ b/vendor/github.com/emicklei/go-restful/v3/web_service.go @@ -188,20 +188,20 @@ func (w *WebService) Route(builder *RouteBuilder) *WebService { // RemoveRoute removes the specified route, looks for something that matches 'path' and 'method' func (w *WebService) RemoveRoute(path, method string) error { - if !w.dynamicRoutes { - return errors.New("dynamic routes are not enabled.") - } - w.routesLock.Lock() - defer w.routesLock.Unlock() - newRoutes := []Route{} - for _, route := range w.routes { - if route.Method == method && route.Path == path { - continue - } - newRoutes = append(newRoutes, route) - } - w.routes = newRoutes - return nil + if !w.dynamicRoutes { + return errors.New("dynamic routes are not enabled.") + } + w.routesLock.Lock() + defer w.routesLock.Unlock() + newRoutes := []Route{} + for _, route := range w.routes { + if route.Method == method && route.Path == path { + continue + } + newRoutes = append(newRoutes, route) + } + w.routes = newRoutes + return nil } // Method creates a new RouteBuilder and initialize its http method diff --git a/vendor/github.com/emirpasic/gods/containers/iterator.go b/vendor/github.com/emirpasic/gods/containers/iterator.go index 73994ec82a7f..8bab70acad6d 100644 --- a/vendor/github.com/emirpasic/gods/containers/iterator.go +++ b/vendor/github.com/emirpasic/gods/containers/iterator.go @@ -72,7 +72,7 @@ type IteratorWithKey interface { // // Essentially it is the same as IteratorWithIndex, but provides additional: // -// Prev() function to enable traversal in reverse +// # Prev() function to enable traversal in reverse // // Last() function to move the iterator to the last element. // @@ -105,7 +105,7 @@ type ReverseIteratorWithIndex interface { // // Essentially it is the same as IteratorWithKey, but provides additional: // -// Prev() function to enable traversal in reverse +// # Prev() function to enable traversal in reverse // // Last() function to move the iterator to the last element. type ReverseIteratorWithKey interface { diff --git a/vendor/github.com/emirpasic/gods/lists/arraylist/arraylist.go b/vendor/github.com/emirpasic/gods/lists/arraylist/arraylist.go index 60ce4583203a..8d0aef3c62de 100644 --- a/vendor/github.com/emirpasic/gods/lists/arraylist/arraylist.go +++ b/vendor/github.com/emirpasic/gods/lists/arraylist/arraylist.go @@ -102,7 +102,7 @@ func (list *List) Values() []interface{} { return newElements } -//IndexOf returns index of provided element +// IndexOf returns index of provided element func (list *List) IndexOf(value interface{}) int { if list.size == 0 { return -1 diff --git a/vendor/github.com/emirpasic/gods/utils/comparator.go b/vendor/github.com/emirpasic/gods/utils/comparator.go index 6a9afbf3466f..b673c8018302 100644 --- a/vendor/github.com/emirpasic/gods/utils/comparator.go +++ b/vendor/github.com/emirpasic/gods/utils/comparator.go @@ -10,9 +10,10 @@ import "time" // which will panic if a or b are not of the asserted type. // // Should return a number: -// negative , if a < b -// zero , if a == b -// positive , if a > b +// +// negative , if a < b +// zero , if a == b +// positive , if a > b type Comparator func(a, b interface{}) int // StringComparator provides a fast comparison on strings diff --git a/vendor/github.com/exponent-io/jsonpath/decoder.go b/vendor/github.com/exponent-io/jsonpath/decoder.go index 31de46c73813..3de6067597d7 100644 --- a/vendor/github.com/exponent-io/jsonpath/decoder.go +++ b/vendor/github.com/exponent-io/jsonpath/decoder.go @@ -28,7 +28,7 @@ func NewDecoder(r io.Reader) *Decoder { // // Consider the JSON structure // -// { "a": [0,"s",12e4,{"b":0,"v":35} ] } +// { "a": [0,"s",12e4,{"b":0,"v":35} ] } // // SeekTo("a",3,"v") will move to the value referenced by the "a" key in the current object, // followed by a move to the 4th value (index 3) in the array, followed by a move to the value at key "v". diff --git a/vendor/github.com/fatih/camelcase/camelcase.go b/vendor/github.com/fatih/camelcase/camelcase.go index 02160c9a435d..b7e31a8f6733 100644 --- a/vendor/github.com/fatih/camelcase/camelcase.go +++ b/vendor/github.com/fatih/camelcase/camelcase.go @@ -13,37 +13,37 @@ import ( // // Examples // -// "" => [""] -// "lowercase" => ["lowercase"] -// "Class" => ["Class"] -// "MyClass" => ["My", "Class"] -// "MyC" => ["My", "C"] -// "HTML" => ["HTML"] -// "PDFLoader" => ["PDF", "Loader"] -// "AString" => ["A", "String"] -// "SimpleXMLParser" => ["Simple", "XML", "Parser"] -// "vimRPCPlugin" => ["vim", "RPC", "Plugin"] -// "GL11Version" => ["GL", "11", "Version"] -// "99Bottles" => ["99", "Bottles"] -// "May5" => ["May", "5"] -// "BFG9000" => ["BFG", "9000"] -// "BöseÜberraschung" => ["Böse", "Überraschung"] -// "Two spaces" => ["Two", " ", "spaces"] -// "BadUTF8\xe2\xe2\xa1" => ["BadUTF8\xe2\xe2\xa1"] +// "" => [""] +// "lowercase" => ["lowercase"] +// "Class" => ["Class"] +// "MyClass" => ["My", "Class"] +// "MyC" => ["My", "C"] +// "HTML" => ["HTML"] +// "PDFLoader" => ["PDF", "Loader"] +// "AString" => ["A", "String"] +// "SimpleXMLParser" => ["Simple", "XML", "Parser"] +// "vimRPCPlugin" => ["vim", "RPC", "Plugin"] +// "GL11Version" => ["GL", "11", "Version"] +// "99Bottles" => ["99", "Bottles"] +// "May5" => ["May", "5"] +// "BFG9000" => ["BFG", "9000"] +// "BöseÜberraschung" => ["Böse", "Überraschung"] +// "Two spaces" => ["Two", " ", "spaces"] +// "BadUTF8\xe2\xe2\xa1" => ["BadUTF8\xe2\xe2\xa1"] // // Splitting rules // -// 1) If string is not valid UTF-8, return it without splitting as +// 1. If string is not valid UTF-8, return it without splitting as // single item array. -// 2) Assign all unicode characters into one of 4 sets: lower case +// 2. Assign all unicode characters into one of 4 sets: lower case // letters, upper case letters, numbers, and all other characters. -// 3) Iterate through characters of string, introducing splits +// 3. Iterate through characters of string, introducing splits // between adjacent characters that belong to different sets. -// 4) Iterate through array of split strings, and if a given string +// 4. Iterate through array of split strings, and if a given string // is upper case: -// if subsequent string is lower case: -// move last character of upper case string to beginning of -// lower case string +// if subsequent string is lower case: +// move last character of upper case string to beginning of +// lower case string func Split(src string) (entries []string) { // don't split invalid utf8 if !utf8.ValidString(src) { diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go index 101cedde6744..cffd3d0526ca 100644 --- a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go +++ b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go @@ -1,4 +1,6 @@ +//go:build go1.8 // +build go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go index e0951df15278..c5ae196621a4 100644 --- a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go +++ b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go @@ -1,4 +1,6 @@ +//go:build !go1.8 // +build !go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop diff --git a/vendor/github.com/go-errors/errors/error.go b/vendor/github.com/go-errors/errors/error.go index ccbc2e4272d3..533f1bb2683e 100644 --- a/vendor/github.com/go-errors/errors/error.go +++ b/vendor/github.com/go-errors/errors/error.go @@ -9,36 +9,36 @@ // // For example: // -// package crashy +// package crashy // -// import "github.com/go-errors/errors" +// import "github.com/go-errors/errors" // -// var Crashed = errors.Errorf("oh dear") +// var Crashed = errors.Errorf("oh dear") // -// func Crash() error { -// return errors.New(Crashed) -// } +// func Crash() error { +// return errors.New(Crashed) +// } // // This can be called as follows: // -// package main +// package main // -// import ( -// "crashy" -// "fmt" -// "github.com/go-errors/errors" -// ) +// import ( +// "crashy" +// "fmt" +// "github.com/go-errors/errors" +// ) // -// func main() { -// err := crashy.Crash() -// if err != nil { -// if errors.Is(err, crashy.Crashed) { -// fmt.Println(err.(*errors.Error).ErrorStack()) -// } else { -// panic(err) -// } -// } -// } +// func main() { +// err := crashy.Crash() +// if err != nil { +// if errors.Is(err, crashy.Crashed) { +// fmt.Println(err.(*errors.Error).ErrorStack()) +// } else { +// panic(err) +// } +// } +// } // // This package was original written to allow reporting to Bugsnag, // but after I found similar packages by Facebook and Dropbox, it diff --git a/vendor/github.com/go-errors/errors/error_1_13.go b/vendor/github.com/go-errors/errors/error_1_13.go index 0af2fc806594..09d8a55575e2 100644 --- a/vendor/github.com/go-errors/errors/error_1_13.go +++ b/vendor/github.com/go-errors/errors/error_1_13.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 package errors diff --git a/vendor/github.com/go-errors/errors/error_backward.go b/vendor/github.com/go-errors/errors/error_backward.go index 80b0695e7e8c..69a794740cfd 100644 --- a/vendor/github.com/go-errors/errors/error_backward.go +++ b/vendor/github.com/go-errors/errors/error_backward.go @@ -1,3 +1,4 @@ +//go:build !go1.13 // +build !go1.13 package errors diff --git a/vendor/github.com/go-errors/errors/parse_panic.go b/vendor/github.com/go-errors/errors/parse_panic.go index cc37052d7860..d295563dfd40 100644 --- a/vendor/github.com/go-errors/errors/parse_panic.go +++ b/vendor/github.com/go-errors/errors/parse_panic.go @@ -75,8 +75,8 @@ func ParsePanic(text string) (*Error, error) { // The lines we're passing look like this: // -// main.(*foo).destruct(0xc208067e98) -// /0/go/src/github.com/bugsnag/bugsnag-go/pan/main.go:22 +0x151 +// main.(*foo).destruct(0xc208067e98) +// /0/go/src/github.com/bugsnag/bugsnag-go/pan/main.go:22 +0x151 func parsePanicFrame(name string, line string, createdBy bool) (*StackFrame, error) { idx := strings.LastIndex(name, "(") if idx == -1 && !createdBy { diff --git a/vendor/github.com/go-task/slim-sprig/functions.go b/vendor/github.com/go-task/slim-sprig/functions.go index 5ea74f899306..32a3b07462ff 100644 --- a/vendor/github.com/go-task/slim-sprig/functions.go +++ b/vendor/github.com/go-task/slim-sprig/functions.go @@ -18,8 +18,7 @@ import ( // // Use this to pass the functions into the template engine: // -// tpl := template.New("foo").Funcs(sprig.FuncMap())) -// +// tpl := template.New("foo").Funcs(sprig.FuncMap())) func FuncMap() template.FuncMap { return HtmlFuncMap() } diff --git a/vendor/github.com/gogo/protobuf/gogoproto/doc.go b/vendor/github.com/gogo/protobuf/gogoproto/doc.go index 081c86fa8ecb..40f4b7ae3780 100644 --- a/vendor/github.com/gogo/protobuf/gogoproto/doc.go +++ b/vendor/github.com/gogo/protobuf/gogoproto/doc.go @@ -35,7 +35,7 @@ Package gogoproto provides extensions for protocol buffers to achieve: - less typing by optionally generating extra helper code. - goprotobuf compatibility -More Canonical Go Structures +# More Canonical Go Structures A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. @@ -59,15 +59,15 @@ for a quicker overview. The following message: - package test; + package test; - import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } Will generate a go struct which looks a lot like this: @@ -120,12 +120,12 @@ This is typically useful when working with a protocol buffer that was designed b Gogoprotobuf also has some more subtle changes, these could be changed back: - the generated package name for imports do not have the extra /filename.pb, - but are actually the imports specified in the .proto file. + but are actually the imports specified in the .proto file. Gogoprotobuf also has lost some features which should be brought back with time: - Marshalling and unmarshalling with reflect and without the unsafe package, - this requires work in pointer_reflect.go + this requires work in pointer_reflect.go Why does nullable break protocol buffer specifications: @@ -152,7 +152,7 @@ The enumprefix, getters and stringer extensions can be used to remove some of th Less Typing and Peace of Mind is explained in their specific plugin folders godoc: - - github.com/gogo/protobuf/plugin/ + - github.com/gogo/protobuf/plugin/ If you do not use any of these extension the code that is generated will be the same as if goprotobuf has generated it. @@ -164,6 +164,5 @@ The most complete way to see examples is to look at Gogoprototest is a seperate project, because we want to keep gogoprotobuf independent of goprotobuf, but we still want to test it thoroughly. - */ package gogoproto diff --git a/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go b/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go index 486f28771929..e5e0f731d3e2 100644 --- a/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go +++ b/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go @@ -46,8 +46,7 @@ It is enabled by the following extensions: For incorrect usage of nullable with tests see: - github.com/gogo/protobuf/test/nullableconflict - + github.com/gogo/protobuf/test/nullableconflict */ package defaultcheck diff --git a/vendor/github.com/gogo/protobuf/plugin/description/description.go b/vendor/github.com/gogo/protobuf/plugin/description/description.go index f72efba61282..df57a1bdd313 100644 --- a/vendor/github.com/gogo/protobuf/plugin/description/description.go +++ b/vendor/github.com/gogo/protobuf/plugin/description/description.go @@ -43,35 +43,34 @@ The description plugin also generates a test given it is enabled using one of th Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } + message B { + option (gogoproto.description) = true; + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } given to the description plugin, will generate the following code: - func (this *B) Description() (desc *google_protobuf.FileDescriptorSet) { - return ExampleDescription() - } + func (this *B) Description() (desc *google_protobuf.FileDescriptorSet) { + return ExampleDescription() + } and the following test code: - func TestDescription(t *testing9.T) { - ExampleDescription() - } + func TestDescription(t *testing9.T) { + ExampleDescription() + } The hope is to use this struct in some way instead of reflect. This package is subject to change, since a use has not been figured out yet. - */ package description diff --git a/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go b/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go index bc68efe12c7d..1d45b1c9a004 100644 --- a/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go +++ b/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go @@ -40,8 +40,7 @@ It is enabled by the following extensions: For incorrect usage of embed with tests see: - github.com/gogo/protobuf/test/embedconflict - + github.com/gogo/protobuf/test/embedconflict */ package embedcheck diff --git a/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go b/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go index 04d6e547fc35..2f87f48f92b9 100644 --- a/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go +++ b/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go @@ -35,7 +35,6 @@ It is enabled by the following extensions: - enum_stringer_all This package is subject to change. - */ package enumstringer diff --git a/vendor/github.com/gogo/protobuf/plugin/equal/equal.go b/vendor/github.com/gogo/protobuf/plugin/equal/equal.go index 6358fc99ad11..d5d954d9f94a 100644 --- a/vendor/github.com/gogo/protobuf/plugin/equal/equal.go +++ b/vendor/github.com/gogo/protobuf/plugin/equal/equal.go @@ -50,21 +50,21 @@ The equal plugin also generates a test given it is enabled using one of the foll Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - option (gogoproto.equal_all) = true; - option (gogoproto.verbose_equal_all) = true; + option (gogoproto.equal_all) = true; + option (gogoproto.verbose_equal_all) = true; - message B { - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } + message B { + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } given to the equal plugin, will generate the following code: @@ -152,7 +152,6 @@ and the following test code: if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - */ package equal diff --git a/vendor/github.com/gogo/protobuf/plugin/face/face.go b/vendor/github.com/gogo/protobuf/plugin/face/face.go index a02934526526..dcd2b5210731 100644 --- a/vendor/github.com/gogo/protobuf/plugin/face/face.go +++ b/vendor/github.com/gogo/protobuf/plugin/face/face.go @@ -50,21 +50,21 @@ The face plugin also generates a test given it is enabled using one of the follo Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - message A { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } + message A { + option (gogoproto.face) = true; + option (gogoproto.goproto_getters) = false; + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } given to the face plugin, will generate the following code: @@ -126,7 +126,6 @@ Implementing The Proto method is done with the helper function NewAFromFace: } just the like TestProto method which is used to test the NewAFromFace function. - */ package face diff --git a/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go b/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go index bc89a7b871d0..852859488c5a 100644 --- a/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go +++ b/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go @@ -30,7 +30,7 @@ The gostring plugin generates a GoString method for each message. The GoString method is called whenever you use a fmt.Printf as such: - fmt.Printf("%#v", mymessage) + fmt.Printf("%#v", mymessage) or whenever you actually call GoString() The output produced by the GoString method can be copied from the output into code and used to set a variable. @@ -48,31 +48,31 @@ The gostring plugin also generates a test given it is enabled using one of the f Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - option (gogoproto.gostring_all) = true; + option (gogoproto.gostring_all) = true; - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } given to the gostring plugin, will generate the following code: - func (this *A) GoString() string { - if this == nil { - return "nil" - } - s := strings1.Join([]string{`&test.A{` + `Description:` + fmt1.Sprintf("%#v", this.Description), `Number:` + fmt1.Sprintf("%#v", this.Number), `Id:` + fmt1.Sprintf("%#v", this.Id), `XXX_unrecognized:` + fmt1.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s - } + func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := strings1.Join([]string{`&test.A{` + `Description:` + fmt1.Sprintf("%#v", this.Description), `Number:` + fmt1.Sprintf("%#v", this.Number), `Id:` + fmt1.Sprintf("%#v", this.Id), `XXX_unrecognized:` + fmt1.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") + return s + } and the following test code: @@ -92,7 +92,6 @@ and the following test code: Typically fmt.Printf("%#v") will stop to print when it reaches a pointer and not print their values, while the generated GoString method will always print all values, recursively. - */ package gostring diff --git a/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go b/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go index f82c28c281e6..26c741a20e59 100644 --- a/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go +++ b/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go @@ -57,74 +57,74 @@ And benchmarks given it is enabled using one of the following extensions: Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: option (gogoproto.marshaler_all) = true; -message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; -} + message B { + option (gogoproto.description) = true; + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } given to the marshalto plugin, will generate the following code: - func (m *B) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil - } - - func (m *B) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) - } - - func (m *B) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.G) > 0 { - for iNdEx := len(m.G) - 1; iNdEx >= 0; iNdEx-- { - { - size := m.G[iNdEx].Size() - i -= size - if _, err := m.G[iNdEx].MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintExample(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExample(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil - } + func (m *B) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil + } + + func (m *B) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) + } + + func (m *B) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.G) > 0 { + for iNdEx := len(m.G) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.G[iNdEx].Size() + i -= size + if _, err := m.G[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExample(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExample(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil + } As shown above Marshal calculates the size of the not yet marshalled message and allocates the appropriate buffer. diff --git a/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go b/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go index 0f822e8a8acd..82dfddd7611d 100644 --- a/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go +++ b/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go @@ -32,7 +32,6 @@ For instance: An error is caused if a oneof field: - is used in a face - is an embedded field - */ package oneofcheck diff --git a/vendor/github.com/gogo/protobuf/plugin/populate/populate.go b/vendor/github.com/gogo/protobuf/plugin/populate/populate.go index da705945c330..fc600ce5d259 100644 --- a/vendor/github.com/gogo/protobuf/plugin/populate/populate.go +++ b/vendor/github.com/gogo/protobuf/plugin/populate/populate.go @@ -37,40 +37,40 @@ It is enabled by the following extensions: Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - option (gogoproto.populate_all) = true; + option (gogoproto.populate_all) = true; - message B { - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } + message B { + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } given to the populate plugin, will generate code the following code: - func NewPopulatedB(r randyExample, easy bool) *B { - this := &B{} - v2 := NewPopulatedA(r, easy) - this.A = *v2 - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) - for i := 0; i < v3; i++ { - v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.G[i] = *v4 + func NewPopulatedB(r randyExample, easy bool) *B { + this := &B{} + v2 := NewPopulatedA(r, easy) + this.A = *v2 + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) + for i := 0; i < v3; i++ { + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.G[i] = *v4 + } } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExample(r, 3) - } - return this - } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 3) + } + return this + } The idea that is useful for testing. Most of the other plugins' generated test code uses it. @@ -79,7 +79,6 @@ if you turn off the popluate plugin and write your own custom NewPopulated funct If the easy flag is not set the XXX_unrecognized and XXX_extensions fields are also populated. These have caused problems with JSON marshalling and unmarshalling tests. - */ package populate diff --git a/vendor/github.com/gogo/protobuf/plugin/size/size.go b/vendor/github.com/gogo/protobuf/plugin/size/size.go index 1650b438751d..e11568768555 100644 --- a/vendor/github.com/gogo/protobuf/plugin/size/size.go +++ b/vendor/github.com/gogo/protobuf/plugin/size/size.go @@ -50,43 +50,43 @@ And a benchmark given it is enabled using one of the following extensions: Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - option (gogoproto.sizer_all) = true; + option (gogoproto.sizer_all) = true; - message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } + message B { + option (gogoproto.description) = true; + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } given to the size plugin, will generate the following code: - func (m *B) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.A.Size() - n += 1 + l + sovExample(uint64(l)) - if len(m.G) > 0 { - for _, e := range m.G { - l = e.Size() - n += 1 + l + sovExample(uint64(l)) + func (m *B) Size() (n int) { + if m == nil { + return 0 } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n - } + var l int + _ = l + l = m.A.Size() + n += 1 + l + sovExample(uint64(l)) + if len(m.G) > 0 { + for _, e := range m.G { + l = e.Size() + n += 1 + l + sovExample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n + } and the following test code: @@ -118,7 +118,6 @@ and the following test code: } The sovExample function is a size of varint function for the example.pb.go file. - */ package size diff --git a/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go b/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go index df9792c7c4f4..84a2ef91808c 100644 --- a/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go +++ b/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go @@ -41,38 +41,38 @@ The stringer plugin also generates a test given it is enabled using one of the f Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - option (gogoproto.goproto_stringer_all) = false; - option (gogoproto.stringer_all) = true; + option (gogoproto.goproto_stringer_all) = false; + option (gogoproto.stringer_all) = true; - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } given to the stringer stringer, will generate the following code: - func (this *A) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&A{`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Number:` + fmt.Sprintf("%v", this.Number) + `,`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s - } + func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `Description:` + fmt.Sprintf("%v", this.Description) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s + } and the following test code: @@ -88,7 +88,6 @@ and the following test code: Typically fmt.Printf("%v") will stop to print when it reaches a pointer and not print their values, while the generated String method will always print all values, recursively. - */ package stringer diff --git a/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go b/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go index e0a9287e5600..7ad8f152f807 100644 --- a/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go +++ b/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go @@ -41,22 +41,22 @@ Benchmarks are enabled using the following extensions: Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - option (gogoproto.testgen_all) = true; - option (gogoproto.benchgen_all) = true; + option (gogoproto.testgen_all) = true; + option (gogoproto.benchgen_all) = true; - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } given to the testgen plugin, will generate the following test code: @@ -178,17 +178,17 @@ given to the testgen plugin, will generate the following test code: Other registered tests are also generated. Tests are registered to this test plugin by calling the following function. - func RegisterTestPlugin(newFunc NewTestPlugin) + func RegisterTestPlugin(newFunc NewTestPlugin) where NewTestPlugin is: - type NewTestPlugin func(g *generator.Generator) TestPlugin + type NewTestPlugin func(g *generator.Generator) TestPlugin and TestPlugin is an interface: - type TestPlugin interface { - Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) - } + type TestPlugin interface { + Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) + } Plugins that use this interface include: @@ -200,7 +200,6 @@ Plugins that use this interface include: Please look at these plugins as examples of how to create your own. A good idea is to let each plugin generate its own tests. - */ package testgen diff --git a/vendor/github.com/gogo/protobuf/plugin/union/union.go b/vendor/github.com/gogo/protobuf/plugin/union/union.go index 90def721c9dc..ba33c287b7ea 100644 --- a/vendor/github.com/gogo/protobuf/plugin/union/union.go +++ b/vendor/github.com/gogo/protobuf/plugin/union/union.go @@ -31,11 +31,11 @@ The onlyone plugin generates code for the onlyone extension. All fields must be nullable and only one of the fields may be set, like a union. Two methods are generated - GetValue() interface{} + GetValue() interface{} and - SetValue(v interface{}) (set bool) + SetValue(v interface{}) (set bool) These provide easier interaction with a onlyone. @@ -54,19 +54,19 @@ The onlyone plugin also generates a test given it is enabled using one of the fo Lets look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - message U { - option (gogoproto.onlyone) = true; - optional A A = 1; - optional B B = 2; - } + message U { + option (gogoproto.onlyone) = true; + optional A A = 1; + optional B B = 2; + } given to the onlyone plugin, will generate code which looks a lot like this: @@ -94,19 +94,18 @@ given to the onlyone plugin, will generate code which looks a lot like this: and the following test code: - func TestUUnion(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr) - v := p.GetValue() - msg := &U{} - if !msg.SetValue(v) { - t.Fatalf("Union: Could not set Value") - } - if !p.Equal(msg) { - t.Fatalf("%#v !Union Equal %#v", msg, p) - } - } - + func TestUUnion(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr) + v := p.GetValue() + msg := &U{} + if !msg.SetValue(v) { + t.Fatalf("Union: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !Union Equal %#v", msg, p) + } + } */ package union diff --git a/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go b/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go index fae67de4fd9b..1dfe05d59e02 100644 --- a/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go +++ b/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go @@ -57,120 +57,119 @@ And benchmarks given it is enabled using one of the following extensions: Let us look at: - github.com/gogo/protobuf/test/example/example.proto + github.com/gogo/protobuf/test/example/example.proto Btw all the output can be seen at: - github.com/gogo/protobuf/test/example/* + github.com/gogo/protobuf/test/example/* The following message: - option (gogoproto.unmarshaler_all) = true; + option (gogoproto.unmarshaler_all) = true; - message B { - option (gogoproto.description) = true; - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } + message B { + option (gogoproto.description) = true; + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } given to the unmarshal plugin, will generate the following code: - func (m *B) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return proto.ErrWrongType - } - var msglen int + func (m *B) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return proto.ErrWrongType - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if iNdEx >= l { + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return proto.ErrWrongType + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + postIndex := iNdEx + msglen + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.G = append(m.G, github_com_gogo_protobuf_test_custom.Uint128{}) - if err := m.G[len(m.G)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break + iNdEx = postIndex + case 2: + if wireType != 2 { + return proto.ErrWrongType } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.G = append(m.G, github_com_gogo_protobuf_test_custom.Uint128{}) + if err := m.G[len(m.G)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - iNdEx -= sizeOfWire - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy } - } - return nil - } + return nil + } Remember when using this code to call proto.Unmarshal. This will call m.Reset and invoke the generated Unmarshal method for you. If you call m.Unmarshal without m.Reset you could be merging protocol buffers. - */ package unmarshal diff --git a/vendor/github.com/gogo/protobuf/proto/lib.go b/vendor/github.com/gogo/protobuf/proto/lib.go index 80db1c155b59..10eec0d0ee52 100644 --- a/vendor/github.com/gogo/protobuf/proto/lib.go +++ b/vendor/github.com/gogo/protobuf/proto/lib.go @@ -39,35 +39,35 @@ for a protocol buffer variable v: - Names are turned from camel_case to CamelCase for export. - There are no methods on v to set fields; just treat - them as structure fields. + them as structure fields. - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. + and return the field's default value if unset. + The getters work even if the receiver is a nil message. - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. + All desired fields must be set before marshaling. - A Reset() method will restore a protobuf struct to its zero state. - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. + That is, optional or required field int32 f becomes F *int32. - Repeated fields are slices. - Helper functions are available to aid the setting of fields. - msg.Foo = proto.String("hello") // set field + msg.Foo = proto.String("hello") // set field - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. - Enums are given type names and maps from names to values. - Enum values are prefixed by the enclosing message's name, or by the - enum's type name if it is a top-level enum. Enum types have a String - method, and a Enum method to assist in message construction. + Enum values are prefixed by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. - Nested messages, groups and enums have type names prefixed with the name of - the surrounding message type. + the surrounding message type. - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. + with distinguished wrapper types for each possible field value. - Marshal and Unmarshal are functions to encode and decode the wire format. When the .proto file specifies `syntax="proto3"`, there are some differences: diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go index b6cad90834b3..461d58218aff 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go @@ -29,6 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build purego || appengine || js // +build purego appengine js // This file contains an implementation of proto field accesses using package reflect. diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go index 7ffd3c29d90c..d6e07e2f7193 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go @@ -26,6 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build purego || appengine || js // +build purego appengine js // This file contains an implementation of proto field accesses using package reflect. diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go index d55a335d9453..c998399ba71f 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go @@ -29,6 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build !purego && !appengine && !js // +build !purego,!appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go index aca8eed02a11..57a1496565fb 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go @@ -26,6 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build !purego && !appengine && !js // +build !purego,!appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. diff --git a/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go index 937229386a27..7c3e9e000ee7 100644 --- a/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go +++ b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go @@ -2004,12 +2004,14 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // makeUnmarshalOneof makes an unmarshaler for oneof fields. // for: -// message Msg { -// oneof F { -// int64 X = 1; -// float64 Y = 2; -// } -// } +// +// message Msg { +// oneof F { +// int64 X = 1; +// float64 Y = 2; +// } +// } +// // typ is the type of the concrete entry for a oneof case (e.g. Msg_X). // ityp is the interface type of the oneof field (e.g. isMsg_F). // unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64). diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go index 15c7cf43c282..dabc76fabcc8 100644 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go @@ -30,22 +30,27 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* - A plugin for the Google protocol buffer compiler to generate Go code. - Run it by building this program and putting it in your path with the name - protoc-gen-gogo - That word 'gogo' at the end becomes part of the option string set for the - protocol compiler, so once the protocol compiler (protoc) is installed - you can run - protoc --gogo_out=output_directory input_directory/file.proto - to generate Go bindings for the protocol defined by file.proto. - With that input, the output will be written to - output_directory/go_package/file.pb.go - - The generated code is documented in the package comment for - the library. - - See the README and documentation for protocol buffers to learn more: - https://developers.google.com/protocol-buffers/ +A plugin for the Google protocol buffer compiler to generate Go code. +Run it by building this program and putting it in your path with the name + protoc-gen-gogo + +That word 'gogo' at the end becomes part of the option string set for the +protocol compiler, so once the protocol compiler (protoc) is installed +you can run + + protoc --gogo_out=output_directory input_directory/file.proto + +to generate Go bindings for the protocol defined by file.proto. +With that input, the output will be written to + + output_directory/go_package/file.pb.go + +The generated code is documented in the package comment for +the library. + +See the README and documentation for protocol buffers to learn more: + + https://developers.google.com/protocol-buffers/ */ package documentation diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go index ab07ed61ef03..5c044fc3df8d 100644 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go @@ -35,9 +35,9 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* - The code generator for the plugin for the Google protocol buffer compiler. - It generates Go code from the protocol buffer description files read by the - main routine. +The code generator for the plugin for the Google protocol buffer compiler. +It generates Go code from the protocol buffer description files read by the +main routine. */ package generator @@ -1597,6 +1597,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) { // The tag is a string like "varint,2,opt,name=fieldname,def=7" that // identifies details of the field for the protocol buffer marshaling and unmarshaling // code. The fields are: +// // wire encoding // protocol tag number // opt,req,rep for optional, required, or repeated @@ -1605,6 +1606,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) { // enum= the name of the enum type if it is an enum-typed field. // proto3 if this field is in a proto3 message // def= string representation of the default value, if any. +// // The default value must be in a representation that can be used at run-time // to generate the default value. Thus bools become 0 and 1, for instance. func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptorProto, wiretype string) string { diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go index dd8e795030cb..419916745c2b 100644 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go @@ -32,20 +32,26 @@ // protoc-gen-go is a plugin for the Google protocol buffer compiler to generate // Go code. Run it by building this program and putting it in your path with // the name -// protoc-gen-gogo +// +// protoc-gen-gogo +// // That word 'gogo' at the end becomes part of the option string set for the // protocol compiler, so once the protocol compiler (protoc) is installed // you can run -// protoc --gogo_out=output_directory input_directory/file.proto +// +// protoc --gogo_out=output_directory input_directory/file.proto +// // to generate Go bindings for the protocol defined by file.proto. // With that input, the output will be written to -// output_directory/file.pb.go +// +// output_directory/file.pb.go // // The generated code is documented in the package comment for // the library. // // See the README and documentation for protocol buffers to learn more: -// https://developers.google.com/protocol-buffers/ +// +// https://developers.google.com/protocol-buffers/ package main import ( diff --git a/vendor/github.com/google/btree/btree.go b/vendor/github.com/google/btree/btree.go index b83acdbc6d3a..e49c23000de6 100644 --- a/vendor/github.com/google/btree/btree.go +++ b/vendor/github.com/google/btree/btree.go @@ -20,7 +20,9 @@ // It has a flatter structure than an equivalent red-black or other binary tree, // which in some cases yields better memory usage and/or performance. // See some discussion on the matter here: -// http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html +// +// http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html +// // Note, though, that this project is in no way related to the C++ B-Tree // implementation written about there. // @@ -28,13 +30,14 @@ // slice of children. For basic numeric values or raw structs, this can cause // efficiency differences when compared to equivalent C++ template code that // stores values in arrays within the node: -// * Due to the overhead of storing values as interfaces (each +// - Due to the overhead of storing values as interfaces (each // value needs to be stored as the value itself, then 2 words for the // interface pointing to that value and its type), resulting in higher // memory use. -// * Since interfaces can point to values anywhere in memory, values are +// - Since interfaces can point to values anywhere in memory, values are // most likely not stored in contiguous blocks, resulting in a higher // number of cache misses. +// // These issues don't tend to matter, though, when working with strings or other // heap-allocated structures, since C++-equivalent structures also must store // pointers and also distribute their values across the heap. @@ -239,8 +242,8 @@ func (s *children) truncate(index int) { // node is an internal node in a tree. // // It must at all times maintain the invariant that either -// * len(children) == 0, len(items) unconstrained -// * len(children) == len(items) + 1 +// - len(children) == 0, len(items) unconstrained +// - len(children) == len(items) + 1 type node struct { items items children children @@ -434,15 +437,20 @@ func (n *node) remove(item Item, minItems int, typ toRemove) Item { // remove it. // // Most documentation says we have to do two sets of special casing: -// 1) item is in this node -// 2) item is in child +// 1. item is in this node +// 2. item is in child +// // In both cases, we need to handle the two subcases: -// A) node has enough values that it can spare one -// B) node doesn't have enough values +// +// A) node has enough values that it can spare one +// B) node doesn't have enough values +// // For the latter, we have to check: -// a) left sibling has node to spare -// b) right sibling has node to spare -// c) we must merge +// +// a) left sibling has node to spare +// b) right sibling has node to spare +// c) we must merge +// // To simplify our code here, we handle cases #1 and #2 the same: // If a node doesn't have enough items, we make sure it does (using a,b,c). // We then simply redo our remove call, and the second time (regardless of @@ -855,13 +863,14 @@ func (t *BTree) Len() int { // one, instead of being lost to the garbage collector. // // This call takes: -// O(1): when addNodesToFreelist is false, this is a single operation. -// O(1): when the freelist is already full, it breaks out immediately -// O(freelist size): when the freelist is empty and the nodes are all owned -// by this tree, nodes are added to the freelist until full. -// O(tree size): when all nodes are owned by another tree, all nodes are -// iterated over looking for nodes to add to the freelist, and due to -// ownership, none are. +// +// O(1): when addNodesToFreelist is false, this is a single operation. +// O(1): when the freelist is already full, it breaks out immediately +// O(freelist size): when the freelist is empty and the nodes are all owned +// by this tree, nodes are added to the freelist until full. +// O(tree size): when all nodes are owned by another tree, all nodes are +// iterated over looking for nodes to add to the freelist, and due to +// ownership, none are. func (t *BTree) Clear(addNodesToFreelist bool) { if t.root != nil && addNodesToFreelist { t.root.reset(t.cow) diff --git a/vendor/github.com/google/cel-go/common/types/pb/equal.go b/vendor/github.com/google/cel-go/common/types/pb/equal.go index 76893d85eab7..275a2a61c979 100644 --- a/vendor/github.com/google/cel-go/common/types/pb/equal.go +++ b/vendor/github.com/google/cel-go/common/types/pb/equal.go @@ -29,10 +29,10 @@ import ( // // - Messages must share the same instance of the type descriptor // - Known set fields are compared using semantics equality -// - Bytes are compared using bytes.Equal -// - Scalar values are compared with operator == -// - List and map types are equal if they have the same length and all elements are equal -// - Messages are equal if they share the same descriptor and all set fields are equal +// - Bytes are compared using bytes.Equal +// - Scalar values are compared with operator == +// - List and map types are equal if they have the same length and all elements are equal +// - Messages are equal if they share the same descriptor and all set fields are equal // - Unknown fields are compared using byte equality // - NaN values are not equal to each other // - google.protobuf.Any values are unpacked before comparison diff --git a/vendor/github.com/google/cel-go/parser/unescape.go b/vendor/github.com/google/cel-go/parser/unescape.go index 27c57a9f3a76..95745b5d0c75 100644 --- a/vendor/github.com/google/cel-go/parser/unescape.go +++ b/vendor/github.com/google/cel-go/parser/unescape.go @@ -90,10 +90,10 @@ func unescape(value string, isBytes bool) (string, error) { // unescapeChar takes a string input and returns the following info: // -// value - the escaped unicode rune at the front of the string. -// encode - the value should be unicode-encoded -// tail - the remainder of the input string. -// err - error value, if the character could not be unescaped. +// value - the escaped unicode rune at the front of the string. +// encode - the value should be unicode-encoded +// tail - the remainder of the input string. +// err - error value, if the character could not be unescaped. // // When encode is true the return value may still fit within a single byte, // but unicode encoding is attempted which is more expensive than when the diff --git a/vendor/github.com/google/gnostic-models/jsonschema/base.go b/vendor/github.com/google/gnostic-models/jsonschema/base.go index 5fcc4885a03c..a01b1b0d633c 100644 --- a/vendor/github.com/google/gnostic-models/jsonschema/base.go +++ b/vendor/github.com/google/gnostic-models/jsonschema/base.go @@ -20,9 +20,9 @@ import ( "encoding/base64" ) -func baseSchemaBytes() ([]byte, error){ +func baseSchemaBytes() ([]byte, error) { return base64.StdEncoding.DecodeString( -`ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi + `ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi JHNjaGVtYSI6ICJodHRwOi8vanNvbi1zY2hlbWEub3JnL2RyYWZ0LTA0L3NjaGVtYSMiLAogICAgImRl c2NyaXB0aW9uIjogIkNvcmUgc2NoZW1hIG1ldGEtc2NoZW1hIiwKICAgICJkZWZpbml0aW9ucyI6IHsK ICAgICAgICAic2NoZW1hQXJyYXkiOiB7CiAgICAgICAgICAgICJ0eXBlIjogImFycmF5IiwKICAgICAg @@ -94,4 +94,5 @@ YXkiIH0sCiAgICAgICAgImFueU9mIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3NjaGVtYUFycmF5 IiB9LAogICAgICAgICJvbmVPZiI6IHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9zY2hlbWFBcnJheSIg fSwKICAgICAgICAibm90IjogeyAiJHJlZiI6ICIjIiB9CiAgICB9LAogICAgImRlcGVuZGVuY2llcyI6 IHsKICAgICAgICAiZXhjbHVzaXZlTWF4aW11bSI6IFsgIm1heGltdW0iIF0sCiAgICAgICAgImV4Y2x1 -c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`)} +c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`) +} diff --git a/vendor/github.com/google/gofuzz/fuzz.go b/vendor/github.com/google/gofuzz/fuzz.go index 761520a8ceeb..51d6ece77faa 100644 --- a/vendor/github.com/google/gofuzz/fuzz.go +++ b/vendor/github.com/google/gofuzz/fuzz.go @@ -82,12 +82,13 @@ func NewWithSeed(seed int64) *Fuzzer { // // +build gofuzz // package mypacakge // import fuzz "github.com/google/gofuzz" -// func Fuzz(data []byte) int { -// var i int -// fuzz.NewFromGoFuzz(data).Fuzz(&i) -// MyFunc(i) -// return 0 -// } +// +// func Fuzz(data []byte) int { +// var i int +// fuzz.NewFromGoFuzz(data).Fuzz(&i) +// MyFunc(i) +// return 0 +// } func NewFromGoFuzz(data []byte) *Fuzzer { return New().RandSource(bytesource.New(data)) } diff --git a/vendor/github.com/google/shlex/shlex.go b/vendor/github.com/google/shlex/shlex.go index d98308bce380..04d2dedac819 100644 --- a/vendor/github.com/google/shlex/shlex.go +++ b/vendor/github.com/google/shlex/shlex.go @@ -20,22 +20,21 @@ shell-style rules for quoting and commenting. The basic use case uses the default ASCII lexer to split a string into sub-strings: - shlex.Split("one \"two three\" four") -> []string{"one", "two three", "four"} + shlex.Split("one \"two three\" four") -> []string{"one", "two three", "four"} To process a stream of strings: - l := NewLexer(os.Stdin) - for ; token, err := l.Next(); err != nil { - // process token - } + l := NewLexer(os.Stdin) + for ; token, err := l.Next(); err != nil { + // process token + } To access the raw token stream (which includes tokens for comments): - t := NewTokenizer(os.Stdin) - for ; token, err := t.Next(); err != nil { - // process token - } - + t := NewTokenizer(os.Stdin) + for ; token, err := t.Next(); err != nil { + // process token + } */ package shlex diff --git a/vendor/github.com/google/uuid/dce.go b/vendor/github.com/google/uuid/dce.go index fa820b9d3092..9302a1c1bb5b 100644 --- a/vendor/github.com/google/uuid/dce.go +++ b/vendor/github.com/google/uuid/dce.go @@ -42,7 +42,7 @@ func NewDCESecurity(domain Domain, id uint32) (UUID, error) { // NewDCEPerson returns a DCE Security (Version 2) UUID in the person // domain with the id returned by os.Getuid. // -// NewDCESecurity(Person, uint32(os.Getuid())) +// NewDCESecurity(Person, uint32(os.Getuid())) func NewDCEPerson() (UUID, error) { return NewDCESecurity(Person, uint32(os.Getuid())) } @@ -50,7 +50,7 @@ func NewDCEPerson() (UUID, error) { // NewDCEGroup returns a DCE Security (Version 2) UUID in the group // domain with the id returned by os.Getgid. // -// NewDCESecurity(Group, uint32(os.Getgid())) +// NewDCESecurity(Group, uint32(os.Getgid())) func NewDCEGroup() (UUID, error) { return NewDCESecurity(Group, uint32(os.Getgid())) } diff --git a/vendor/github.com/google/uuid/hash.go b/vendor/github.com/google/uuid/hash.go index b404f4bec274..24ccde646490 100644 --- a/vendor/github.com/google/uuid/hash.go +++ b/vendor/github.com/google/uuid/hash.go @@ -39,7 +39,7 @@ func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { // NewMD5 returns a new MD5 (Version 3) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(md5.New(), space, data, 3) +// NewHash(md5.New(), space, data, 3) func NewMD5(space UUID, data []byte) UUID { return NewHash(md5.New(), space, data, 3) } @@ -47,7 +47,7 @@ func NewMD5(space UUID, data []byte) UUID { // NewSHA1 returns a new SHA1 (Version 5) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(sha1.New(), space, data, 5) +// NewHash(sha1.New(), space, data, 5) func NewSHA1(space UUID, data []byte) UUID { return NewHash(sha1.New(), space, data, 5) } diff --git a/vendor/github.com/google/uuid/node_js.go b/vendor/github.com/google/uuid/node_js.go index b2a0bc8711b3..f745d7017fcb 100644 --- a/vendor/github.com/google/uuid/node_js.go +++ b/vendor/github.com/google/uuid/node_js.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build js // +build js package uuid diff --git a/vendor/github.com/google/uuid/node_net.go b/vendor/github.com/google/uuid/node_net.go index 0cbbcddbd6e8..e91358f7d9e3 100644 --- a/vendor/github.com/google/uuid/node_net.go +++ b/vendor/github.com/google/uuid/node_net.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !js // +build !js package uuid diff --git a/vendor/github.com/google/uuid/null.go b/vendor/github.com/google/uuid/null.go index d7fcbf286516..06ecf9de2af6 100644 --- a/vendor/github.com/google/uuid/null.go +++ b/vendor/github.com/google/uuid/null.go @@ -17,15 +17,14 @@ var jsonNull = []byte("null") // NullUUID implements the SQL driver.Scanner interface so // it can be used as a scan destination: // -// var u uuid.NullUUID -// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) -// ... -// if u.Valid { -// // use u.UUID -// } else { -// // NULL value -// } -// +// var u uuid.NullUUID +// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) +// ... +// if u.Valid { +// // use u.UUID +// } else { +// // NULL value +// } type NullUUID struct { UUID UUID Valid bool // Valid is true if UUID is not NULL diff --git a/vendor/github.com/google/uuid/uuid.go b/vendor/github.com/google/uuid/uuid.go index 5232b486780d..1051192bc51a 100644 --- a/vendor/github.com/google/uuid/uuid.go +++ b/vendor/github.com/google/uuid/uuid.go @@ -187,10 +187,12 @@ func Must(uuid UUID, err error) UUID { } // Validate returns an error if s is not a properly formatted UUID in one of the following formats: -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// +// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// // It returns an error if the format is invalid, otherwise nil. func Validate(s string) error { switch len(s) { diff --git a/vendor/github.com/google/uuid/version4.go b/vendor/github.com/google/uuid/version4.go index 7697802e4d16..62ac273815ca 100644 --- a/vendor/github.com/google/uuid/version4.go +++ b/vendor/github.com/google/uuid/version4.go @@ -9,7 +9,7 @@ import "io" // New creates a new random UUID or panics. New is equivalent to // the expression // -// uuid.Must(uuid.NewRandom()) +// uuid.Must(uuid.NewRandom()) func New() UUID { return Must(NewRandom()) } @@ -17,7 +17,7 @@ func New() UUID { // NewString creates a new random UUID and returns it as a string or panics. // NewString is equivalent to the expression // -// uuid.New().String() +// uuid.New().String() func NewString() string { return Must(NewRandom()).String() } @@ -31,11 +31,11 @@ func NewString() string { // // A note about uniqueness derived from the UUID Wikipedia entry: // -// Randomly generated UUIDs have 122 random bits. One's annual risk of being -// hit by a meteorite is estimated to be one chance in 17 billion, that -// means the probability is about 0.00000000006 (6 × 10−11), -// equivalent to the odds of creating a few tens of trillions of UUIDs in a -// year and having one duplicate. +// Randomly generated UUIDs have 122 random bits. One's annual risk of being +// hit by a meteorite is estimated to be one chance in 17 billion, that +// means the probability is about 0.00000000006 (6 × 10−11), +// equivalent to the odds of creating a few tens of trillions of UUIDs in a +// year and having one duplicate. func NewRandom() (UUID, error) { if !poolEnabled { return NewRandomFromReader(rander) diff --git a/vendor/github.com/gorilla/websocket/doc.go b/vendor/github.com/gorilla/websocket/doc.go index 8db0cef95a29..677a827201df 100644 --- a/vendor/github.com/gorilla/websocket/doc.go +++ b/vendor/github.com/gorilla/websocket/doc.go @@ -4,40 +4,40 @@ // Package websocket implements the WebSocket protocol defined in RFC 6455. // -// Overview +// # Overview // // The Conn type represents a WebSocket connection. A server application calls // the Upgrader.Upgrade method from an HTTP request handler to get a *Conn: // -// var upgrader = websocket.Upgrader{ -// ReadBufferSize: 1024, -// WriteBufferSize: 1024, -// } +// var upgrader = websocket.Upgrader{ +// ReadBufferSize: 1024, +// WriteBufferSize: 1024, +// } // -// func handler(w http.ResponseWriter, r *http.Request) { -// conn, err := upgrader.Upgrade(w, r, nil) -// if err != nil { -// log.Println(err) -// return -// } -// ... Use conn to send and receive messages. -// } +// func handler(w http.ResponseWriter, r *http.Request) { +// conn, err := upgrader.Upgrade(w, r, nil) +// if err != nil { +// log.Println(err) +// return +// } +// ... Use conn to send and receive messages. +// } // // Call the connection's WriteMessage and ReadMessage methods to send and // receive messages as a slice of bytes. This snippet of code shows how to echo // messages using these methods: // -// for { -// messageType, p, err := conn.ReadMessage() -// if err != nil { -// log.Println(err) -// return -// } -// if err := conn.WriteMessage(messageType, p); err != nil { -// log.Println(err) -// return -// } -// } +// for { +// messageType, p, err := conn.ReadMessage() +// if err != nil { +// log.Println(err) +// return +// } +// if err := conn.WriteMessage(messageType, p); err != nil { +// log.Println(err) +// return +// } +// } // // In above snippet of code, p is a []byte and messageType is an int with value // websocket.BinaryMessage or websocket.TextMessage. @@ -49,24 +49,24 @@ // method to get an io.Reader and read until io.EOF is returned. This snippet // shows how to echo messages using the NextWriter and NextReader methods: // -// for { -// messageType, r, err := conn.NextReader() -// if err != nil { -// return -// } -// w, err := conn.NextWriter(messageType) -// if err != nil { -// return err -// } -// if _, err := io.Copy(w, r); err != nil { -// return err -// } -// if err := w.Close(); err != nil { -// return err -// } -// } -// -// Data Messages +// for { +// messageType, r, err := conn.NextReader() +// if err != nil { +// return +// } +// w, err := conn.NextWriter(messageType) +// if err != nil { +// return err +// } +// if _, err := io.Copy(w, r); err != nil { +// return err +// } +// if err := w.Close(); err != nil { +// return err +// } +// } +// +// # Data Messages // // The WebSocket protocol distinguishes between text and binary data messages. // Text messages are interpreted as UTF-8 encoded text. The interpretation of @@ -80,7 +80,7 @@ // It is the application's responsibility to ensure that text messages are // valid UTF-8 encoded text. // -// Control Messages +// # Control Messages // // The WebSocket protocol defines three types of control messages: close, ping // and pong. Call the connection WriteControl, WriteMessage or NextWriter @@ -110,16 +110,16 @@ // in messages from the peer, then the application should start a goroutine to // read and discard messages from the peer. A simple example is: // -// func readLoop(c *websocket.Conn) { -// for { -// if _, _, err := c.NextReader(); err != nil { -// c.Close() -// break -// } -// } -// } +// func readLoop(c *websocket.Conn) { +// for { +// if _, _, err := c.NextReader(); err != nil { +// c.Close() +// break +// } +// } +// } // -// Concurrency +// # Concurrency // // Connections support one concurrent reader and one concurrent writer. // @@ -133,7 +133,7 @@ // The Close and WriteControl methods can be called concurrently with all other // methods. // -// Origin Considerations +// # Origin Considerations // // Web browsers allow Javascript applications to open a WebSocket connection to // any host. It's up to the server to enforce an origin policy using the Origin @@ -151,7 +151,7 @@ // checking. The application is responsible for checking the Origin header // before calling the Upgrade function. // -// Buffers +// # Buffers // // Connections buffer network input and output to reduce the number // of system calls when reading or writing messages. @@ -198,16 +198,16 @@ // buffer size has a reduced impact on total memory use and has the benefit of // reducing system calls and frame overhead. // -// Compression EXPERIMENTAL +// # Compression EXPERIMENTAL // // Per message compression extensions (RFC 7692) are experimentally supported // by this package in a limited capacity. Setting the EnableCompression option // to true in Dialer or Upgrader will attempt to negotiate per message deflate // support. // -// var upgrader = websocket.Upgrader{ -// EnableCompression: true, -// } +// var upgrader = websocket.Upgrader{ +// EnableCompression: true, +// } // // If compression was successfully negotiated with the connection's peer, any // message received in compressed form will be automatically decompressed. @@ -216,7 +216,7 @@ // Per message compression of messages written to a connection can be enabled // or disabled by calling the corresponding Conn method: // -// conn.EnableWriteCompression(false) +// conn.EnableWriteCompression(false) // // Currently this package does not support compression with "context takeover". // This means that messages must be compressed and decompressed in isolation, diff --git a/vendor/github.com/gregjones/httpcache/httpcache.go b/vendor/github.com/gregjones/httpcache/httpcache.go index f6a2ec4a53e8..26b79f33e4f1 100644 --- a/vendor/github.com/gregjones/httpcache/httpcache.go +++ b/vendor/github.com/gregjones/httpcache/httpcache.go @@ -3,7 +3,6 @@ // // It is only suitable for use as a 'private' cache (i.e. for a web-browser or an API-client // and not for a shared proxy). -// package httpcache import ( @@ -420,10 +419,10 @@ func getEndToEndHeaders(respHeaders http.Header) []string { "Keep-Alive": struct{}{}, "Proxy-Authenticate": struct{}{}, "Proxy-Authorization": struct{}{}, - "Te": struct{}{}, - "Trailers": struct{}{}, - "Transfer-Encoding": struct{}{}, - "Upgrade": struct{}{}, + "Te": struct{}{}, + "Trailers": struct{}{}, + "Transfer-Encoding": struct{}{}, + "Upgrade": struct{}{}, } for _, extra := range strings.Split(respHeaders.Get("connection"), ",") { diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go b/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go index 7c038d12a23c..f207bf92d7f0 100644 --- a/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go +++ b/vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go @@ -721,10 +721,9 @@ func (p *printer) heredocIndent(buf []byte) []byte { // // A single line object: // -// * has no lead comments (hence multi-line) -// * has no assignment -// * has no values in the stanza (within {}) -// +// - has no lead comments (hence multi-line) +// - has no assignment +// - has no values in the stanza (within {}) func (p *printer) isSingleLineObject(val *ast.ObjectItem) bool { // If there is a lead comment, can't be one line if val.LeadComment != nil { diff --git a/vendor/github.com/imdario/mergo/doc.go b/vendor/github.com/imdario/mergo/doc.go index fcd985f995dc..6c8fb45d41b7 100644 --- a/vendor/github.com/imdario/mergo/doc.go +++ b/vendor/github.com/imdario/mergo/doc.go @@ -8,11 +8,11 @@ A helper to merge structs and maps in Golang. Useful for configuration default v Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). -Status +# Status It is ready for production use. It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc. -Important note +# Important note Please keep in mind that a problematic PR broke 0.3.9. We reverted it in 0.3.10. We consider 0.3.10 as stable but not bug-free. . Also, this version adds suppot for go modules. @@ -20,18 +20,18 @@ Keep in mind that in 0.3.2, Mergo changed Merge() and Map() signatures to suppor If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with go get -u github.com/imdario/mergo. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0). -Install +# Install Do your usual installation procedure: - go get github.com/imdario/mergo + go get github.com/imdario/mergo - // use in your .go code - import ( - "github.com/imdario/mergo" - ) + // use in your .go code + import ( + "github.com/imdario/mergo" + ) -Usage +# Usage You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as they are zero values too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). @@ -81,7 +81,7 @@ Here is a nice example: // {two 2} } -Transformers +# Transformers Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, time.Time is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero time.Time? @@ -127,17 +127,16 @@ Transformers allow to merge specific types differently than in the default behav // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } } -Contact me +# Contact me If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): https://twitter.com/im_dario -About +# About Written by Dario Castañé: https://da.rio.hn -License +# License BSD 3-Clause license, as Go language. - */ package mergo diff --git a/vendor/github.com/json-iterator/go/iter_float.go b/vendor/github.com/json-iterator/go/iter_float.go index 8a3d8b6fb43c..caf16feec89d 100644 --- a/vendor/github.com/json-iterator/go/iter_float.go +++ b/vendor/github.com/json-iterator/go/iter_float.go @@ -66,7 +66,7 @@ func (iter *Iterator) ReadBigInt() (ret *big.Int) { return ret } -//ReadFloat32 read float32 +// ReadFloat32 read float32 func (iter *Iterator) ReadFloat32() (ret float32) { c := iter.nextToken() if c == '-' { diff --git a/vendor/github.com/json-iterator/go/iter_skip_sloppy.go b/vendor/github.com/json-iterator/go/iter_skip_sloppy.go index 9303de41e400..3d993f27731b 100644 --- a/vendor/github.com/json-iterator/go/iter_skip_sloppy.go +++ b/vendor/github.com/json-iterator/go/iter_skip_sloppy.go @@ -1,4 +1,5 @@ -//+build jsoniter_sloppy +//go:build jsoniter_sloppy +// +build jsoniter_sloppy package jsoniter diff --git a/vendor/github.com/json-iterator/go/iter_skip_strict.go b/vendor/github.com/json-iterator/go/iter_skip_strict.go index 6cf66d0438db..f1ad6591bb0c 100644 --- a/vendor/github.com/json-iterator/go/iter_skip_strict.go +++ b/vendor/github.com/json-iterator/go/iter_skip_strict.go @@ -1,4 +1,5 @@ -//+build !jsoniter_sloppy +//go:build !jsoniter_sloppy +// +build !jsoniter_sloppy package jsoniter diff --git a/vendor/github.com/kr/pretty/formatter.go b/vendor/github.com/kr/pretty/formatter.go index 8e6969c59083..c794ec045c79 100644 --- a/vendor/github.com/kr/pretty/formatter.go +++ b/vendor/github.com/kr/pretty/formatter.go @@ -21,7 +21,7 @@ type formatter struct { // breaks and tabs. Object f responds to the "%v" formatting verb when both the // "#" and " " (space) flags are set, for example: // -// fmt.Sprintf("%# v", Formatter(x)) +// fmt.Sprintf("%# v", Formatter(x)) // // If one of these two flags is not set, or any other verb is used, f will // format x according to the usual rules of package fmt. diff --git a/vendor/github.com/liggitt/tabwriter/tabwriter.go b/vendor/github.com/liggitt/tabwriter/tabwriter.go index fd3431fb03df..4538af5d477d 100644 --- a/vendor/github.com/liggitt/tabwriter/tabwriter.go +++ b/vendor/github.com/liggitt/tabwriter/tabwriter.go @@ -25,7 +25,6 @@ import ( // The text itself is stored in a separate buffer; cell only describes the // segment's size in bytes, its width in runes, and whether it's an htab // ('\t') terminated cell. -// type cell struct { size int // cell size in bytes width int // cell width in runes @@ -89,7 +88,6 @@ type cell struct { // The Writer must buffer input internally, because proper spacing // of one line may depend on the cells in future lines. Clients must // call Flush when done calling Write. -// type Writer struct { // configuration output io.Writer @@ -214,7 +212,6 @@ const ( // (for correct-looking results, tabwidth must correspond // to the tab width in the viewer displaying the result) // flags formatting control -// func (b *Writer) Init(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Writer { if minwidth < 0 || tabwidth < 0 || padding < 0 { panic("negative minwidth, tabwidth, or padding") @@ -357,7 +354,6 @@ func (b *Writer) writeLines(pos0 int, line0, line1 int) (pos int) { // is the buffer position corresponding to the beginning of line0. // Returns the buffer position corresponding to the beginning of // line1 and an error, if any. -// func (b *Writer) format(pos0 int, line0, line1 int) (pos int) { pos = pos0 column := len(b.widths) @@ -449,7 +445,6 @@ func (b *Writer) updateWidth() { // width one for formatting purposes. // // The value 0xff was chosen because it cannot appear in a valid UTF-8 sequence. -// const Escape = '\xff' // Start escaped mode. @@ -468,7 +463,6 @@ func (b *Writer) startEscape(ch byte) { // is assumed to be zero for formatting purposes; if it was an HTML entity, // its width is assumed to be one. In all other cases, the width is the // unicode width of the text. -// func (b *Writer) endEscape() { switch b.endChar { case Escape: @@ -486,7 +480,6 @@ func (b *Writer) endEscape() { // Terminate the current cell by adding it to the list of cells of the // current line. Returns the number of cells in that line. -// func (b *Writer) terminateCell(htab bool) int { b.cell.htab = htab line := &b.lines[len(b.lines)-1] @@ -552,7 +545,6 @@ var hbar = []byte("---\n") // Write writes buf to the writer b. // The only errors returned are ones encountered // while writing to the underlying output stream. -// func (b *Writer) Write(buf []byte) (n int, err error) { defer handlePanic(&err, "Write") @@ -631,7 +623,6 @@ func (b *Writer) Write(buf []byte) (n int, err error) { // NewWriter allocates and initializes a new tabwriter.Writer. // The parameters are the same as for the Init function. -// func NewWriter(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Writer { return new(Writer).Init(output, minwidth, tabwidth, padding, padchar, flags) } diff --git a/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go b/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go index ff7b27c5b203..87f7fb7a4459 100644 --- a/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go +++ b/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go @@ -2,8 +2,8 @@ // easyjson_nounsafe nor appengine build tag is set. See README notes // for more details. -//+build !easyjson_nounsafe -//+build !appengine +//go:build !easyjson_nounsafe && !appengine +// +build !easyjson_nounsafe,!appengine package jlexer diff --git a/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go b/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go index 864d1be67638..5c24365ccdb6 100644 --- a/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go +++ b/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go @@ -1,7 +1,8 @@ // This file is included to the build if any of the buildtags below // are defined. Refer to README notes for more details. -//+build easyjson_nounsafe appengine +//go:build easyjson_nounsafe || appengine +// +build easyjson_nounsafe appengine package jlexer diff --git a/vendor/github.com/mattn/go-isatty/isatty_windows.go b/vendor/github.com/mattn/go-isatty/isatty_windows.go index 8e3c99171bff..367adab99715 100644 --- a/vendor/github.com/mattn/go-isatty/isatty_windows.go +++ b/vendor/github.com/mattn/go-isatty/isatty_windows.go @@ -42,7 +42,8 @@ func IsTerminal(fd uintptr) bool { // Check pipe name is used for cygwin/msys2 pty. // Cygwin/MSYS2 PTY has a name like: -// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master +// +// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master func isCygwinPipeName(name string) bool { token := strings.Split(name, "-") if len(token) < 5 { diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go index 1efb22ac3610..fadccc4ab8d1 100644 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go @@ -9,84 +9,84 @@ // // The simplest function to start with is Decode. // -// Field Tags +// # Field Tags // // When decoding to a struct, mapstructure will use the field name by // default to perform the mapping. For example, if a struct has a field // "Username" then mapstructure will look for a key in the source value // of "username" (case insensitive). // -// type User struct { -// Username string -// } +// type User struct { +// Username string +// } // // You can change the behavior of mapstructure by using struct tags. // The default struct tag that mapstructure looks for is "mapstructure" // but you can customize it using DecoderConfig. // -// Renaming Fields +// # Renaming Fields // // To rename the key that mapstructure looks for, use the "mapstructure" // tag and set a value directly. For example, to change the "username" example // above to "user": // -// type User struct { -// Username string `mapstructure:"user"` -// } +// type User struct { +// Username string `mapstructure:"user"` +// } // -// Embedded Structs and Squashing +// # Embedded Structs and Squashing // // Embedded structs are treated as if they're another field with that name. // By default, the two structs below are equivalent when decoding with // mapstructure: // -// type Person struct { -// Name string -// } +// type Person struct { +// Name string +// } // -// type Friend struct { -// Person -// } +// type Friend struct { +// Person +// } // -// type Friend struct { -// Person Person -// } +// type Friend struct { +// Person Person +// } // // This would require an input that looks like below: // -// map[string]interface{}{ -// "person": map[string]interface{}{"name": "alice"}, -// } +// map[string]interface{}{ +// "person": map[string]interface{}{"name": "alice"}, +// } // // If your "person" value is NOT nested, then you can append ",squash" to // your tag value and mapstructure will treat it as if the embedded struct // were part of the struct directly. Example: // -// type Friend struct { -// Person `mapstructure:",squash"` -// } +// type Friend struct { +// Person `mapstructure:",squash"` +// } // // Now the following input would be accepted: // -// map[string]interface{}{ -// "name": "alice", -// } +// map[string]interface{}{ +// "name": "alice", +// } // // When decoding from a struct to a map, the squash tag squashes the struct // fields into a single map. Using the example structs from above: // -// Friend{Person: Person{Name: "alice"}} +// Friend{Person: Person{Name: "alice"}} // // Will be decoded into a map: // -// map[string]interface{}{ -// "name": "alice", -// } +// map[string]interface{}{ +// "name": "alice", +// } // // DecoderConfig has a field that changes the behavior of mapstructure // to always squash embedded structs. // -// Remainder Values +// # Remainder Values // // If there are any unmapped keys in the source value, mapstructure by // default will silently ignore them. You can error by setting ErrorUnused @@ -98,20 +98,20 @@ // probably be a "map[string]interface{}" or "map[interface{}]interface{}". // See example below: // -// type Friend struct { -// Name string -// Other map[string]interface{} `mapstructure:",remain"` -// } +// type Friend struct { +// Name string +// Other map[string]interface{} `mapstructure:",remain"` +// } // // Given the input below, Other would be populated with the other // values that weren't used (everything but "name"): // -// map[string]interface{}{ -// "name": "bob", -// "address": "123 Maple St.", -// } +// map[string]interface{}{ +// "name": "bob", +// "address": "123 Maple St.", +// } // -// Omit Empty Values +// # Omit Empty Values // // When decoding from a struct to any other value, you may use the // ",omitempty" suffix on your tag to omit that value if it equates to @@ -122,37 +122,37 @@ // field value is zero and a numeric type, the field is empty, and it won't // be encoded into the destination type. // -// type Source struct { -// Age int `mapstructure:",omitempty"` -// } +// type Source struct { +// Age int `mapstructure:",omitempty"` +// } // -// Unexported fields +// # Unexported fields // // Since unexported (private) struct fields cannot be set outside the package // where they are defined, the decoder will simply skip them. // // For this output type definition: // -// type Exported struct { -// private string // this unexported field will be skipped -// Public string -// } +// type Exported struct { +// private string // this unexported field will be skipped +// Public string +// } // // Using this map as input: // -// map[string]interface{}{ -// "private": "I will be ignored", -// "Public": "I made it through!", -// } +// map[string]interface{}{ +// "private": "I will be ignored", +// "Public": "I made it through!", +// } // // The following struct will be decoded: // -// type Exported struct { -// private: "" // field is left with an empty string (zero value) -// Public: "I made it through!" -// } +// type Exported struct { +// private: "" // field is left with an empty string (zero value) +// Public: "I made it through!" +// } // -// Other Configuration +// # Other Configuration // // mapstructure is highly configurable. See the DecoderConfig struct // for other features and options that are supported. diff --git a/vendor/github.com/modern-go/concurrent/go_above_19.go b/vendor/github.com/modern-go/concurrent/go_above_19.go index aeabf8c4f9c8..7db701945497 100644 --- a/vendor/github.com/modern-go/concurrent/go_above_19.go +++ b/vendor/github.com/modern-go/concurrent/go_above_19.go @@ -1,4 +1,5 @@ -//+build go1.9 +//go:build go1.9 +// +build go1.9 package concurrent diff --git a/vendor/github.com/modern-go/concurrent/go_below_19.go b/vendor/github.com/modern-go/concurrent/go_below_19.go index b9c8df7f4101..64544f5b35ba 100644 --- a/vendor/github.com/modern-go/concurrent/go_below_19.go +++ b/vendor/github.com/modern-go/concurrent/go_below_19.go @@ -1,4 +1,5 @@ -//+build !go1.9 +//go:build !go1.9 +// +build !go1.9 package concurrent diff --git a/vendor/github.com/modern-go/concurrent/log.go b/vendor/github.com/modern-go/concurrent/log.go index 9756fcc75a79..4899eed026de 100644 --- a/vendor/github.com/modern-go/concurrent/log.go +++ b/vendor/github.com/modern-go/concurrent/log.go @@ -1,13 +1,13 @@ package concurrent import ( - "os" - "log" "io/ioutil" + "log" + "os" ) // ErrorLogger is used to print out error, can be set to writer other than stderr var ErrorLogger = log.New(os.Stderr, "", 0) // InfoLogger is used to print informational message, default to off -var InfoLogger = log.New(ioutil.Discard, "", 0) \ No newline at end of file +var InfoLogger = log.New(ioutil.Discard, "", 0) diff --git a/vendor/github.com/modern-go/concurrent/unbounded_executor.go b/vendor/github.com/modern-go/concurrent/unbounded_executor.go index 05a77dceb1e2..5ea18eb7bf98 100644 --- a/vendor/github.com/modern-go/concurrent/unbounded_executor.go +++ b/vendor/github.com/modern-go/concurrent/unbounded_executor.go @@ -3,11 +3,11 @@ package concurrent import ( "context" "fmt" + "reflect" "runtime" "runtime/debug" "sync" "time" - "reflect" ) // HandlePanic logs goroutine panic by default diff --git a/vendor/github.com/modern-go/reflect2/go_above_118.go b/vendor/github.com/modern-go/reflect2/go_above_118.go index 2b4116f6c9be..33c825f6d512 100644 --- a/vendor/github.com/modern-go/reflect2/go_above_118.go +++ b/vendor/github.com/modern-go/reflect2/go_above_118.go @@ -1,4 +1,5 @@ -//+build go1.18 +//go:build go1.18 +// +build go1.18 package reflect2 @@ -8,6 +9,7 @@ import ( // m escapes into the return value, but the caller of mapiterinit // doesn't let the return value escape. +// //go:noescape //go:linkname mapiterinit reflect.mapiterinit func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer, it *hiter) @@ -20,4 +22,4 @@ func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator { pKeyRType: type2.pKeyRType, pElemRType: type2.pElemRType, } -} \ No newline at end of file +} diff --git a/vendor/github.com/modern-go/reflect2/go_above_19.go b/vendor/github.com/modern-go/reflect2/go_above_19.go index 974f7685e495..03ccb43c65bb 100644 --- a/vendor/github.com/modern-go/reflect2/go_above_19.go +++ b/vendor/github.com/modern-go/reflect2/go_above_19.go @@ -1,4 +1,5 @@ -//+build go1.9 +//go:build go1.9 +// +build go1.9 package reflect2 diff --git a/vendor/github.com/modern-go/reflect2/go_below_118.go b/vendor/github.com/modern-go/reflect2/go_below_118.go index 00003dbd7c57..092ec5b5d293 100644 --- a/vendor/github.com/modern-go/reflect2/go_below_118.go +++ b/vendor/github.com/modern-go/reflect2/go_below_118.go @@ -1,4 +1,5 @@ -//+build !go1.18 +//go:build !go1.18 +// +build !go1.18 package reflect2 @@ -8,6 +9,7 @@ import ( // m escapes into the return value, but the caller of mapiterinit // doesn't let the return value escape. +// //go:noescape //go:linkname mapiterinit reflect.mapiterinit func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) (val *hiter) @@ -18,4 +20,4 @@ func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator { pKeyRType: type2.pKeyRType, pElemRType: type2.pElemRType, } -} \ No newline at end of file +} diff --git a/vendor/github.com/modern-go/reflect2/reflect2.go b/vendor/github.com/modern-go/reflect2/reflect2.go index c43c8b9d6297..b0c281fcac71 100644 --- a/vendor/github.com/modern-go/reflect2/reflect2.go +++ b/vendor/github.com/modern-go/reflect2/reflect2.go @@ -282,6 +282,7 @@ func likePtrType(typ reflect.Type) bool { // output depends on the input. noescape is inlined and currently // compiles down to zero instructions. // USE CAREFULLY! +// //go:nosplit func NoEscape(p unsafe.Pointer) unsafe.Pointer { x := uintptr(p) diff --git a/vendor/github.com/modern-go/reflect2/type_map.go b/vendor/github.com/modern-go/reflect2/type_map.go index 4b13c3155c80..54c8498ef1d7 100644 --- a/vendor/github.com/modern-go/reflect2/type_map.go +++ b/vendor/github.com/modern-go/reflect2/type_map.go @@ -1,3 +1,4 @@ +//go:build !gccgo // +build !gccgo package reflect2 @@ -9,6 +10,7 @@ import ( ) // typelinks2 for 1.7 ~ +// //go:linkname typelinks2 reflect.typelinks func typelinks2() (sections []unsafe.Pointer, offset [][]int32) diff --git a/vendor/github.com/modern-go/reflect2/unsafe_link.go b/vendor/github.com/modern-go/reflect2/unsafe_link.go index b49f614efc58..61849bb426f0 100644 --- a/vendor/github.com/modern-go/reflect2/unsafe_link.go +++ b/vendor/github.com/modern-go/reflect2/unsafe_link.go @@ -13,6 +13,7 @@ func unsafe_NewArray(rtype unsafe.Pointer, length int) unsafe.Pointer // typedslicecopy copies a slice of elemType values from src to dst, // returning the number of elements copied. +// //go:linkname typedslicecopy reflect.typedslicecopy //go:noescape func typedslicecopy(elemType unsafe.Pointer, dst, src sliceHeader) int diff --git a/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go b/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go index 1b727721e140..fcaee0f04903 100644 --- a/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go +++ b/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go @@ -38,10 +38,10 @@ type Monitor struct { // weight of each sample in the exponential moving average (EMA) calculation. // The exact formulas are: // -// sampleTime = currentTime - prevSampleTime -// sampleRate = byteCount / sampleTime -// weight = 1 - exp(-sampleTime/windowSize) -// newRate = weight*sampleRate + (1-weight)*oldRate +// sampleTime = currentTime - prevSampleTime +// sampleRate = byteCount / sampleTime +// weight = 1 - exp(-sampleTime/windowSize) +// newRate = weight*sampleRate + (1-weight)*oldRate // // The default values for sampleRate and windowSize (if <= 0) are 100ms and 1s, // respectively. diff --git a/vendor/github.com/olekukonko/tablewriter/csv.go b/vendor/github.com/olekukonko/tablewriter/csv.go index 98878303bc48..96125b4f5032 100644 --- a/vendor/github.com/olekukonko/tablewriter/csv.go +++ b/vendor/github.com/olekukonko/tablewriter/csv.go @@ -26,7 +26,8 @@ func NewCSV(writer io.Writer, fileName string, hasHeader bool) (*Table, error) { return t, err } -// Start a New Table Writer with csv.Reader +// Start a New Table Writer with csv.Reader +// // This enables customisation such as reader.Comma = ';' // See http://golang.org/src/pkg/encoding/csv/reader.go?s=3213:3671#L94 func NewCSVReader(writer io.Writer, csvReader *csv.Reader, hasHeader bool) (*Table, error) { diff --git a/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go b/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go index 778bfd7c7cad..5576890540d0 100644 --- a/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go +++ b/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows /* diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go index 30c2851a8188..9ea845fc3e9b 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package internal diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go index 2620fd562d38..57375377d204 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go @@ -25,7 +25,7 @@ type RPCServer struct { handler *ServerHandler } -//Create a new server, automatically selecting a port +// Create a new server, automatically selecting a port func newRPCServer(parallelTotal int, reporter reporters.Reporter) (*RPCServer, error) { listener, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { @@ -37,7 +37,7 @@ func newRPCServer(parallelTotal int, reporter reporters.Reporter) (*RPCServer, e }, nil } -//Start the server. You don't need to `go s.Start()`, just `s.Start()` +// Start the server. You don't need to `go s.Start()`, just `s.Start()` func (server *RPCServer) Start() { rpcServer := rpc.NewServer() rpcServer.RegisterName("Server", server.handler) //register the handler's methods as the server @@ -48,12 +48,12 @@ func (server *RPCServer) Start() { go httpServer.Serve(server.listener) } -//Stop the server +// Stop the server func (server *RPCServer) Close() { server.listener.Close() } -//The address the server can be reached it. Pass this into the `ForwardingReporter`. +// The address the server can be reached it. Pass this into the `ForwardingReporter`. func (server *RPCServer) Address() string { return server.listener.Addr().String() } diff --git a/vendor/github.com/opencontainers/go-digest/digest.go b/vendor/github.com/opencontainers/go-digest/digest.go index 518b5e715456..465996ce6cfd 100644 --- a/vendor/github.com/opencontainers/go-digest/digest.go +++ b/vendor/github.com/opencontainers/go-digest/digest.go @@ -30,7 +30,7 @@ import ( // // The following is an example of the contents of Digest types: // -// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc +// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // // This allows to abstract the digest behind this type and work only in those // terms. diff --git a/vendor/github.com/opencontainers/go-digest/doc.go b/vendor/github.com/opencontainers/go-digest/doc.go index 83d3a936ca6a..e2dd44f4666c 100644 --- a/vendor/github.com/opencontainers/go-digest/doc.go +++ b/vendor/github.com/opencontainers/go-digest/doc.go @@ -19,16 +19,16 @@ // More importantly, it provides tools and wrappers to work with // hash.Hash-based digests with little effort. // -// Basics +// # Basics // // The format of a digest is simply a string with two parts, dubbed the // "algorithm" and the "digest", separated by a colon: // -// : +// : // // An example of a sha256 digest representation follows: // -// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc +// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // // The "algorithm" portion defines both the hashing algorithm used to calculate // the digest and the encoding of the resulting digest, which defaults to "hex" @@ -42,7 +42,7 @@ // obtained, comparisons are cheap, quick and simple to express with the // standard equality operator. // -// Verification +// # Verification // // The main benefit of using the Digest type is simple verification against a // given digest. The Verifier interface, modeled after the stdlib hash.Hash @@ -50,7 +50,7 @@ // writing is complete, calling the Verifier.Verified method will indicate // whether or not the stream of bytes matches the target digest. // -// Missing Features +// # Missing Features // // In addition to the above, we intend to add the following features to this // package: @@ -58,5 +58,4 @@ // 1. A Digester type that supports write sink digest calculation. // // 2. Suspend and resume of ongoing digest calculations to support efficient digest verification in the registry. -// package digest diff --git a/vendor/github.com/opensearch-project/opensearch-go/doc.go b/vendor/github.com/opensearch-project/opensearch-go/doc.go index c6c44dcf73f6..b2bfd6398c0a 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/doc.go +++ b/vendor/github.com/opensearch-project/opensearch-go/doc.go @@ -29,7 +29,7 @@ Package opensearch provides a Go client for OpenSearch. Create the client with the NewDefaultClient function: - opensearch.NewDefaultClient() + opensearch.NewDefaultClient() The OPENSEARCH_URL/ELASTICSEARCH_URL environment variable is used instead of the default URL, when set. Use a comma to separate multiple URLs. @@ -37,35 +37,35 @@ It is an error to set both environment variable. To configure the client, pass a Config object to the NewClient function: - cfg := opensearch.Config{ - Addresses: []string{ - "http://localhost:9200", - "http://localhost:9201", - }, - Username: "foo", - Password: "bar", - Transport: &http.Transport{ - MaxIdleConnsPerHost: 10, - ResponseHeaderTimeout: time.Second, - DialContext: (&net.Dialer{Timeout: time.Second}).DialContext, - TLSClientConfig: &tls.Config{ - MinVersion: tls.VersionTLS11, - }, - }, - } + cfg := opensearch.Config{ + Addresses: []string{ + "http://localhost:9200", + "http://localhost:9201", + }, + Username: "foo", + Password: "bar", + Transport: &http.Transport{ + MaxIdleConnsPerHost: 10, + ResponseHeaderTimeout: time.Second, + DialContext: (&net.Dialer{Timeout: time.Second}).DialContext, + TLSClientConfig: &tls.Config{ + MinVersion: tls.VersionTLS11, + }, + }, + } - opensearch.NewClient(cfg) + opensearch.NewClient(cfg) See the opensearch_integration_test.go file for more information. Call the OpenSearch APIs by invoking the corresponding methods on the client: - res, err := client.Info() - if err != nil { - log.Fatalf("Error getting response: %s", err) - } + res, err := client.Info() + if err != nil { + log.Fatalf("Error getting response: %s", err) + } - log.Println(res) + log.Println(res) See the github.com/opensearch-project/opensearch-go/opensearchapi package for more information about using the API. diff --git a/vendor/github.com/opensearch-project/opensearch-go/internal/version/version.go b/vendor/github.com/opensearch-project/opensearch-go/internal/version/version.go index f63775c28ad7..7a735c019e79 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/internal/version/version.go +++ b/vendor/github.com/opensearch-project/opensearch-go/internal/version/version.go @@ -27,5 +27,4 @@ package version // Client returns the client version as a string. -// const Client = "1.0.0" diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearch.go b/vendor/github.com/opensearch-project/opensearch-go/opensearch.go index cb6e733b3cea..0ff8ceae7c80 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearch.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearch.go @@ -67,11 +67,9 @@ const ( ) // Version returns the package version as a string. -// const Version = version.Client // Config represents the client configuration. -// type Config struct { Addresses []string // A list of nodes to use. Username string // Username for HTTP Basic Authentication. @@ -112,7 +110,6 @@ type Config struct { } // Client represents the OpenSearch client. -// type Client struct { *opensearchapi.API // Embeds the API methods Transport opensearchtransport.Interface @@ -141,7 +138,6 @@ type info struct { // to configure the addresses; use a comma to separate multiple URLs. // // It's an error to set both OPENSEARCH_URL and ELASTICSEARCH_URL. -// func NewDefaultClient() (*Client, error) { return NewClient(Config{}) } @@ -154,7 +150,6 @@ func NewDefaultClient() (*Client, error) { // to configure the addresses; use a comma to separate multiple URLs. // // It's an error to set both OPENSEARCH_URL and ELASTICSEARCH_URL. -// func NewClient(cfg Config) (*Client, error) { var addrs []string @@ -241,7 +236,6 @@ func getAddressFromEnvironment() ([]string, error) { } // checkCompatibleInfo validates the information given by OpenSearch -// func checkCompatibleInfo(info info) error { major, _, _, err := ParseVersion(info.Version.Number) if err != nil { @@ -257,7 +251,6 @@ func checkCompatibleInfo(info info) error { } // ParseVersion returns an int64 representation of version. -// func ParseVersion(version string) (int64, int64, int64, error) { matches := reVersion.FindStringSubmatch(version) @@ -272,7 +265,6 @@ func ParseVersion(version string) (int64, int64, int64, error) { } // Perform delegates to Transport to execute a request and return a response. -// func (c *Client) Perform(req *http.Request) (*http.Response, error) { if !c.useResponseCheckOnly { // Launch product check, request info, check header then payload. @@ -353,7 +345,6 @@ func (c *Client) productCheck() error { } // Metrics returns the client metrics. -// func (c *Client) Metrics() (opensearchtransport.Metrics, error) { if mt, ok := c.Transport.(opensearchtransport.Measurable); ok { return mt.Metrics() @@ -362,7 +353,6 @@ func (c *Client) Metrics() (opensearchtransport.Metrics, error) { } // DiscoverNodes reloads the client connections by fetching information from the cluster. -// func (c *Client) DiscoverNodes() error { if dt, ok := c.Transport.(opensearchtransport.Discoverable); ok { return dt.DiscoverNodes() @@ -372,7 +362,6 @@ func (c *Client) DiscoverNodes() error { // addrsFromEnvironment returns a list of addresses by splitting // the given environment variable with comma, or an empty list. -// func addrsFromEnvironment(name string) []string { var addrs []string @@ -387,7 +376,6 @@ func addrsFromEnvironment(name string) []string { } // addrsToURLs creates a list of url.URL structures from url list. -// func addrsToURLs(addrs []string) ([]*url.URL, error) { var urls []*url.URL for _, addr := range addrs { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api._.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api._.go index fe37dc9d4ca2..152344466085 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api._.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api._.go @@ -27,7 +27,6 @@ package opensearchapi // API contains the OpenSearch APIs -// type API struct { Cat *Cat Cluster *Cluster @@ -222,7 +221,6 @@ type Tasks struct { } // New creates new API -// func New(t Transport) *API { return &API{ Bulk: newBulkFunc(t), diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.bulk.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.bulk.go index c8f3a8d55400..a356284b3587 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.bulk.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.bulk.go @@ -48,12 +48,9 @@ func newBulkFunc(t Transport) Bulk { // ----- API Definition ------------------------------------------------------- // Bulk allows to perform multiple index/update/delete operations in a single request. -// -// type Bulk func(body io.Reader, o ...func(*BulkRequest)) (*Response, error) // BulkRequest configures the Bulk API request. -// type BulkRequest struct { Index string DocumentType string @@ -81,7 +78,6 @@ type BulkRequest struct { } // Do executes the request and returns response or error. -// func (r BulkRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -209,7 +205,6 @@ func (r BulkRequest) Do(ctx context.Context, transport Transport) (*Response, er } // WithContext sets the request context. -// func (f Bulk) WithContext(v context.Context) func(*BulkRequest) { return func(r *BulkRequest) { r.ctx = v @@ -217,7 +212,6 @@ func (f Bulk) WithContext(v context.Context) func(*BulkRequest) { } // WithIndex - default index for items which don't provide one. -// func (f Bulk) WithIndex(v string) func(*BulkRequest) { return func(r *BulkRequest) { r.Index = v @@ -225,7 +219,6 @@ func (f Bulk) WithIndex(v string) func(*BulkRequest) { } // WithDocumentType - default document type for items which don't provide one. -// func (f Bulk) WithDocumentType(v string) func(*BulkRequest) { return func(r *BulkRequest) { r.DocumentType = v @@ -233,7 +226,6 @@ func (f Bulk) WithDocumentType(v string) func(*BulkRequest) { } // WithPipeline - the pipeline ID to preprocess incoming documents with. -// func (f Bulk) WithPipeline(v string) func(*BulkRequest) { return func(r *BulkRequest) { r.Pipeline = v @@ -241,7 +233,6 @@ func (f Bulk) WithPipeline(v string) func(*BulkRequest) { } // WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.. -// func (f Bulk) WithRefresh(v string) func(*BulkRequest) { return func(r *BulkRequest) { r.Refresh = v @@ -249,7 +240,6 @@ func (f Bulk) WithRefresh(v string) func(*BulkRequest) { } // WithRequireAlias - sets require_alias for all incoming documents. defaults to unset (false). -// func (f Bulk) WithRequireAlias(v bool) func(*BulkRequest) { return func(r *BulkRequest) { r.RequireAlias = &v @@ -257,7 +247,6 @@ func (f Bulk) WithRequireAlias(v bool) func(*BulkRequest) { } // WithRouting - specific routing value. -// func (f Bulk) WithRouting(v string) func(*BulkRequest) { return func(r *BulkRequest) { r.Routing = v @@ -265,7 +254,6 @@ func (f Bulk) WithRouting(v string) func(*BulkRequest) { } // WithSource - true or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request. -// func (f Bulk) WithSource(v ...string) func(*BulkRequest) { return func(r *BulkRequest) { r.Source = v @@ -273,7 +261,6 @@ func (f Bulk) WithSource(v ...string) func(*BulkRequest) { } // WithSourceExcludes - default list of fields to exclude from the returned _source field, can be overridden on each sub-request. -// func (f Bulk) WithSourceExcludes(v ...string) func(*BulkRequest) { return func(r *BulkRequest) { r.SourceExcludes = v @@ -281,7 +268,6 @@ func (f Bulk) WithSourceExcludes(v ...string) func(*BulkRequest) { } // WithSourceIncludes - default list of fields to extract and return from the _source field, can be overridden on each sub-request. -// func (f Bulk) WithSourceIncludes(v ...string) func(*BulkRequest) { return func(r *BulkRequest) { r.SourceIncludes = v @@ -289,7 +275,6 @@ func (f Bulk) WithSourceIncludes(v ...string) func(*BulkRequest) { } // WithTimeout - explicit operation timeout. -// func (f Bulk) WithTimeout(v time.Duration) func(*BulkRequest) { return func(r *BulkRequest) { r.Timeout = v @@ -297,7 +282,6 @@ func (f Bulk) WithTimeout(v time.Duration) func(*BulkRequest) { } // WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the bulk operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1). -// func (f Bulk) WithWaitForActiveShards(v string) func(*BulkRequest) { return func(r *BulkRequest) { r.WaitForActiveShards = v @@ -305,7 +289,6 @@ func (f Bulk) WithWaitForActiveShards(v string) func(*BulkRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Bulk) WithPretty() func(*BulkRequest) { return func(r *BulkRequest) { r.Pretty = true @@ -313,7 +296,6 @@ func (f Bulk) WithPretty() func(*BulkRequest) { } // WithHuman makes statistical values human-readable. -// func (f Bulk) WithHuman() func(*BulkRequest) { return func(r *BulkRequest) { r.Human = true @@ -321,7 +303,6 @@ func (f Bulk) WithHuman() func(*BulkRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Bulk) WithErrorTrace() func(*BulkRequest) { return func(r *BulkRequest) { r.ErrorTrace = true @@ -329,7 +310,6 @@ func (f Bulk) WithErrorTrace() func(*BulkRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Bulk) WithFilterPath(v ...string) func(*BulkRequest) { return func(r *BulkRequest) { r.FilterPath = v @@ -337,7 +317,6 @@ func (f Bulk) WithFilterPath(v ...string) func(*BulkRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Bulk) WithHeader(h map[string]string) func(*BulkRequest) { return func(r *BulkRequest) { if r.Header == nil { @@ -350,7 +329,6 @@ func (f Bulk) WithHeader(h map[string]string) func(*BulkRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Bulk) WithOpaqueID(s string) func(*BulkRequest) { return func(r *BulkRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.aliases.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.aliases.go index e0776f0c992c..c728ccb030ad 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.aliases.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.aliases.go @@ -46,12 +46,9 @@ func newCatAliasesFunc(t Transport) CatAliases { // ----- API Definition ------------------------------------------------------- // CatAliases shows information about currently configured aliases to indices including filter and routing infos. -// -// type CatAliases func(o ...func(*CatAliasesRequest)) (*Response, error) // CatAliasesRequest configures the Cat Aliases API request. -// type CatAliasesRequest struct { Name []string @@ -74,7 +71,6 @@ type CatAliasesRequest struct { } // Do executes the request and returns response or error. -// func (r CatAliasesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -184,7 +180,6 @@ func (r CatAliasesRequest) Do(ctx context.Context, transport Transport) (*Respon } // WithContext sets the request context. -// func (f CatAliases) WithContext(v context.Context) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.ctx = v @@ -192,7 +187,6 @@ func (f CatAliases) WithContext(v context.Context) func(*CatAliasesRequest) { } // WithName - a list of alias names to return. -// func (f CatAliases) WithName(v ...string) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.Name = v @@ -200,7 +194,6 @@ func (f CatAliases) WithName(v ...string) func(*CatAliasesRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f CatAliases) WithExpandWildcards(v string) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.ExpandWildcards = v @@ -208,7 +201,6 @@ func (f CatAliases) WithExpandWildcards(v string) func(*CatAliasesRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatAliases) WithFormat(v string) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.Format = v @@ -216,7 +208,6 @@ func (f CatAliases) WithFormat(v string) func(*CatAliasesRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatAliases) WithH(v ...string) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.H = v @@ -224,7 +215,6 @@ func (f CatAliases) WithH(v ...string) func(*CatAliasesRequest) { } // WithHelp - return help information. -// func (f CatAliases) WithHelp(v bool) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.Help = &v @@ -232,7 +222,6 @@ func (f CatAliases) WithHelp(v bool) func(*CatAliasesRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatAliases) WithLocal(v bool) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.Local = &v @@ -240,7 +229,6 @@ func (f CatAliases) WithLocal(v bool) func(*CatAliasesRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatAliases) WithS(v ...string) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.S = v @@ -248,7 +236,6 @@ func (f CatAliases) WithS(v ...string) func(*CatAliasesRequest) { } // WithV - verbose mode. display column headers. -// func (f CatAliases) WithV(v bool) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.V = &v @@ -256,7 +243,6 @@ func (f CatAliases) WithV(v bool) func(*CatAliasesRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatAliases) WithPretty() func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.Pretty = true @@ -264,7 +250,6 @@ func (f CatAliases) WithPretty() func(*CatAliasesRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatAliases) WithHuman() func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.Human = true @@ -272,7 +257,6 @@ func (f CatAliases) WithHuman() func(*CatAliasesRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatAliases) WithErrorTrace() func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.ErrorTrace = true @@ -280,7 +264,6 @@ func (f CatAliases) WithErrorTrace() func(*CatAliasesRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatAliases) WithFilterPath(v ...string) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { r.FilterPath = v @@ -288,7 +271,6 @@ func (f CatAliases) WithFilterPath(v ...string) func(*CatAliasesRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatAliases) WithHeader(h map[string]string) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { if r.Header == nil { @@ -301,7 +283,6 @@ func (f CatAliases) WithHeader(h map[string]string) func(*CatAliasesRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatAliases) WithOpaqueID(s string) func(*CatAliasesRequest) { return func(r *CatAliasesRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.allocation.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.allocation.go index 181ba139b56b..2e80c4c3b3ac 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.allocation.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.allocation.go @@ -48,12 +48,9 @@ func newCatAllocationFunc(t Transport) CatAllocation { // ----- API Definition ------------------------------------------------------- // CatAllocation provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. -// -// type CatAllocation func(o ...func(*CatAllocationRequest)) (*Response, error) // CatAllocationRequest configures the Cat Allocation API request. -// type CatAllocationRequest struct { NodeID []string @@ -77,7 +74,6 @@ type CatAllocationRequest struct { } // Do executes the request and returns response or error. -// func (r CatAllocationRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -191,7 +187,6 @@ func (r CatAllocationRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f CatAllocation) WithContext(v context.Context) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.ctx = v @@ -199,7 +194,6 @@ func (f CatAllocation) WithContext(v context.Context) func(*CatAllocationRequest } // WithNodeID - a list of node ids or names to limit the returned information. -// func (f CatAllocation) WithNodeID(v ...string) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.NodeID = v @@ -207,7 +201,6 @@ func (f CatAllocation) WithNodeID(v ...string) func(*CatAllocationRequest) { } // WithBytes - the unit in which to display byte values. -// func (f CatAllocation) WithBytes(v string) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.Bytes = v @@ -215,7 +208,6 @@ func (f CatAllocation) WithBytes(v string) func(*CatAllocationRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatAllocation) WithFormat(v string) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.Format = v @@ -223,7 +215,6 @@ func (f CatAllocation) WithFormat(v string) func(*CatAllocationRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatAllocation) WithH(v ...string) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.H = v @@ -231,7 +222,6 @@ func (f CatAllocation) WithH(v ...string) func(*CatAllocationRequest) { } // WithHelp - return help information. -// func (f CatAllocation) WithHelp(v bool) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.Help = &v @@ -239,7 +229,6 @@ func (f CatAllocation) WithHelp(v bool) func(*CatAllocationRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatAllocation) WithLocal(v bool) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.Local = &v @@ -247,7 +236,6 @@ func (f CatAllocation) WithLocal(v bool) func(*CatAllocationRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatAllocation) WithMasterTimeout(v time.Duration) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.MasterTimeout = v @@ -255,7 +243,6 @@ func (f CatAllocation) WithMasterTimeout(v time.Duration) func(*CatAllocationReq } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatAllocation) WithS(v ...string) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.S = v @@ -263,7 +250,6 @@ func (f CatAllocation) WithS(v ...string) func(*CatAllocationRequest) { } // WithV - verbose mode. display column headers. -// func (f CatAllocation) WithV(v bool) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.V = &v @@ -271,7 +257,6 @@ func (f CatAllocation) WithV(v bool) func(*CatAllocationRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatAllocation) WithPretty() func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.Pretty = true @@ -279,7 +264,6 @@ func (f CatAllocation) WithPretty() func(*CatAllocationRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatAllocation) WithHuman() func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.Human = true @@ -287,7 +271,6 @@ func (f CatAllocation) WithHuman() func(*CatAllocationRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatAllocation) WithErrorTrace() func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.ErrorTrace = true @@ -295,7 +278,6 @@ func (f CatAllocation) WithErrorTrace() func(*CatAllocationRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatAllocation) WithFilterPath(v ...string) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { r.FilterPath = v @@ -303,7 +285,6 @@ func (f CatAllocation) WithFilterPath(v ...string) func(*CatAllocationRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatAllocation) WithHeader(h map[string]string) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { if r.Header == nil { @@ -316,7 +297,6 @@ func (f CatAllocation) WithHeader(h map[string]string) func(*CatAllocationReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatAllocation) WithOpaqueID(s string) func(*CatAllocationRequest) { return func(r *CatAllocationRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.count.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.count.go index f56f6bc51e6f..1bac00454fd4 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.count.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.count.go @@ -47,12 +47,9 @@ func newCatCountFunc(t Transport) CatCount { // ----- API Definition ------------------------------------------------------- // CatCount provides quick access to the document count of the entire cluster, or individual indices. -// -// type CatCount func(o ...func(*CatCountRequest)) (*Response, error) // CatCountRequest configures the Cat Count API request. -// type CatCountRequest struct { Index []string @@ -73,7 +70,6 @@ type CatCountRequest struct { } // Do executes the request and returns response or error. -// func (r CatCountRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -175,7 +171,6 @@ func (r CatCountRequest) Do(ctx context.Context, transport Transport) (*Response } // WithContext sets the request context. -// func (f CatCount) WithContext(v context.Context) func(*CatCountRequest) { return func(r *CatCountRequest) { r.ctx = v @@ -183,7 +178,6 @@ func (f CatCount) WithContext(v context.Context) func(*CatCountRequest) { } // WithIndex - a list of index names to limit the returned information. -// func (f CatCount) WithIndex(v ...string) func(*CatCountRequest) { return func(r *CatCountRequest) { r.Index = v @@ -191,7 +185,6 @@ func (f CatCount) WithIndex(v ...string) func(*CatCountRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatCount) WithFormat(v string) func(*CatCountRequest) { return func(r *CatCountRequest) { r.Format = v @@ -199,7 +192,6 @@ func (f CatCount) WithFormat(v string) func(*CatCountRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatCount) WithH(v ...string) func(*CatCountRequest) { return func(r *CatCountRequest) { r.H = v @@ -207,7 +199,6 @@ func (f CatCount) WithH(v ...string) func(*CatCountRequest) { } // WithHelp - return help information. -// func (f CatCount) WithHelp(v bool) func(*CatCountRequest) { return func(r *CatCountRequest) { r.Help = &v @@ -215,7 +206,6 @@ func (f CatCount) WithHelp(v bool) func(*CatCountRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatCount) WithS(v ...string) func(*CatCountRequest) { return func(r *CatCountRequest) { r.S = v @@ -223,7 +213,6 @@ func (f CatCount) WithS(v ...string) func(*CatCountRequest) { } // WithV - verbose mode. display column headers. -// func (f CatCount) WithV(v bool) func(*CatCountRequest) { return func(r *CatCountRequest) { r.V = &v @@ -231,7 +220,6 @@ func (f CatCount) WithV(v bool) func(*CatCountRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatCount) WithPretty() func(*CatCountRequest) { return func(r *CatCountRequest) { r.Pretty = true @@ -239,7 +227,6 @@ func (f CatCount) WithPretty() func(*CatCountRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatCount) WithHuman() func(*CatCountRequest) { return func(r *CatCountRequest) { r.Human = true @@ -247,7 +234,6 @@ func (f CatCount) WithHuman() func(*CatCountRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatCount) WithErrorTrace() func(*CatCountRequest) { return func(r *CatCountRequest) { r.ErrorTrace = true @@ -255,7 +241,6 @@ func (f CatCount) WithErrorTrace() func(*CatCountRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatCount) WithFilterPath(v ...string) func(*CatCountRequest) { return func(r *CatCountRequest) { r.FilterPath = v @@ -263,7 +248,6 @@ func (f CatCount) WithFilterPath(v ...string) func(*CatCountRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatCount) WithHeader(h map[string]string) func(*CatCountRequest) { return func(r *CatCountRequest) { if r.Header == nil { @@ -276,7 +260,6 @@ func (f CatCount) WithHeader(h map[string]string) func(*CatCountRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatCount) WithOpaqueID(s string) func(*CatCountRequest) { return func(r *CatCountRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.fielddata.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.fielddata.go index 931c35417b4b..899cbe8416eb 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.fielddata.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.fielddata.go @@ -47,12 +47,9 @@ func newCatFielddataFunc(t Transport) CatFielddata { // ----- API Definition ------------------------------------------------------- // CatFielddata shows how much heap memory is currently being used by fielddata on every data node in the cluster. -// -// type CatFielddata func(o ...func(*CatFielddataRequest)) (*Response, error) // CatFielddataRequest configures the Cat Fielddata API request. -// type CatFielddataRequest struct { Fields []string @@ -74,7 +71,6 @@ type CatFielddataRequest struct { } // Do executes the request and returns response or error. -// func (r CatFielddataRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -184,7 +180,6 @@ func (r CatFielddataRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f CatFielddata) WithContext(v context.Context) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.ctx = v @@ -192,7 +187,6 @@ func (f CatFielddata) WithContext(v context.Context) func(*CatFielddataRequest) } // WithFields - a list of fields to return the fielddata size. -// func (f CatFielddata) WithFields(v ...string) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.Fields = v @@ -200,7 +194,6 @@ func (f CatFielddata) WithFields(v ...string) func(*CatFielddataRequest) { } // WithBytes - the unit in which to display byte values. -// func (f CatFielddata) WithBytes(v string) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.Bytes = v @@ -208,7 +201,6 @@ func (f CatFielddata) WithBytes(v string) func(*CatFielddataRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatFielddata) WithFormat(v string) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.Format = v @@ -216,7 +208,6 @@ func (f CatFielddata) WithFormat(v string) func(*CatFielddataRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatFielddata) WithH(v ...string) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.H = v @@ -224,7 +215,6 @@ func (f CatFielddata) WithH(v ...string) func(*CatFielddataRequest) { } // WithHelp - return help information. -// func (f CatFielddata) WithHelp(v bool) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.Help = &v @@ -232,7 +222,6 @@ func (f CatFielddata) WithHelp(v bool) func(*CatFielddataRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatFielddata) WithS(v ...string) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.S = v @@ -240,7 +229,6 @@ func (f CatFielddata) WithS(v ...string) func(*CatFielddataRequest) { } // WithV - verbose mode. display column headers. -// func (f CatFielddata) WithV(v bool) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.V = &v @@ -248,7 +236,6 @@ func (f CatFielddata) WithV(v bool) func(*CatFielddataRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatFielddata) WithPretty() func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.Pretty = true @@ -256,7 +243,6 @@ func (f CatFielddata) WithPretty() func(*CatFielddataRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatFielddata) WithHuman() func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.Human = true @@ -264,7 +250,6 @@ func (f CatFielddata) WithHuman() func(*CatFielddataRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatFielddata) WithErrorTrace() func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.ErrorTrace = true @@ -272,7 +257,6 @@ func (f CatFielddata) WithErrorTrace() func(*CatFielddataRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatFielddata) WithFilterPath(v ...string) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { r.FilterPath = v @@ -280,7 +264,6 @@ func (f CatFielddata) WithFilterPath(v ...string) func(*CatFielddataRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatFielddata) WithHeader(h map[string]string) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { if r.Header == nil { @@ -293,7 +276,6 @@ func (f CatFielddata) WithHeader(h map[string]string) func(*CatFielddataRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatFielddata) WithOpaqueID(s string) func(*CatFielddataRequest) { return func(r *CatFielddataRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.health.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.health.go index 3b32976ca536..07d0dc25fbdd 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.health.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.health.go @@ -47,12 +47,9 @@ func newCatHealthFunc(t Transport) CatHealth { // ----- API Definition ------------------------------------------------------- // CatHealth returns a concise representation of the cluster health. -// -// type CatHealth func(o ...func(*CatHealthRequest)) (*Response, error) // CatHealthRequest configures the Cat Health API request. -// type CatHealthRequest struct { Format string H []string @@ -73,7 +70,6 @@ type CatHealthRequest struct { } // Do executes the request and returns response or error. -// func (r CatHealthRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -176,7 +172,6 @@ func (r CatHealthRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f CatHealth) WithContext(v context.Context) func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.ctx = v @@ -184,7 +179,6 @@ func (f CatHealth) WithContext(v context.Context) func(*CatHealthRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatHealth) WithFormat(v string) func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.Format = v @@ -192,7 +186,6 @@ func (f CatHealth) WithFormat(v string) func(*CatHealthRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatHealth) WithH(v ...string) func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.H = v @@ -200,7 +193,6 @@ func (f CatHealth) WithH(v ...string) func(*CatHealthRequest) { } // WithHelp - return help information. -// func (f CatHealth) WithHelp(v bool) func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.Help = &v @@ -208,7 +200,6 @@ func (f CatHealth) WithHelp(v bool) func(*CatHealthRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatHealth) WithS(v ...string) func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.S = v @@ -216,7 +207,6 @@ func (f CatHealth) WithS(v ...string) func(*CatHealthRequest) { } // WithTime - the unit in which to display time values. -// func (f CatHealth) WithTime(v string) func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.Time = v @@ -224,7 +214,6 @@ func (f CatHealth) WithTime(v string) func(*CatHealthRequest) { } // WithTs - set to false to disable timestamping. -// func (f CatHealth) WithTs(v bool) func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.Ts = &v @@ -232,7 +221,6 @@ func (f CatHealth) WithTs(v bool) func(*CatHealthRequest) { } // WithV - verbose mode. display column headers. -// func (f CatHealth) WithV(v bool) func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.V = &v @@ -240,7 +228,6 @@ func (f CatHealth) WithV(v bool) func(*CatHealthRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatHealth) WithPretty() func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.Pretty = true @@ -248,7 +235,6 @@ func (f CatHealth) WithPretty() func(*CatHealthRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatHealth) WithHuman() func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.Human = true @@ -256,7 +242,6 @@ func (f CatHealth) WithHuman() func(*CatHealthRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatHealth) WithErrorTrace() func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.ErrorTrace = true @@ -264,7 +249,6 @@ func (f CatHealth) WithErrorTrace() func(*CatHealthRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatHealth) WithFilterPath(v ...string) func(*CatHealthRequest) { return func(r *CatHealthRequest) { r.FilterPath = v @@ -272,7 +256,6 @@ func (f CatHealth) WithFilterPath(v ...string) func(*CatHealthRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatHealth) WithHeader(h map[string]string) func(*CatHealthRequest) { return func(r *CatHealthRequest) { if r.Header == nil { @@ -285,7 +268,6 @@ func (f CatHealth) WithHeader(h map[string]string) func(*CatHealthRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatHealth) WithOpaqueID(s string) func(*CatHealthRequest) { return func(r *CatHealthRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.help.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.help.go index 4663cfd16680..8f6afc4d809b 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.help.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.help.go @@ -46,12 +46,9 @@ func newCatHelpFunc(t Transport) CatHelp { // ----- API Definition ------------------------------------------------------- // CatHelp returns help for the Cat APIs. -// -// type CatHelp func(o ...func(*CatHelpRequest)) (*Response, error) // CatHelpRequest configures the Cat Help API request. -// type CatHelpRequest struct { Help *bool S []string @@ -67,7 +64,6 @@ type CatHelpRequest struct { } // Do executes the request and returns response or error. -// func (r CatHelpRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -150,7 +146,6 @@ func (r CatHelpRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f CatHelp) WithContext(v context.Context) func(*CatHelpRequest) { return func(r *CatHelpRequest) { r.ctx = v @@ -158,7 +153,6 @@ func (f CatHelp) WithContext(v context.Context) func(*CatHelpRequest) { } // WithHelp - return help information. -// func (f CatHelp) WithHelp(v bool) func(*CatHelpRequest) { return func(r *CatHelpRequest) { r.Help = &v @@ -166,7 +160,6 @@ func (f CatHelp) WithHelp(v bool) func(*CatHelpRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatHelp) WithS(v ...string) func(*CatHelpRequest) { return func(r *CatHelpRequest) { r.S = v @@ -174,7 +167,6 @@ func (f CatHelp) WithS(v ...string) func(*CatHelpRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatHelp) WithPretty() func(*CatHelpRequest) { return func(r *CatHelpRequest) { r.Pretty = true @@ -182,7 +174,6 @@ func (f CatHelp) WithPretty() func(*CatHelpRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatHelp) WithHuman() func(*CatHelpRequest) { return func(r *CatHelpRequest) { r.Human = true @@ -190,7 +181,6 @@ func (f CatHelp) WithHuman() func(*CatHelpRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatHelp) WithErrorTrace() func(*CatHelpRequest) { return func(r *CatHelpRequest) { r.ErrorTrace = true @@ -198,7 +188,6 @@ func (f CatHelp) WithErrorTrace() func(*CatHelpRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatHelp) WithFilterPath(v ...string) func(*CatHelpRequest) { return func(r *CatHelpRequest) { r.FilterPath = v @@ -206,7 +195,6 @@ func (f CatHelp) WithFilterPath(v ...string) func(*CatHelpRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatHelp) WithHeader(h map[string]string) func(*CatHelpRequest) { return func(r *CatHelpRequest) { if r.Header == nil { @@ -219,7 +207,6 @@ func (f CatHelp) WithHeader(h map[string]string) func(*CatHelpRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatHelp) WithOpaqueID(s string) func(*CatHelpRequest) { return func(r *CatHelpRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.indices.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.indices.go index c8f17ed4b89d..4f4675a1f69e 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.indices.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.indices.go @@ -47,12 +47,9 @@ func newCatIndicesFunc(t Transport) CatIndices { // ----- API Definition ------------------------------------------------------- // CatIndices returns information about indices: number of primaries and replicas, document counts, disk size, ... -// -// type CatIndices func(o ...func(*CatIndicesRequest)) (*Response, error) // CatIndicesRequest configures the Cat Indices API request. -// type CatIndicesRequest struct { Index []string @@ -81,7 +78,6 @@ type CatIndicesRequest struct { } // Do executes the request and returns response or error. -// func (r CatIndicesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -215,7 +211,6 @@ func (r CatIndicesRequest) Do(ctx context.Context, transport Transport) (*Respon } // WithContext sets the request context. -// func (f CatIndices) WithContext(v context.Context) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.ctx = v @@ -223,7 +218,6 @@ func (f CatIndices) WithContext(v context.Context) func(*CatIndicesRequest) { } // WithIndex - a list of index names to limit the returned information. -// func (f CatIndices) WithIndex(v ...string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Index = v @@ -231,7 +225,6 @@ func (f CatIndices) WithIndex(v ...string) func(*CatIndicesRequest) { } // WithBytes - the unit in which to display byte values. -// func (f CatIndices) WithBytes(v string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Bytes = v @@ -239,7 +232,6 @@ func (f CatIndices) WithBytes(v string) func(*CatIndicesRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f CatIndices) WithExpandWildcards(v string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.ExpandWildcards = v @@ -247,7 +239,6 @@ func (f CatIndices) WithExpandWildcards(v string) func(*CatIndicesRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatIndices) WithFormat(v string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Format = v @@ -255,7 +246,6 @@ func (f CatIndices) WithFormat(v string) func(*CatIndicesRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatIndices) WithH(v ...string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.H = v @@ -263,7 +253,6 @@ func (f CatIndices) WithH(v ...string) func(*CatIndicesRequest) { } // WithHealth - a health status ("green", "yellow", or "red" to filter only indices matching the specified health status. -// func (f CatIndices) WithHealth(v string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Health = v @@ -271,7 +260,6 @@ func (f CatIndices) WithHealth(v string) func(*CatIndicesRequest) { } // WithHelp - return help information. -// func (f CatIndices) WithHelp(v bool) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Help = &v @@ -279,7 +267,6 @@ func (f CatIndices) WithHelp(v bool) func(*CatIndicesRequest) { } // WithIncludeUnloadedSegments - if set to true segment stats will include stats for segments that are not currently loaded into memory. -// func (f CatIndices) WithIncludeUnloadedSegments(v bool) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.IncludeUnloadedSegments = &v @@ -287,7 +274,6 @@ func (f CatIndices) WithIncludeUnloadedSegments(v bool) func(*CatIndicesRequest) } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatIndices) WithLocal(v bool) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Local = &v @@ -295,7 +281,6 @@ func (f CatIndices) WithLocal(v bool) func(*CatIndicesRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatIndices) WithMasterTimeout(v time.Duration) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.MasterTimeout = v @@ -303,7 +288,6 @@ func (f CatIndices) WithMasterTimeout(v time.Duration) func(*CatIndicesRequest) } // WithPri - set to true to return stats only for primary shards. -// func (f CatIndices) WithPri(v bool) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Pri = &v @@ -311,7 +295,6 @@ func (f CatIndices) WithPri(v bool) func(*CatIndicesRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatIndices) WithS(v ...string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.S = v @@ -319,7 +302,6 @@ func (f CatIndices) WithS(v ...string) func(*CatIndicesRequest) { } // WithTime - the unit in which to display time values. -// func (f CatIndices) WithTime(v string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Time = v @@ -327,7 +309,6 @@ func (f CatIndices) WithTime(v string) func(*CatIndicesRequest) { } // WithV - verbose mode. display column headers. -// func (f CatIndices) WithV(v bool) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.V = &v @@ -335,7 +316,6 @@ func (f CatIndices) WithV(v bool) func(*CatIndicesRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatIndices) WithPretty() func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Pretty = true @@ -343,7 +323,6 @@ func (f CatIndices) WithPretty() func(*CatIndicesRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatIndices) WithHuman() func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.Human = true @@ -351,7 +330,6 @@ func (f CatIndices) WithHuman() func(*CatIndicesRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatIndices) WithErrorTrace() func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.ErrorTrace = true @@ -359,7 +337,6 @@ func (f CatIndices) WithErrorTrace() func(*CatIndicesRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatIndices) WithFilterPath(v ...string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { r.FilterPath = v @@ -367,7 +344,6 @@ func (f CatIndices) WithFilterPath(v ...string) func(*CatIndicesRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatIndices) WithHeader(h map[string]string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { if r.Header == nil { @@ -380,7 +356,6 @@ func (f CatIndices) WithHeader(h map[string]string) func(*CatIndicesRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatIndices) WithOpaqueID(s string) func(*CatIndicesRequest) { return func(r *CatIndicesRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.master.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.master.go index 0aab1edabbc7..af4105e6bcb3 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.master.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.master.go @@ -47,12 +47,9 @@ func newCatMasterFunc(t Transport) CatMaster { // ----- API Definition ------------------------------------------------------- // CatMaster returns information about the master node. -// -// type CatMaster func(o ...func(*CatMasterRequest)) (*Response, error) // CatMasterRequest configures the Cat Master API request. -// type CatMasterRequest struct { Format string H []string @@ -73,7 +70,6 @@ type CatMasterRequest struct { } // Do executes the request and returns response or error. -// func (r CatMasterRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -176,7 +172,6 @@ func (r CatMasterRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f CatMaster) WithContext(v context.Context) func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.ctx = v @@ -184,7 +179,6 @@ func (f CatMaster) WithContext(v context.Context) func(*CatMasterRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatMaster) WithFormat(v string) func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.Format = v @@ -192,7 +186,6 @@ func (f CatMaster) WithFormat(v string) func(*CatMasterRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatMaster) WithH(v ...string) func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.H = v @@ -200,7 +193,6 @@ func (f CatMaster) WithH(v ...string) func(*CatMasterRequest) { } // WithHelp - return help information. -// func (f CatMaster) WithHelp(v bool) func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.Help = &v @@ -208,7 +200,6 @@ func (f CatMaster) WithHelp(v bool) func(*CatMasterRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatMaster) WithLocal(v bool) func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.Local = &v @@ -216,7 +207,6 @@ func (f CatMaster) WithLocal(v bool) func(*CatMasterRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatMaster) WithMasterTimeout(v time.Duration) func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.MasterTimeout = v @@ -224,7 +214,6 @@ func (f CatMaster) WithMasterTimeout(v time.Duration) func(*CatMasterRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatMaster) WithS(v ...string) func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.S = v @@ -232,7 +221,6 @@ func (f CatMaster) WithS(v ...string) func(*CatMasterRequest) { } // WithV - verbose mode. display column headers. -// func (f CatMaster) WithV(v bool) func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.V = &v @@ -240,7 +228,6 @@ func (f CatMaster) WithV(v bool) func(*CatMasterRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatMaster) WithPretty() func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.Pretty = true @@ -248,7 +235,6 @@ func (f CatMaster) WithPretty() func(*CatMasterRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatMaster) WithHuman() func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.Human = true @@ -256,7 +242,6 @@ func (f CatMaster) WithHuman() func(*CatMasterRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatMaster) WithErrorTrace() func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.ErrorTrace = true @@ -264,7 +249,6 @@ func (f CatMaster) WithErrorTrace() func(*CatMasterRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatMaster) WithFilterPath(v ...string) func(*CatMasterRequest) { return func(r *CatMasterRequest) { r.FilterPath = v @@ -272,7 +256,6 @@ func (f CatMaster) WithFilterPath(v ...string) func(*CatMasterRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatMaster) WithHeader(h map[string]string) func(*CatMasterRequest) { return func(r *CatMasterRequest) { if r.Header == nil { @@ -285,7 +268,6 @@ func (f CatMaster) WithHeader(h map[string]string) func(*CatMasterRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatMaster) WithOpaqueID(s string) func(*CatMasterRequest) { return func(r *CatMasterRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.nodeattrs.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.nodeattrs.go index 7b54ea626884..e83f08fe8214 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.nodeattrs.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.nodeattrs.go @@ -47,12 +47,9 @@ func newCatNodeattrsFunc(t Transport) CatNodeattrs { // ----- API Definition ------------------------------------------------------- // CatNodeattrs returns information about custom node attributes. -// -// type CatNodeattrs func(o ...func(*CatNodeattrsRequest)) (*Response, error) // CatNodeattrsRequest configures the Cat Nodeattrs API request. -// type CatNodeattrsRequest struct { Format string H []string @@ -73,7 +70,6 @@ type CatNodeattrsRequest struct { } // Do executes the request and returns response or error. -// func (r CatNodeattrsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -176,7 +172,6 @@ func (r CatNodeattrsRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f CatNodeattrs) WithContext(v context.Context) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.ctx = v @@ -184,7 +179,6 @@ func (f CatNodeattrs) WithContext(v context.Context) func(*CatNodeattrsRequest) } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatNodeattrs) WithFormat(v string) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.Format = v @@ -192,7 +186,6 @@ func (f CatNodeattrs) WithFormat(v string) func(*CatNodeattrsRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatNodeattrs) WithH(v ...string) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.H = v @@ -200,7 +193,6 @@ func (f CatNodeattrs) WithH(v ...string) func(*CatNodeattrsRequest) { } // WithHelp - return help information. -// func (f CatNodeattrs) WithHelp(v bool) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.Help = &v @@ -208,7 +200,6 @@ func (f CatNodeattrs) WithHelp(v bool) func(*CatNodeattrsRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatNodeattrs) WithLocal(v bool) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.Local = &v @@ -216,7 +207,6 @@ func (f CatNodeattrs) WithLocal(v bool) func(*CatNodeattrsRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatNodeattrs) WithMasterTimeout(v time.Duration) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.MasterTimeout = v @@ -224,7 +214,6 @@ func (f CatNodeattrs) WithMasterTimeout(v time.Duration) func(*CatNodeattrsReque } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatNodeattrs) WithS(v ...string) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.S = v @@ -232,7 +221,6 @@ func (f CatNodeattrs) WithS(v ...string) func(*CatNodeattrsRequest) { } // WithV - verbose mode. display column headers. -// func (f CatNodeattrs) WithV(v bool) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.V = &v @@ -240,7 +228,6 @@ func (f CatNodeattrs) WithV(v bool) func(*CatNodeattrsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatNodeattrs) WithPretty() func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.Pretty = true @@ -248,7 +235,6 @@ func (f CatNodeattrs) WithPretty() func(*CatNodeattrsRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatNodeattrs) WithHuman() func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.Human = true @@ -256,7 +242,6 @@ func (f CatNodeattrs) WithHuman() func(*CatNodeattrsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatNodeattrs) WithErrorTrace() func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.ErrorTrace = true @@ -264,7 +249,6 @@ func (f CatNodeattrs) WithErrorTrace() func(*CatNodeattrsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatNodeattrs) WithFilterPath(v ...string) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { r.FilterPath = v @@ -272,7 +256,6 @@ func (f CatNodeattrs) WithFilterPath(v ...string) func(*CatNodeattrsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatNodeattrs) WithHeader(h map[string]string) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { if r.Header == nil { @@ -285,7 +268,6 @@ func (f CatNodeattrs) WithHeader(h map[string]string) func(*CatNodeattrsRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatNodeattrs) WithOpaqueID(s string) func(*CatNodeattrsRequest) { return func(r *CatNodeattrsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.nodes.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.nodes.go index 2bd5d95335aa..ce77c87a2652 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.nodes.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.nodes.go @@ -47,12 +47,9 @@ func newCatNodesFunc(t Transport) CatNodes { // ----- API Definition ------------------------------------------------------- // CatNodes returns basic statistics about performance of cluster nodes. -// -// type CatNodes func(o ...func(*CatNodesRequest)) (*Response, error) // CatNodesRequest configures the Cat Nodes API request. -// type CatNodesRequest struct { Bytes string Format string @@ -77,7 +74,6 @@ type CatNodesRequest struct { } // Do executes the request and returns response or error. -// func (r CatNodesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -196,7 +192,6 @@ func (r CatNodesRequest) Do(ctx context.Context, transport Transport) (*Response } // WithContext sets the request context. -// func (f CatNodes) WithContext(v context.Context) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.ctx = v @@ -204,7 +199,6 @@ func (f CatNodes) WithContext(v context.Context) func(*CatNodesRequest) { } // WithBytes - the unit in which to display byte values. -// func (f CatNodes) WithBytes(v string) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.Bytes = v @@ -212,7 +206,6 @@ func (f CatNodes) WithBytes(v string) func(*CatNodesRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatNodes) WithFormat(v string) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.Format = v @@ -220,7 +213,6 @@ func (f CatNodes) WithFormat(v string) func(*CatNodesRequest) { } // WithFullID - return the full node ID instead of the shortened version (default: false). -// func (f CatNodes) WithFullID(v bool) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.FullID = &v @@ -228,7 +220,6 @@ func (f CatNodes) WithFullID(v bool) func(*CatNodesRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatNodes) WithH(v ...string) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.H = v @@ -236,7 +227,6 @@ func (f CatNodes) WithH(v ...string) func(*CatNodesRequest) { } // WithHelp - return help information. -// func (f CatNodes) WithHelp(v bool) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.Help = &v @@ -244,7 +234,6 @@ func (f CatNodes) WithHelp(v bool) func(*CatNodesRequest) { } // WithIncludeUnloadedSegments - if set to true segment stats will include stats for segments that are not currently loaded into memory. -// func (f CatNodes) WithIncludeUnloadedSegments(v bool) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.IncludeUnloadedSegments = &v @@ -252,7 +241,6 @@ func (f CatNodes) WithIncludeUnloadedSegments(v bool) func(*CatNodesRequest) { } // WithLocal - calculate the selected nodes using the local cluster state rather than the state from master node (default: false). -// func (f CatNodes) WithLocal(v bool) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.Local = &v @@ -260,7 +248,6 @@ func (f CatNodes) WithLocal(v bool) func(*CatNodesRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatNodes) WithMasterTimeout(v time.Duration) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.MasterTimeout = v @@ -268,7 +255,6 @@ func (f CatNodes) WithMasterTimeout(v time.Duration) func(*CatNodesRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatNodes) WithS(v ...string) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.S = v @@ -276,7 +262,6 @@ func (f CatNodes) WithS(v ...string) func(*CatNodesRequest) { } // WithTime - the unit in which to display time values. -// func (f CatNodes) WithTime(v string) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.Time = v @@ -284,7 +269,6 @@ func (f CatNodes) WithTime(v string) func(*CatNodesRequest) { } // WithV - verbose mode. display column headers. -// func (f CatNodes) WithV(v bool) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.V = &v @@ -292,7 +276,6 @@ func (f CatNodes) WithV(v bool) func(*CatNodesRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatNodes) WithPretty() func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.Pretty = true @@ -300,7 +283,6 @@ func (f CatNodes) WithPretty() func(*CatNodesRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatNodes) WithHuman() func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.Human = true @@ -308,7 +290,6 @@ func (f CatNodes) WithHuman() func(*CatNodesRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatNodes) WithErrorTrace() func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.ErrorTrace = true @@ -316,7 +297,6 @@ func (f CatNodes) WithErrorTrace() func(*CatNodesRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatNodes) WithFilterPath(v ...string) func(*CatNodesRequest) { return func(r *CatNodesRequest) { r.FilterPath = v @@ -324,7 +304,6 @@ func (f CatNodes) WithFilterPath(v ...string) func(*CatNodesRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatNodes) WithHeader(h map[string]string) func(*CatNodesRequest) { return func(r *CatNodesRequest) { if r.Header == nil { @@ -337,7 +316,6 @@ func (f CatNodes) WithHeader(h map[string]string) func(*CatNodesRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatNodes) WithOpaqueID(s string) func(*CatNodesRequest) { return func(r *CatNodesRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.pending_tasks.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.pending_tasks.go index 1729d6b3ca1a..ec50095aafe3 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.pending_tasks.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.pending_tasks.go @@ -47,12 +47,9 @@ func newCatPendingTasksFunc(t Transport) CatPendingTasks { // ----- API Definition ------------------------------------------------------- // CatPendingTasks returns a concise representation of the cluster pending tasks. -// -// type CatPendingTasks func(o ...func(*CatPendingTasksRequest)) (*Response, error) // CatPendingTasksRequest configures the Cat Pending Tasks API request. -// type CatPendingTasksRequest struct { Format string H []string @@ -74,7 +71,6 @@ type CatPendingTasksRequest struct { } // Do executes the request and returns response or error. -// func (r CatPendingTasksRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -181,7 +177,6 @@ func (r CatPendingTasksRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f CatPendingTasks) WithContext(v context.Context) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.ctx = v @@ -189,7 +184,6 @@ func (f CatPendingTasks) WithContext(v context.Context) func(*CatPendingTasksReq } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatPendingTasks) WithFormat(v string) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.Format = v @@ -197,7 +191,6 @@ func (f CatPendingTasks) WithFormat(v string) func(*CatPendingTasksRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatPendingTasks) WithH(v ...string) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.H = v @@ -205,7 +198,6 @@ func (f CatPendingTasks) WithH(v ...string) func(*CatPendingTasksRequest) { } // WithHelp - return help information. -// func (f CatPendingTasks) WithHelp(v bool) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.Help = &v @@ -213,7 +205,6 @@ func (f CatPendingTasks) WithHelp(v bool) func(*CatPendingTasksRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatPendingTasks) WithLocal(v bool) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.Local = &v @@ -221,7 +212,6 @@ func (f CatPendingTasks) WithLocal(v bool) func(*CatPendingTasksRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatPendingTasks) WithMasterTimeout(v time.Duration) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.MasterTimeout = v @@ -229,7 +219,6 @@ func (f CatPendingTasks) WithMasterTimeout(v time.Duration) func(*CatPendingTask } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatPendingTasks) WithS(v ...string) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.S = v @@ -237,7 +226,6 @@ func (f CatPendingTasks) WithS(v ...string) func(*CatPendingTasksRequest) { } // WithTime - the unit in which to display time values. -// func (f CatPendingTasks) WithTime(v string) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.Time = v @@ -245,7 +233,6 @@ func (f CatPendingTasks) WithTime(v string) func(*CatPendingTasksRequest) { } // WithV - verbose mode. display column headers. -// func (f CatPendingTasks) WithV(v bool) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.V = &v @@ -253,7 +240,6 @@ func (f CatPendingTasks) WithV(v bool) func(*CatPendingTasksRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatPendingTasks) WithPretty() func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.Pretty = true @@ -261,7 +247,6 @@ func (f CatPendingTasks) WithPretty() func(*CatPendingTasksRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatPendingTasks) WithHuman() func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.Human = true @@ -269,7 +254,6 @@ func (f CatPendingTasks) WithHuman() func(*CatPendingTasksRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatPendingTasks) WithErrorTrace() func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.ErrorTrace = true @@ -277,7 +261,6 @@ func (f CatPendingTasks) WithErrorTrace() func(*CatPendingTasksRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatPendingTasks) WithFilterPath(v ...string) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { r.FilterPath = v @@ -285,7 +268,6 @@ func (f CatPendingTasks) WithFilterPath(v ...string) func(*CatPendingTasksReques } // WithHeader adds the headers to the HTTP request. -// func (f CatPendingTasks) WithHeader(h map[string]string) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { if r.Header == nil { @@ -298,7 +280,6 @@ func (f CatPendingTasks) WithHeader(h map[string]string) func(*CatPendingTasksRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatPendingTasks) WithOpaqueID(s string) func(*CatPendingTasksRequest) { return func(r *CatPendingTasksRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.plugins.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.plugins.go index 1d281c3a54d1..4d76d56e796d 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.plugins.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.plugins.go @@ -47,12 +47,9 @@ func newCatPluginsFunc(t Transport) CatPlugins { // ----- API Definition ------------------------------------------------------- // CatPlugins returns information about installed plugins across nodes node. -// -// type CatPlugins func(o ...func(*CatPluginsRequest)) (*Response, error) // CatPluginsRequest configures the Cat Plugins API request. -// type CatPluginsRequest struct { Format string H []string @@ -74,7 +71,6 @@ type CatPluginsRequest struct { } // Do executes the request and returns response or error. -// func (r CatPluginsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -181,7 +177,6 @@ func (r CatPluginsRequest) Do(ctx context.Context, transport Transport) (*Respon } // WithContext sets the request context. -// func (f CatPlugins) WithContext(v context.Context) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.ctx = v @@ -189,7 +184,6 @@ func (f CatPlugins) WithContext(v context.Context) func(*CatPluginsRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatPlugins) WithFormat(v string) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.Format = v @@ -197,7 +191,6 @@ func (f CatPlugins) WithFormat(v string) func(*CatPluginsRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatPlugins) WithH(v ...string) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.H = v @@ -205,7 +198,6 @@ func (f CatPlugins) WithH(v ...string) func(*CatPluginsRequest) { } // WithHelp - return help information. -// func (f CatPlugins) WithHelp(v bool) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.Help = &v @@ -213,7 +205,6 @@ func (f CatPlugins) WithHelp(v bool) func(*CatPluginsRequest) { } // WithIncludeBootstrap - include bootstrap plugins in the response. -// func (f CatPlugins) WithIncludeBootstrap(v bool) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.IncludeBootstrap = &v @@ -221,7 +212,6 @@ func (f CatPlugins) WithIncludeBootstrap(v bool) func(*CatPluginsRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatPlugins) WithLocal(v bool) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.Local = &v @@ -229,7 +219,6 @@ func (f CatPlugins) WithLocal(v bool) func(*CatPluginsRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatPlugins) WithMasterTimeout(v time.Duration) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.MasterTimeout = v @@ -237,7 +226,6 @@ func (f CatPlugins) WithMasterTimeout(v time.Duration) func(*CatPluginsRequest) } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatPlugins) WithS(v ...string) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.S = v @@ -245,7 +233,6 @@ func (f CatPlugins) WithS(v ...string) func(*CatPluginsRequest) { } // WithV - verbose mode. display column headers. -// func (f CatPlugins) WithV(v bool) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.V = &v @@ -253,7 +240,6 @@ func (f CatPlugins) WithV(v bool) func(*CatPluginsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatPlugins) WithPretty() func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.Pretty = true @@ -261,7 +247,6 @@ func (f CatPlugins) WithPretty() func(*CatPluginsRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatPlugins) WithHuman() func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.Human = true @@ -269,7 +254,6 @@ func (f CatPlugins) WithHuman() func(*CatPluginsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatPlugins) WithErrorTrace() func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.ErrorTrace = true @@ -277,7 +261,6 @@ func (f CatPlugins) WithErrorTrace() func(*CatPluginsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatPlugins) WithFilterPath(v ...string) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { r.FilterPath = v @@ -285,7 +268,6 @@ func (f CatPlugins) WithFilterPath(v ...string) func(*CatPluginsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatPlugins) WithHeader(h map[string]string) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { if r.Header == nil { @@ -298,7 +280,6 @@ func (f CatPlugins) WithHeader(h map[string]string) func(*CatPluginsRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatPlugins) WithOpaqueID(s string) func(*CatPluginsRequest) { return func(r *CatPluginsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.recovery.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.recovery.go index 1ab17583785b..ecdb91b3c670 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.recovery.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.recovery.go @@ -46,12 +46,9 @@ func newCatRecoveryFunc(t Transport) CatRecovery { // ----- API Definition ------------------------------------------------------- // CatRecovery returns information about index shard recoveries, both on-going completed. -// -// type CatRecovery func(o ...func(*CatRecoveryRequest)) (*Response, error) // CatRecoveryRequest configures the Cat Recovery API request. -// type CatRecoveryRequest struct { Index []string @@ -76,7 +73,6 @@ type CatRecoveryRequest struct { } // Do executes the request and returns response or error. -// func (r CatRecoveryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -198,7 +194,6 @@ func (r CatRecoveryRequest) Do(ctx context.Context, transport Transport) (*Respo } // WithContext sets the request context. -// func (f CatRecovery) WithContext(v context.Context) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.ctx = v @@ -206,7 +201,6 @@ func (f CatRecovery) WithContext(v context.Context) func(*CatRecoveryRequest) { } // WithIndex - comma-separated list or wildcard expression of index names to limit the returned information. -// func (f CatRecovery) WithIndex(v ...string) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.Index = v @@ -214,7 +208,6 @@ func (f CatRecovery) WithIndex(v ...string) func(*CatRecoveryRequest) { } // WithActiveOnly - if `true`, the response only includes ongoing shard recoveries. -// func (f CatRecovery) WithActiveOnly(v bool) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.ActiveOnly = &v @@ -222,7 +215,6 @@ func (f CatRecovery) WithActiveOnly(v bool) func(*CatRecoveryRequest) { } // WithBytes - the unit in which to display byte values. -// func (f CatRecovery) WithBytes(v string) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.Bytes = v @@ -230,7 +222,6 @@ func (f CatRecovery) WithBytes(v string) func(*CatRecoveryRequest) { } // WithDetailed - if `true`, the response includes detailed information about shard recoveries. -// func (f CatRecovery) WithDetailed(v bool) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.Detailed = &v @@ -238,7 +229,6 @@ func (f CatRecovery) WithDetailed(v bool) func(*CatRecoveryRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatRecovery) WithFormat(v string) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.Format = v @@ -246,7 +236,6 @@ func (f CatRecovery) WithFormat(v string) func(*CatRecoveryRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatRecovery) WithH(v ...string) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.H = v @@ -254,7 +243,6 @@ func (f CatRecovery) WithH(v ...string) func(*CatRecoveryRequest) { } // WithHelp - return help information. -// func (f CatRecovery) WithHelp(v bool) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.Help = &v @@ -262,7 +250,6 @@ func (f CatRecovery) WithHelp(v bool) func(*CatRecoveryRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatRecovery) WithS(v ...string) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.S = v @@ -270,7 +257,6 @@ func (f CatRecovery) WithS(v ...string) func(*CatRecoveryRequest) { } // WithTime - the unit in which to display time values. -// func (f CatRecovery) WithTime(v string) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.Time = v @@ -278,7 +264,6 @@ func (f CatRecovery) WithTime(v string) func(*CatRecoveryRequest) { } // WithV - verbose mode. display column headers. -// func (f CatRecovery) WithV(v bool) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.V = &v @@ -286,7 +271,6 @@ func (f CatRecovery) WithV(v bool) func(*CatRecoveryRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatRecovery) WithPretty() func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.Pretty = true @@ -294,7 +278,6 @@ func (f CatRecovery) WithPretty() func(*CatRecoveryRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatRecovery) WithHuman() func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.Human = true @@ -302,7 +285,6 @@ func (f CatRecovery) WithHuman() func(*CatRecoveryRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatRecovery) WithErrorTrace() func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.ErrorTrace = true @@ -310,7 +292,6 @@ func (f CatRecovery) WithErrorTrace() func(*CatRecoveryRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatRecovery) WithFilterPath(v ...string) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { r.FilterPath = v @@ -318,7 +299,6 @@ func (f CatRecovery) WithFilterPath(v ...string) func(*CatRecoveryRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatRecovery) WithHeader(h map[string]string) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { if r.Header == nil { @@ -331,7 +311,6 @@ func (f CatRecovery) WithHeader(h map[string]string) func(*CatRecoveryRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatRecovery) WithOpaqueID(s string) func(*CatRecoveryRequest) { return func(r *CatRecoveryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.repositories.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.repositories.go index 60c5bdc76cb1..3e5bbeffff81 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.repositories.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.repositories.go @@ -47,12 +47,9 @@ func newCatRepositoriesFunc(t Transport) CatRepositories { // ----- API Definition ------------------------------------------------------- // CatRepositories returns information about snapshot repositories registered in the cluster. -// -// type CatRepositories func(o ...func(*CatRepositoriesRequest)) (*Response, error) // CatRepositoriesRequest configures the Cat Repositories API request. -// type CatRepositoriesRequest struct { Format string H []string @@ -73,7 +70,6 @@ type CatRepositoriesRequest struct { } // Do executes the request and returns response or error. -// func (r CatRepositoriesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -176,7 +172,6 @@ func (r CatRepositoriesRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f CatRepositories) WithContext(v context.Context) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.ctx = v @@ -184,7 +179,6 @@ func (f CatRepositories) WithContext(v context.Context) func(*CatRepositoriesReq } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatRepositories) WithFormat(v string) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.Format = v @@ -192,7 +186,6 @@ func (f CatRepositories) WithFormat(v string) func(*CatRepositoriesRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatRepositories) WithH(v ...string) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.H = v @@ -200,7 +193,6 @@ func (f CatRepositories) WithH(v ...string) func(*CatRepositoriesRequest) { } // WithHelp - return help information. -// func (f CatRepositories) WithHelp(v bool) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.Help = &v @@ -208,7 +200,6 @@ func (f CatRepositories) WithHelp(v bool) func(*CatRepositoriesRequest) { } // WithLocal - return local information, do not retrieve the state from master node. -// func (f CatRepositories) WithLocal(v bool) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.Local = &v @@ -216,7 +207,6 @@ func (f CatRepositories) WithLocal(v bool) func(*CatRepositoriesRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatRepositories) WithMasterTimeout(v time.Duration) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.MasterTimeout = v @@ -224,7 +214,6 @@ func (f CatRepositories) WithMasterTimeout(v time.Duration) func(*CatRepositorie } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatRepositories) WithS(v ...string) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.S = v @@ -232,7 +221,6 @@ func (f CatRepositories) WithS(v ...string) func(*CatRepositoriesRequest) { } // WithV - verbose mode. display column headers. -// func (f CatRepositories) WithV(v bool) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.V = &v @@ -240,7 +228,6 @@ func (f CatRepositories) WithV(v bool) func(*CatRepositoriesRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatRepositories) WithPretty() func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.Pretty = true @@ -248,7 +235,6 @@ func (f CatRepositories) WithPretty() func(*CatRepositoriesRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatRepositories) WithHuman() func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.Human = true @@ -256,7 +242,6 @@ func (f CatRepositories) WithHuman() func(*CatRepositoriesRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatRepositories) WithErrorTrace() func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.ErrorTrace = true @@ -264,7 +249,6 @@ func (f CatRepositories) WithErrorTrace() func(*CatRepositoriesRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatRepositories) WithFilterPath(v ...string) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { r.FilterPath = v @@ -272,7 +256,6 @@ func (f CatRepositories) WithFilterPath(v ...string) func(*CatRepositoriesReques } // WithHeader adds the headers to the HTTP request. -// func (f CatRepositories) WithHeader(h map[string]string) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { if r.Header == nil { @@ -285,7 +268,6 @@ func (f CatRepositories) WithHeader(h map[string]string) func(*CatRepositoriesRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatRepositories) WithOpaqueID(s string) func(*CatRepositoriesRequest) { return func(r *CatRepositoriesRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.segments.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.segments.go index 1ee4ab8eb3f2..34e701dd5b2a 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.segments.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.segments.go @@ -46,12 +46,9 @@ func newCatSegmentsFunc(t Transport) CatSegments { // ----- API Definition ------------------------------------------------------- // CatSegments provides low-level information about the segments in the shards of an index. -// -// type CatSegments func(o ...func(*CatSegmentsRequest)) (*Response, error) // CatSegmentsRequest configures the Cat Segments API request. -// type CatSegmentsRequest struct { Index []string @@ -73,7 +70,6 @@ type CatSegmentsRequest struct { } // Do executes the request and returns response or error. -// func (r CatSegmentsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -179,7 +175,6 @@ func (r CatSegmentsRequest) Do(ctx context.Context, transport Transport) (*Respo } // WithContext sets the request context. -// func (f CatSegments) WithContext(v context.Context) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.ctx = v @@ -187,7 +182,6 @@ func (f CatSegments) WithContext(v context.Context) func(*CatSegmentsRequest) { } // WithIndex - a list of index names to limit the returned information. -// func (f CatSegments) WithIndex(v ...string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.Index = v @@ -195,7 +189,6 @@ func (f CatSegments) WithIndex(v ...string) func(*CatSegmentsRequest) { } // WithBytes - the unit in which to display byte values. -// func (f CatSegments) WithBytes(v string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.Bytes = v @@ -203,7 +196,6 @@ func (f CatSegments) WithBytes(v string) func(*CatSegmentsRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatSegments) WithFormat(v string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.Format = v @@ -211,7 +203,6 @@ func (f CatSegments) WithFormat(v string) func(*CatSegmentsRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatSegments) WithH(v ...string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.H = v @@ -219,7 +210,6 @@ func (f CatSegments) WithH(v ...string) func(*CatSegmentsRequest) { } // WithHelp - return help information. -// func (f CatSegments) WithHelp(v bool) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.Help = &v @@ -227,7 +217,6 @@ func (f CatSegments) WithHelp(v bool) func(*CatSegmentsRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatSegments) WithS(v ...string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.S = v @@ -235,7 +224,6 @@ func (f CatSegments) WithS(v ...string) func(*CatSegmentsRequest) { } // WithV - verbose mode. display column headers. -// func (f CatSegments) WithV(v bool) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.V = &v @@ -243,7 +231,6 @@ func (f CatSegments) WithV(v bool) func(*CatSegmentsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatSegments) WithPretty() func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.Pretty = true @@ -251,7 +238,6 @@ func (f CatSegments) WithPretty() func(*CatSegmentsRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatSegments) WithHuman() func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.Human = true @@ -259,7 +245,6 @@ func (f CatSegments) WithHuman() func(*CatSegmentsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatSegments) WithErrorTrace() func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.ErrorTrace = true @@ -267,7 +252,6 @@ func (f CatSegments) WithErrorTrace() func(*CatSegmentsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatSegments) WithFilterPath(v ...string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { r.FilterPath = v @@ -275,7 +259,6 @@ func (f CatSegments) WithFilterPath(v ...string) func(*CatSegmentsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatSegments) WithHeader(h map[string]string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { if r.Header == nil { @@ -288,7 +271,6 @@ func (f CatSegments) WithHeader(h map[string]string) func(*CatSegmentsRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatSegments) WithOpaqueID(s string) func(*CatSegmentsRequest) { return func(r *CatSegmentsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.shards.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.shards.go index 34b8da47c5b4..25923c20a9ac 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.shards.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.shards.go @@ -47,12 +47,9 @@ func newCatShardsFunc(t Transport) CatShards { // ----- API Definition ------------------------------------------------------- // CatShards provides a detailed view of shard allocation on nodes. -// -// type CatShards func(o ...func(*CatShardsRequest)) (*Response, error) // CatShardsRequest configures the Cat Shards API request. -// type CatShardsRequest struct { Index []string @@ -77,7 +74,6 @@ type CatShardsRequest struct { } // Do executes the request and returns response or error. -// func (r CatShardsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -195,7 +191,6 @@ func (r CatShardsRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f CatShards) WithContext(v context.Context) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.ctx = v @@ -203,7 +198,6 @@ func (f CatShards) WithContext(v context.Context) func(*CatShardsRequest) { } // WithIndex - a list of index names to limit the returned information. -// func (f CatShards) WithIndex(v ...string) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.Index = v @@ -211,7 +205,6 @@ func (f CatShards) WithIndex(v ...string) func(*CatShardsRequest) { } // WithBytes - the unit in which to display byte values. -// func (f CatShards) WithBytes(v string) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.Bytes = v @@ -219,7 +212,6 @@ func (f CatShards) WithBytes(v string) func(*CatShardsRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatShards) WithFormat(v string) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.Format = v @@ -227,7 +219,6 @@ func (f CatShards) WithFormat(v string) func(*CatShardsRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatShards) WithH(v ...string) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.H = v @@ -235,7 +226,6 @@ func (f CatShards) WithH(v ...string) func(*CatShardsRequest) { } // WithHelp - return help information. -// func (f CatShards) WithHelp(v bool) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.Help = &v @@ -243,7 +233,6 @@ func (f CatShards) WithHelp(v bool) func(*CatShardsRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatShards) WithLocal(v bool) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.Local = &v @@ -251,7 +240,6 @@ func (f CatShards) WithLocal(v bool) func(*CatShardsRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatShards) WithMasterTimeout(v time.Duration) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.MasterTimeout = v @@ -259,7 +247,6 @@ func (f CatShards) WithMasterTimeout(v time.Duration) func(*CatShardsRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatShards) WithS(v ...string) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.S = v @@ -267,7 +254,6 @@ func (f CatShards) WithS(v ...string) func(*CatShardsRequest) { } // WithTime - the unit in which to display time values. -// func (f CatShards) WithTime(v string) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.Time = v @@ -275,7 +261,6 @@ func (f CatShards) WithTime(v string) func(*CatShardsRequest) { } // WithV - verbose mode. display column headers. -// func (f CatShards) WithV(v bool) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.V = &v @@ -283,7 +268,6 @@ func (f CatShards) WithV(v bool) func(*CatShardsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatShards) WithPretty() func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.Pretty = true @@ -291,7 +275,6 @@ func (f CatShards) WithPretty() func(*CatShardsRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatShards) WithHuman() func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.Human = true @@ -299,7 +282,6 @@ func (f CatShards) WithHuman() func(*CatShardsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatShards) WithErrorTrace() func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.ErrorTrace = true @@ -307,7 +289,6 @@ func (f CatShards) WithErrorTrace() func(*CatShardsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatShards) WithFilterPath(v ...string) func(*CatShardsRequest) { return func(r *CatShardsRequest) { r.FilterPath = v @@ -315,7 +296,6 @@ func (f CatShards) WithFilterPath(v ...string) func(*CatShardsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatShards) WithHeader(h map[string]string) func(*CatShardsRequest) { return func(r *CatShardsRequest) { if r.Header == nil { @@ -328,7 +308,6 @@ func (f CatShards) WithHeader(h map[string]string) func(*CatShardsRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatShards) WithOpaqueID(s string) func(*CatShardsRequest) { return func(r *CatShardsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.snapshots.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.snapshots.go index f3d8da153495..05665a7f4cd5 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.snapshots.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.snapshots.go @@ -47,12 +47,9 @@ func newCatSnapshotsFunc(t Transport) CatSnapshots { // ----- API Definition ------------------------------------------------------- // CatSnapshots returns all snapshots in a specific repository. -// -// type CatSnapshots func(o ...func(*CatSnapshotsRequest)) (*Response, error) // CatSnapshotsRequest configures the Cat Snapshots API request. -// type CatSnapshotsRequest struct { Repository []string @@ -76,7 +73,6 @@ type CatSnapshotsRequest struct { } // Do executes the request and returns response or error. -// func (r CatSnapshotsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -190,7 +186,6 @@ func (r CatSnapshotsRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f CatSnapshots) WithContext(v context.Context) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.ctx = v @@ -198,7 +193,6 @@ func (f CatSnapshots) WithContext(v context.Context) func(*CatSnapshotsRequest) } // WithRepository - name of repository from which to fetch the snapshot information. -// func (f CatSnapshots) WithRepository(v ...string) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.Repository = v @@ -206,7 +200,6 @@ func (f CatSnapshots) WithRepository(v ...string) func(*CatSnapshotsRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatSnapshots) WithFormat(v string) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.Format = v @@ -214,7 +207,6 @@ func (f CatSnapshots) WithFormat(v string) func(*CatSnapshotsRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatSnapshots) WithH(v ...string) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.H = v @@ -222,7 +214,6 @@ func (f CatSnapshots) WithH(v ...string) func(*CatSnapshotsRequest) { } // WithHelp - return help information. -// func (f CatSnapshots) WithHelp(v bool) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.Help = &v @@ -230,7 +221,6 @@ func (f CatSnapshots) WithHelp(v bool) func(*CatSnapshotsRequest) { } // WithIgnoreUnavailable - set to true to ignore unavailable snapshots. -// func (f CatSnapshots) WithIgnoreUnavailable(v bool) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.IgnoreUnavailable = &v @@ -238,7 +228,6 @@ func (f CatSnapshots) WithIgnoreUnavailable(v bool) func(*CatSnapshotsRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatSnapshots) WithMasterTimeout(v time.Duration) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.MasterTimeout = v @@ -246,7 +235,6 @@ func (f CatSnapshots) WithMasterTimeout(v time.Duration) func(*CatSnapshotsReque } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatSnapshots) WithS(v ...string) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.S = v @@ -254,7 +242,6 @@ func (f CatSnapshots) WithS(v ...string) func(*CatSnapshotsRequest) { } // WithTime - the unit in which to display time values. -// func (f CatSnapshots) WithTime(v string) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.Time = v @@ -262,7 +249,6 @@ func (f CatSnapshots) WithTime(v string) func(*CatSnapshotsRequest) { } // WithV - verbose mode. display column headers. -// func (f CatSnapshots) WithV(v bool) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.V = &v @@ -270,7 +256,6 @@ func (f CatSnapshots) WithV(v bool) func(*CatSnapshotsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatSnapshots) WithPretty() func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.Pretty = true @@ -278,7 +263,6 @@ func (f CatSnapshots) WithPretty() func(*CatSnapshotsRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatSnapshots) WithHuman() func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.Human = true @@ -286,7 +270,6 @@ func (f CatSnapshots) WithHuman() func(*CatSnapshotsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatSnapshots) WithErrorTrace() func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.ErrorTrace = true @@ -294,7 +277,6 @@ func (f CatSnapshots) WithErrorTrace() func(*CatSnapshotsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatSnapshots) WithFilterPath(v ...string) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { r.FilterPath = v @@ -302,7 +284,6 @@ func (f CatSnapshots) WithFilterPath(v ...string) func(*CatSnapshotsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatSnapshots) WithHeader(h map[string]string) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { if r.Header == nil { @@ -315,7 +296,6 @@ func (f CatSnapshots) WithHeader(h map[string]string) func(*CatSnapshotsRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatSnapshots) WithOpaqueID(s string) func(*CatSnapshotsRequest) { return func(r *CatSnapshotsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.tasks.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.tasks.go index 32412b7c8cf1..5c76b420c353 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.tasks.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.tasks.go @@ -46,12 +46,9 @@ func newCatTasksFunc(t Transport) CatTasks { // ----- API Definition ------------------------------------------------------- // CatTasks returns information about the tasks currently executing on one or more nodes in the cluster. -// -// type CatTasks func(o ...func(*CatTasksRequest)) (*Response, error) // CatTasksRequest configures the Cat Tasks API request. -// type CatTasksRequest struct { Actions []string Detailed *bool @@ -75,7 +72,6 @@ type CatTasksRequest struct { } // Do executes the request and returns response or error. -// func (r CatTasksRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -190,7 +186,6 @@ func (r CatTasksRequest) Do(ctx context.Context, transport Transport) (*Response } // WithContext sets the request context. -// func (f CatTasks) WithContext(v context.Context) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.ctx = v @@ -198,7 +193,6 @@ func (f CatTasks) WithContext(v context.Context) func(*CatTasksRequest) { } // WithActions - a list of actions that should be returned. leave empty to return all.. -// func (f CatTasks) WithActions(v ...string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.Actions = v @@ -206,7 +200,6 @@ func (f CatTasks) WithActions(v ...string) func(*CatTasksRequest) { } // WithDetailed - return detailed task information (default: false). -// func (f CatTasks) WithDetailed(v bool) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.Detailed = &v @@ -214,7 +207,6 @@ func (f CatTasks) WithDetailed(v bool) func(*CatTasksRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatTasks) WithFormat(v string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.Format = v @@ -222,7 +214,6 @@ func (f CatTasks) WithFormat(v string) func(*CatTasksRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatTasks) WithH(v ...string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.H = v @@ -230,7 +221,6 @@ func (f CatTasks) WithH(v ...string) func(*CatTasksRequest) { } // WithHelp - return help information. -// func (f CatTasks) WithHelp(v bool) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.Help = &v @@ -238,7 +228,6 @@ func (f CatTasks) WithHelp(v bool) func(*CatTasksRequest) { } // WithNodes - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. -// func (f CatTasks) WithNodes(v ...string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.Nodes = v @@ -246,7 +235,6 @@ func (f CatTasks) WithNodes(v ...string) func(*CatTasksRequest) { } // WithParentTaskID - return tasks with specified parent task ID (node_id:task_number). set to -1 to return all.. -// func (f CatTasks) WithParentTaskID(v string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.ParentTaskID = v @@ -254,7 +242,6 @@ func (f CatTasks) WithParentTaskID(v string) func(*CatTasksRequest) { } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatTasks) WithS(v ...string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.S = v @@ -262,7 +249,6 @@ func (f CatTasks) WithS(v ...string) func(*CatTasksRequest) { } // WithTime - the unit in which to display time values. -// func (f CatTasks) WithTime(v string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.Time = v @@ -270,7 +256,6 @@ func (f CatTasks) WithTime(v string) func(*CatTasksRequest) { } // WithV - verbose mode. display column headers. -// func (f CatTasks) WithV(v bool) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.V = &v @@ -278,7 +263,6 @@ func (f CatTasks) WithV(v bool) func(*CatTasksRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatTasks) WithPretty() func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.Pretty = true @@ -286,7 +270,6 @@ func (f CatTasks) WithPretty() func(*CatTasksRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatTasks) WithHuman() func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.Human = true @@ -294,7 +277,6 @@ func (f CatTasks) WithHuman() func(*CatTasksRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatTasks) WithErrorTrace() func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.ErrorTrace = true @@ -302,7 +284,6 @@ func (f CatTasks) WithErrorTrace() func(*CatTasksRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatTasks) WithFilterPath(v ...string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { r.FilterPath = v @@ -310,7 +291,6 @@ func (f CatTasks) WithFilterPath(v ...string) func(*CatTasksRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatTasks) WithHeader(h map[string]string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { if r.Header == nil { @@ -323,7 +303,6 @@ func (f CatTasks) WithHeader(h map[string]string) func(*CatTasksRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatTasks) WithOpaqueID(s string) func(*CatTasksRequest) { return func(r *CatTasksRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.templates.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.templates.go index 4df7dea66b67..6f1d51f414f3 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.templates.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.templates.go @@ -47,12 +47,9 @@ func newCatTemplatesFunc(t Transport) CatTemplates { // ----- API Definition ------------------------------------------------------- // CatTemplates returns information about existing templates. -// -// type CatTemplates func(o ...func(*CatTemplatesRequest)) (*Response, error) // CatTemplatesRequest configures the Cat Templates API request. -// type CatTemplatesRequest struct { Name string @@ -75,7 +72,6 @@ type CatTemplatesRequest struct { } // Do executes the request and returns response or error. -// func (r CatTemplatesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -185,7 +181,6 @@ func (r CatTemplatesRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f CatTemplates) WithContext(v context.Context) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.ctx = v @@ -193,7 +188,6 @@ func (f CatTemplates) WithContext(v context.Context) func(*CatTemplatesRequest) } // WithName - a pattern that returned template names must match. -// func (f CatTemplates) WithName(v string) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.Name = v @@ -201,7 +195,6 @@ func (f CatTemplates) WithName(v string) func(*CatTemplatesRequest) { } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatTemplates) WithFormat(v string) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.Format = v @@ -209,7 +202,6 @@ func (f CatTemplates) WithFormat(v string) func(*CatTemplatesRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatTemplates) WithH(v ...string) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.H = v @@ -217,7 +209,6 @@ func (f CatTemplates) WithH(v ...string) func(*CatTemplatesRequest) { } // WithHelp - return help information. -// func (f CatTemplates) WithHelp(v bool) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.Help = &v @@ -225,7 +216,6 @@ func (f CatTemplates) WithHelp(v bool) func(*CatTemplatesRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatTemplates) WithLocal(v bool) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.Local = &v @@ -233,7 +223,6 @@ func (f CatTemplates) WithLocal(v bool) func(*CatTemplatesRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatTemplates) WithMasterTimeout(v time.Duration) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.MasterTimeout = v @@ -241,7 +230,6 @@ func (f CatTemplates) WithMasterTimeout(v time.Duration) func(*CatTemplatesReque } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatTemplates) WithS(v ...string) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.S = v @@ -249,7 +237,6 @@ func (f CatTemplates) WithS(v ...string) func(*CatTemplatesRequest) { } // WithV - verbose mode. display column headers. -// func (f CatTemplates) WithV(v bool) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.V = &v @@ -257,7 +244,6 @@ func (f CatTemplates) WithV(v bool) func(*CatTemplatesRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatTemplates) WithPretty() func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.Pretty = true @@ -265,7 +251,6 @@ func (f CatTemplates) WithPretty() func(*CatTemplatesRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatTemplates) WithHuman() func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.Human = true @@ -273,7 +258,6 @@ func (f CatTemplates) WithHuman() func(*CatTemplatesRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatTemplates) WithErrorTrace() func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.ErrorTrace = true @@ -281,7 +265,6 @@ func (f CatTemplates) WithErrorTrace() func(*CatTemplatesRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatTemplates) WithFilterPath(v ...string) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { r.FilterPath = v @@ -289,7 +272,6 @@ func (f CatTemplates) WithFilterPath(v ...string) func(*CatTemplatesRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatTemplates) WithHeader(h map[string]string) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { if r.Header == nil { @@ -302,7 +284,6 @@ func (f CatTemplates) WithHeader(h map[string]string) func(*CatTemplatesRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatTemplates) WithOpaqueID(s string) func(*CatTemplatesRequest) { return func(r *CatTemplatesRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.thread_pool.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.thread_pool.go index 80a90dc5ace0..3d922fed0b97 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.thread_pool.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cat.thread_pool.go @@ -48,12 +48,9 @@ func newCatThreadPoolFunc(t Transport) CatThreadPool { // CatThreadPool returns cluster-wide thread pool statistics per node. // By default the active, queue and rejected statistics are returned for all thread pools. -// -// type CatThreadPool func(o ...func(*CatThreadPoolRequest)) (*Response, error) // CatThreadPoolRequest configures the Cat Thread Pool API request. -// type CatThreadPoolRequest struct { ThreadPoolPatterns []string @@ -77,7 +74,6 @@ type CatThreadPoolRequest struct { } // Do executes the request and returns response or error. -// func (r CatThreadPoolRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -191,7 +187,6 @@ func (r CatThreadPoolRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f CatThreadPool) WithContext(v context.Context) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.ctx = v @@ -199,7 +194,6 @@ func (f CatThreadPool) WithContext(v context.Context) func(*CatThreadPoolRequest } // WithThreadPoolPatterns - a list of regular-expressions to filter the thread pools in the output. -// func (f CatThreadPool) WithThreadPoolPatterns(v ...string) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.ThreadPoolPatterns = v @@ -207,7 +201,6 @@ func (f CatThreadPool) WithThreadPoolPatterns(v ...string) func(*CatThreadPoolRe } // WithFormat - a short version of the accept header, e.g. json, yaml. -// func (f CatThreadPool) WithFormat(v string) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.Format = v @@ -215,7 +208,6 @@ func (f CatThreadPool) WithFormat(v string) func(*CatThreadPoolRequest) { } // WithH - comma-separated list of column names to display. -// func (f CatThreadPool) WithH(v ...string) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.H = v @@ -223,7 +215,6 @@ func (f CatThreadPool) WithH(v ...string) func(*CatThreadPoolRequest) { } // WithHelp - return help information. -// func (f CatThreadPool) WithHelp(v bool) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.Help = &v @@ -231,7 +222,6 @@ func (f CatThreadPool) WithHelp(v bool) func(*CatThreadPoolRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f CatThreadPool) WithLocal(v bool) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.Local = &v @@ -239,7 +229,6 @@ func (f CatThreadPool) WithLocal(v bool) func(*CatThreadPoolRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f CatThreadPool) WithMasterTimeout(v time.Duration) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.MasterTimeout = v @@ -247,7 +236,6 @@ func (f CatThreadPool) WithMasterTimeout(v time.Duration) func(*CatThreadPoolReq } // WithS - comma-separated list of column names or column aliases to sort by. -// func (f CatThreadPool) WithS(v ...string) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.S = v @@ -255,7 +243,6 @@ func (f CatThreadPool) WithS(v ...string) func(*CatThreadPoolRequest) { } // WithSize - the multiplier in which to display values. -// func (f CatThreadPool) WithSize(v string) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.Size = v @@ -263,7 +250,6 @@ func (f CatThreadPool) WithSize(v string) func(*CatThreadPoolRequest) { } // WithV - verbose mode. display column headers. -// func (f CatThreadPool) WithV(v bool) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.V = &v @@ -271,7 +257,6 @@ func (f CatThreadPool) WithV(v bool) func(*CatThreadPoolRequest) { } // WithPretty makes the response body pretty-printed. -// func (f CatThreadPool) WithPretty() func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.Pretty = true @@ -279,7 +264,6 @@ func (f CatThreadPool) WithPretty() func(*CatThreadPoolRequest) { } // WithHuman makes statistical values human-readable. -// func (f CatThreadPool) WithHuman() func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.Human = true @@ -287,7 +271,6 @@ func (f CatThreadPool) WithHuman() func(*CatThreadPoolRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f CatThreadPool) WithErrorTrace() func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.ErrorTrace = true @@ -295,7 +278,6 @@ func (f CatThreadPool) WithErrorTrace() func(*CatThreadPoolRequest) { } // WithFilterPath filters the properties of the response body. -// func (f CatThreadPool) WithFilterPath(v ...string) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { r.FilterPath = v @@ -303,7 +285,6 @@ func (f CatThreadPool) WithFilterPath(v ...string) func(*CatThreadPoolRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f CatThreadPool) WithHeader(h map[string]string) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { if r.Header == nil { @@ -316,7 +297,6 @@ func (f CatThreadPool) WithHeader(h map[string]string) func(*CatThreadPoolReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f CatThreadPool) WithOpaqueID(s string) func(*CatThreadPoolRequest) { return func(r *CatThreadPoolRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.clear_scroll.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.clear_scroll.go index c205171e4f18..1daa1e7790e9 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.clear_scroll.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.clear_scroll.go @@ -46,12 +46,9 @@ func newClearScrollFunc(t Transport) ClearScroll { // ----- API Definition ------------------------------------------------------- // ClearScroll explicitly clears the search context for a scroll. -// -// type ClearScroll func(o ...func(*ClearScrollRequest)) (*Response, error) // ClearScrollRequest configures the Clear Scroll API request. -// type ClearScrollRequest struct { Body io.Reader @@ -68,7 +65,6 @@ type ClearScrollRequest struct { } // Do executes the request and returns response or error. -// func (r ClearScrollRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -154,7 +150,6 @@ func (r ClearScrollRequest) Do(ctx context.Context, transport Transport) (*Respo } // WithContext sets the request context. -// func (f ClearScroll) WithContext(v context.Context) func(*ClearScrollRequest) { return func(r *ClearScrollRequest) { r.ctx = v @@ -162,7 +157,6 @@ func (f ClearScroll) WithContext(v context.Context) func(*ClearScrollRequest) { } // WithBody - A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter. -// func (f ClearScroll) WithBody(v io.Reader) func(*ClearScrollRequest) { return func(r *ClearScrollRequest) { r.Body = v @@ -170,7 +164,6 @@ func (f ClearScroll) WithBody(v io.Reader) func(*ClearScrollRequest) { } // WithScrollID - a list of scroll ids to clear. -// func (f ClearScroll) WithScrollID(v ...string) func(*ClearScrollRequest) { return func(r *ClearScrollRequest) { r.ScrollID = v @@ -178,7 +171,6 @@ func (f ClearScroll) WithScrollID(v ...string) func(*ClearScrollRequest) { } // WithPretty makes the response body pretty-printed. -// func (f ClearScroll) WithPretty() func(*ClearScrollRequest) { return func(r *ClearScrollRequest) { r.Pretty = true @@ -186,7 +178,6 @@ func (f ClearScroll) WithPretty() func(*ClearScrollRequest) { } // WithHuman makes statistical values human-readable. -// func (f ClearScroll) WithHuman() func(*ClearScrollRequest) { return func(r *ClearScrollRequest) { r.Human = true @@ -194,7 +185,6 @@ func (f ClearScroll) WithHuman() func(*ClearScrollRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClearScroll) WithErrorTrace() func(*ClearScrollRequest) { return func(r *ClearScrollRequest) { r.ErrorTrace = true @@ -202,7 +192,6 @@ func (f ClearScroll) WithErrorTrace() func(*ClearScrollRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ClearScroll) WithFilterPath(v ...string) func(*ClearScrollRequest) { return func(r *ClearScrollRequest) { r.FilterPath = v @@ -210,7 +199,6 @@ func (f ClearScroll) WithFilterPath(v ...string) func(*ClearScrollRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f ClearScroll) WithHeader(h map[string]string) func(*ClearScrollRequest) { return func(r *ClearScrollRequest) { if r.Header == nil { @@ -223,7 +211,6 @@ func (f ClearScroll) WithHeader(h map[string]string) func(*ClearScrollRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClearScroll) WithOpaqueID(s string) func(*ClearScrollRequest) { return func(r *ClearScrollRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.allocation_explain.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.allocation_explain.go index 7da7ce72a9c5..f1423c7d0665 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.allocation_explain.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.allocation_explain.go @@ -47,12 +47,9 @@ func newClusterAllocationExplainFunc(t Transport) ClusterAllocationExplain { // ----- API Definition ------------------------------------------------------- // ClusterAllocationExplain provides explanations for shard allocations in the cluster. -// -// type ClusterAllocationExplain func(o ...func(*ClusterAllocationExplainRequest)) (*Response, error) // ClusterAllocationExplainRequest configures the Cluster Allocation Explain API request. -// type ClusterAllocationExplainRequest struct { Body io.Reader @@ -70,7 +67,6 @@ type ClusterAllocationExplainRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterAllocationExplainRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -157,7 +153,6 @@ func (r ClusterAllocationExplainRequest) Do(ctx context.Context, transport Trans } // WithContext sets the request context. -// func (f ClusterAllocationExplain) WithContext(v context.Context) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { r.ctx = v @@ -165,7 +160,6 @@ func (f ClusterAllocationExplain) WithContext(v context.Context) func(*ClusterAl } // WithBody - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'. -// func (f ClusterAllocationExplain) WithBody(v io.Reader) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { r.Body = v @@ -173,7 +167,6 @@ func (f ClusterAllocationExplain) WithBody(v io.Reader) func(*ClusterAllocationE } // WithIncludeDiskInfo - return information about disk usage and shard sizes (default: false). -// func (f ClusterAllocationExplain) WithIncludeDiskInfo(v bool) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { r.IncludeDiskInfo = &v @@ -181,7 +174,6 @@ func (f ClusterAllocationExplain) WithIncludeDiskInfo(v bool) func(*ClusterAlloc } // WithIncludeYesDecisions - return 'yes' decisions in explanation (default: false). -// func (f ClusterAllocationExplain) WithIncludeYesDecisions(v bool) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { r.IncludeYesDecisions = &v @@ -189,7 +181,6 @@ func (f ClusterAllocationExplain) WithIncludeYesDecisions(v bool) func(*ClusterA } // WithPretty makes the response body pretty-printed. -// func (f ClusterAllocationExplain) WithPretty() func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { r.Pretty = true @@ -197,7 +188,6 @@ func (f ClusterAllocationExplain) WithPretty() func(*ClusterAllocationExplainReq } // WithHuman makes statistical values human-readable. -// func (f ClusterAllocationExplain) WithHuman() func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { r.Human = true @@ -205,7 +195,6 @@ func (f ClusterAllocationExplain) WithHuman() func(*ClusterAllocationExplainRequ } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterAllocationExplain) WithErrorTrace() func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { r.ErrorTrace = true @@ -213,7 +202,6 @@ func (f ClusterAllocationExplain) WithErrorTrace() func(*ClusterAllocationExplai } // WithFilterPath filters the properties of the response body. -// func (f ClusterAllocationExplain) WithFilterPath(v ...string) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { r.FilterPath = v @@ -221,7 +209,6 @@ func (f ClusterAllocationExplain) WithFilterPath(v ...string) func(*ClusterAlloc } // WithHeader adds the headers to the HTTP request. -// func (f ClusterAllocationExplain) WithHeader(h map[string]string) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { if r.Header == nil { @@ -234,7 +221,6 @@ func (f ClusterAllocationExplain) WithHeader(h map[string]string) func(*ClusterA } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterAllocationExplain) WithOpaqueID(s string) func(*ClusterAllocationExplainRequest) { return func(r *ClusterAllocationExplainRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.delete_component_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.delete_component_template.go index c6b9ddf6a55d..eec96679dd8f 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.delete_component_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.delete_component_template.go @@ -46,12 +46,9 @@ func newClusterDeleteComponentTemplateFunc(t Transport) ClusterDeleteComponentTe // ----- API Definition ------------------------------------------------------- // ClusterDeleteComponentTemplate deletes a component template -// -// type ClusterDeleteComponentTemplate func(name string, o ...func(*ClusterDeleteComponentTemplateRequest)) (*Response, error) // ClusterDeleteComponentTemplateRequest configures the Cluster Delete Component Template API request. -// type ClusterDeleteComponentTemplateRequest struct { Name string @@ -69,7 +66,6 @@ type ClusterDeleteComponentTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterDeleteComponentTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -155,7 +151,6 @@ func (r ClusterDeleteComponentTemplateRequest) Do(ctx context.Context, transport } // WithContext sets the request context. -// func (f ClusterDeleteComponentTemplate) WithContext(v context.Context) func(*ClusterDeleteComponentTemplateRequest) { return func(r *ClusterDeleteComponentTemplateRequest) { r.ctx = v @@ -163,7 +158,6 @@ func (f ClusterDeleteComponentTemplate) WithContext(v context.Context) func(*Clu } // WithMasterTimeout - specify timeout for connection to master. -// func (f ClusterDeleteComponentTemplate) WithMasterTimeout(v time.Duration) func(*ClusterDeleteComponentTemplateRequest) { return func(r *ClusterDeleteComponentTemplateRequest) { r.MasterTimeout = v @@ -171,7 +165,6 @@ func (f ClusterDeleteComponentTemplate) WithMasterTimeout(v time.Duration) func( } // WithTimeout - explicit operation timeout. -// func (f ClusterDeleteComponentTemplate) WithTimeout(v time.Duration) func(*ClusterDeleteComponentTemplateRequest) { return func(r *ClusterDeleteComponentTemplateRequest) { r.Timeout = v @@ -179,7 +172,6 @@ func (f ClusterDeleteComponentTemplate) WithTimeout(v time.Duration) func(*Clust } // WithPretty makes the response body pretty-printed. -// func (f ClusterDeleteComponentTemplate) WithPretty() func(*ClusterDeleteComponentTemplateRequest) { return func(r *ClusterDeleteComponentTemplateRequest) { r.Pretty = true @@ -187,7 +179,6 @@ func (f ClusterDeleteComponentTemplate) WithPretty() func(*ClusterDeleteComponen } // WithHuman makes statistical values human-readable. -// func (f ClusterDeleteComponentTemplate) WithHuman() func(*ClusterDeleteComponentTemplateRequest) { return func(r *ClusterDeleteComponentTemplateRequest) { r.Human = true @@ -195,7 +186,6 @@ func (f ClusterDeleteComponentTemplate) WithHuman() func(*ClusterDeleteComponent } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterDeleteComponentTemplate) WithErrorTrace() func(*ClusterDeleteComponentTemplateRequest) { return func(r *ClusterDeleteComponentTemplateRequest) { r.ErrorTrace = true @@ -203,7 +193,6 @@ func (f ClusterDeleteComponentTemplate) WithErrorTrace() func(*ClusterDeleteComp } // WithFilterPath filters the properties of the response body. -// func (f ClusterDeleteComponentTemplate) WithFilterPath(v ...string) func(*ClusterDeleteComponentTemplateRequest) { return func(r *ClusterDeleteComponentTemplateRequest) { r.FilterPath = v @@ -211,7 +200,6 @@ func (f ClusterDeleteComponentTemplate) WithFilterPath(v ...string) func(*Cluste } // WithHeader adds the headers to the HTTP request. -// func (f ClusterDeleteComponentTemplate) WithHeader(h map[string]string) func(*ClusterDeleteComponentTemplateRequest) { return func(r *ClusterDeleteComponentTemplateRequest) { if r.Header == nil { @@ -224,7 +212,6 @@ func (f ClusterDeleteComponentTemplate) WithHeader(h map[string]string) func(*Cl } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterDeleteComponentTemplate) WithOpaqueID(s string) func(*ClusterDeleteComponentTemplateRequest) { return func(r *ClusterDeleteComponentTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.delete_voting_config_exclusions.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.delete_voting_config_exclusions.go index 046b08058b0d..a8fc789d202a 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.delete_voting_config_exclusions.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.delete_voting_config_exclusions.go @@ -46,12 +46,9 @@ func newClusterDeleteVotingConfigExclusionsFunc(t Transport) ClusterDeleteVoting // ----- API Definition ------------------------------------------------------- // ClusterDeleteVotingConfigExclusions clears cluster voting config exclusions. -// -// type ClusterDeleteVotingConfigExclusions func(o ...func(*ClusterDeleteVotingConfigExclusionsRequest)) (*Response, error) // ClusterDeleteVotingConfigExclusionsRequest configures the Cluster Delete Voting Config Exclusions API request. -// type ClusterDeleteVotingConfigExclusionsRequest struct { WaitForRemoval *bool @@ -66,7 +63,6 @@ type ClusterDeleteVotingConfigExclusionsRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterDeleteVotingConfigExclusionsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -145,7 +141,6 @@ func (r ClusterDeleteVotingConfigExclusionsRequest) Do(ctx context.Context, tran } // WithContext sets the request context. -// func (f ClusterDeleteVotingConfigExclusions) WithContext(v context.Context) func(*ClusterDeleteVotingConfigExclusionsRequest) { return func(r *ClusterDeleteVotingConfigExclusionsRequest) { r.ctx = v @@ -153,7 +148,6 @@ func (f ClusterDeleteVotingConfigExclusions) WithContext(v context.Context) func } // WithWaitForRemoval - specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.. -// func (f ClusterDeleteVotingConfigExclusions) WithWaitForRemoval(v bool) func(*ClusterDeleteVotingConfigExclusionsRequest) { return func(r *ClusterDeleteVotingConfigExclusionsRequest) { r.WaitForRemoval = &v @@ -161,7 +155,6 @@ func (f ClusterDeleteVotingConfigExclusions) WithWaitForRemoval(v bool) func(*Cl } // WithPretty makes the response body pretty-printed. -// func (f ClusterDeleteVotingConfigExclusions) WithPretty() func(*ClusterDeleteVotingConfigExclusionsRequest) { return func(r *ClusterDeleteVotingConfigExclusionsRequest) { r.Pretty = true @@ -169,7 +162,6 @@ func (f ClusterDeleteVotingConfigExclusions) WithPretty() func(*ClusterDeleteVot } // WithHuman makes statistical values human-readable. -// func (f ClusterDeleteVotingConfigExclusions) WithHuman() func(*ClusterDeleteVotingConfigExclusionsRequest) { return func(r *ClusterDeleteVotingConfigExclusionsRequest) { r.Human = true @@ -177,7 +169,6 @@ func (f ClusterDeleteVotingConfigExclusions) WithHuman() func(*ClusterDeleteVoti } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterDeleteVotingConfigExclusions) WithErrorTrace() func(*ClusterDeleteVotingConfigExclusionsRequest) { return func(r *ClusterDeleteVotingConfigExclusionsRequest) { r.ErrorTrace = true @@ -185,7 +176,6 @@ func (f ClusterDeleteVotingConfigExclusions) WithErrorTrace() func(*ClusterDelet } // WithFilterPath filters the properties of the response body. -// func (f ClusterDeleteVotingConfigExclusions) WithFilterPath(v ...string) func(*ClusterDeleteVotingConfigExclusionsRequest) { return func(r *ClusterDeleteVotingConfigExclusionsRequest) { r.FilterPath = v @@ -193,7 +183,6 @@ func (f ClusterDeleteVotingConfigExclusions) WithFilterPath(v ...string) func(*C } // WithHeader adds the headers to the HTTP request. -// func (f ClusterDeleteVotingConfigExclusions) WithHeader(h map[string]string) func(*ClusterDeleteVotingConfigExclusionsRequest) { return func(r *ClusterDeleteVotingConfigExclusionsRequest) { if r.Header == nil { @@ -206,7 +195,6 @@ func (f ClusterDeleteVotingConfigExclusions) WithHeader(h map[string]string) fun } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterDeleteVotingConfigExclusions) WithOpaqueID(s string) func(*ClusterDeleteVotingConfigExclusionsRequest) { return func(r *ClusterDeleteVotingConfigExclusionsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.exists_component_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.exists_component_template.go index def02c64b0c1..34d877c52ce0 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.exists_component_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.exists_component_template.go @@ -47,12 +47,9 @@ func newClusterExistsComponentTemplateFunc(t Transport) ClusterExistsComponentTe // ----- API Definition ------------------------------------------------------- // ClusterExistsComponentTemplate returns information about whether a particular component template exist -// -// type ClusterExistsComponentTemplate func(name string, o ...func(*ClusterExistsComponentTemplateRequest)) (*Response, error) // ClusterExistsComponentTemplateRequest configures the Cluster Exists Component Template API request. -// type ClusterExistsComponentTemplateRequest struct { Name string @@ -70,7 +67,6 @@ type ClusterExistsComponentTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterExistsComponentTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -156,7 +152,6 @@ func (r ClusterExistsComponentTemplateRequest) Do(ctx context.Context, transport } // WithContext sets the request context. -// func (f ClusterExistsComponentTemplate) WithContext(v context.Context) func(*ClusterExistsComponentTemplateRequest) { return func(r *ClusterExistsComponentTemplateRequest) { r.ctx = v @@ -164,7 +159,6 @@ func (f ClusterExistsComponentTemplate) WithContext(v context.Context) func(*Clu } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f ClusterExistsComponentTemplate) WithLocal(v bool) func(*ClusterExistsComponentTemplateRequest) { return func(r *ClusterExistsComponentTemplateRequest) { r.Local = &v @@ -172,7 +166,6 @@ func (f ClusterExistsComponentTemplate) WithLocal(v bool) func(*ClusterExistsCom } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f ClusterExistsComponentTemplate) WithMasterTimeout(v time.Duration) func(*ClusterExistsComponentTemplateRequest) { return func(r *ClusterExistsComponentTemplateRequest) { r.MasterTimeout = v @@ -180,7 +173,6 @@ func (f ClusterExistsComponentTemplate) WithMasterTimeout(v time.Duration) func( } // WithPretty makes the response body pretty-printed. -// func (f ClusterExistsComponentTemplate) WithPretty() func(*ClusterExistsComponentTemplateRequest) { return func(r *ClusterExistsComponentTemplateRequest) { r.Pretty = true @@ -188,7 +180,6 @@ func (f ClusterExistsComponentTemplate) WithPretty() func(*ClusterExistsComponen } // WithHuman makes statistical values human-readable. -// func (f ClusterExistsComponentTemplate) WithHuman() func(*ClusterExistsComponentTemplateRequest) { return func(r *ClusterExistsComponentTemplateRequest) { r.Human = true @@ -196,7 +187,6 @@ func (f ClusterExistsComponentTemplate) WithHuman() func(*ClusterExistsComponent } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterExistsComponentTemplate) WithErrorTrace() func(*ClusterExistsComponentTemplateRequest) { return func(r *ClusterExistsComponentTemplateRequest) { r.ErrorTrace = true @@ -204,7 +194,6 @@ func (f ClusterExistsComponentTemplate) WithErrorTrace() func(*ClusterExistsComp } // WithFilterPath filters the properties of the response body. -// func (f ClusterExistsComponentTemplate) WithFilterPath(v ...string) func(*ClusterExistsComponentTemplateRequest) { return func(r *ClusterExistsComponentTemplateRequest) { r.FilterPath = v @@ -212,7 +201,6 @@ func (f ClusterExistsComponentTemplate) WithFilterPath(v ...string) func(*Cluste } // WithHeader adds the headers to the HTTP request. -// func (f ClusterExistsComponentTemplate) WithHeader(h map[string]string) func(*ClusterExistsComponentTemplateRequest) { return func(r *ClusterExistsComponentTemplateRequest) { if r.Header == nil { @@ -225,7 +213,6 @@ func (f ClusterExistsComponentTemplate) WithHeader(h map[string]string) func(*Cl } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterExistsComponentTemplate) WithOpaqueID(s string) func(*ClusterExistsComponentTemplateRequest) { return func(r *ClusterExistsComponentTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.get_component_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.get_component_template.go index 72a5fdbb8f9e..d4faf0a0a34b 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.get_component_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.get_component_template.go @@ -47,12 +47,9 @@ func newClusterGetComponentTemplateFunc(t Transport) ClusterGetComponentTemplate // ----- API Definition ------------------------------------------------------- // ClusterGetComponentTemplate returns one or more component templates -// -// type ClusterGetComponentTemplate func(o ...func(*ClusterGetComponentTemplateRequest)) (*Response, error) // ClusterGetComponentTemplateRequest configures the Cluster Get Component Template API request. -// type ClusterGetComponentTemplateRequest struct { Name []string @@ -70,7 +67,6 @@ type ClusterGetComponentTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterGetComponentTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -158,7 +154,6 @@ func (r ClusterGetComponentTemplateRequest) Do(ctx context.Context, transport Tr } // WithContext sets the request context. -// func (f ClusterGetComponentTemplate) WithContext(v context.Context) func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { r.ctx = v @@ -166,7 +161,6 @@ func (f ClusterGetComponentTemplate) WithContext(v context.Context) func(*Cluste } // WithName - the comma separated names of the component templates. -// func (f ClusterGetComponentTemplate) WithName(v ...string) func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { r.Name = v @@ -174,7 +168,6 @@ func (f ClusterGetComponentTemplate) WithName(v ...string) func(*ClusterGetCompo } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f ClusterGetComponentTemplate) WithLocal(v bool) func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { r.Local = &v @@ -182,7 +175,6 @@ func (f ClusterGetComponentTemplate) WithLocal(v bool) func(*ClusterGetComponent } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f ClusterGetComponentTemplate) WithMasterTimeout(v time.Duration) func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { r.MasterTimeout = v @@ -190,7 +182,6 @@ func (f ClusterGetComponentTemplate) WithMasterTimeout(v time.Duration) func(*Cl } // WithPretty makes the response body pretty-printed. -// func (f ClusterGetComponentTemplate) WithPretty() func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { r.Pretty = true @@ -198,7 +189,6 @@ func (f ClusterGetComponentTemplate) WithPretty() func(*ClusterGetComponentTempl } // WithHuman makes statistical values human-readable. -// func (f ClusterGetComponentTemplate) WithHuman() func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { r.Human = true @@ -206,7 +196,6 @@ func (f ClusterGetComponentTemplate) WithHuman() func(*ClusterGetComponentTempla } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterGetComponentTemplate) WithErrorTrace() func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { r.ErrorTrace = true @@ -214,7 +203,6 @@ func (f ClusterGetComponentTemplate) WithErrorTrace() func(*ClusterGetComponentT } // WithFilterPath filters the properties of the response body. -// func (f ClusterGetComponentTemplate) WithFilterPath(v ...string) func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { r.FilterPath = v @@ -222,7 +210,6 @@ func (f ClusterGetComponentTemplate) WithFilterPath(v ...string) func(*ClusterGe } // WithHeader adds the headers to the HTTP request. -// func (f ClusterGetComponentTemplate) WithHeader(h map[string]string) func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { if r.Header == nil { @@ -235,7 +222,6 @@ func (f ClusterGetComponentTemplate) WithHeader(h map[string]string) func(*Clust } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterGetComponentTemplate) WithOpaqueID(s string) func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.get_settings.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.get_settings.go index 20709a9124a7..18b3eaba3e84 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.get_settings.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.get_settings.go @@ -47,12 +47,9 @@ func newClusterGetSettingsFunc(t Transport) ClusterGetSettings { // ----- API Definition ------------------------------------------------------- // ClusterGetSettings returns cluster settings. -// -// type ClusterGetSettings func(o ...func(*ClusterGetSettingsRequest)) (*Response, error) // ClusterGetSettingsRequest configures the Cluster Get Settings API request. -// type ClusterGetSettingsRequest struct { FlatSettings *bool IncludeDefaults *bool @@ -70,7 +67,6 @@ type ClusterGetSettingsRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterGetSettingsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -161,7 +157,6 @@ func (r ClusterGetSettingsRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f ClusterGetSettings) WithContext(v context.Context) func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { r.ctx = v @@ -169,7 +164,6 @@ func (f ClusterGetSettings) WithContext(v context.Context) func(*ClusterGetSetti } // WithFlatSettings - return settings in flat format (default: false). -// func (f ClusterGetSettings) WithFlatSettings(v bool) func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { r.FlatSettings = &v @@ -177,7 +171,6 @@ func (f ClusterGetSettings) WithFlatSettings(v bool) func(*ClusterGetSettingsReq } // WithIncludeDefaults - whether to return all default clusters setting.. -// func (f ClusterGetSettings) WithIncludeDefaults(v bool) func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { r.IncludeDefaults = &v @@ -185,7 +178,6 @@ func (f ClusterGetSettings) WithIncludeDefaults(v bool) func(*ClusterGetSettings } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f ClusterGetSettings) WithMasterTimeout(v time.Duration) func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { r.MasterTimeout = v @@ -193,7 +185,6 @@ func (f ClusterGetSettings) WithMasterTimeout(v time.Duration) func(*ClusterGetS } // WithTimeout - explicit operation timeout. -// func (f ClusterGetSettings) WithTimeout(v time.Duration) func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { r.Timeout = v @@ -201,7 +192,6 @@ func (f ClusterGetSettings) WithTimeout(v time.Duration) func(*ClusterGetSetting } // WithPretty makes the response body pretty-printed. -// func (f ClusterGetSettings) WithPretty() func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { r.Pretty = true @@ -209,7 +199,6 @@ func (f ClusterGetSettings) WithPretty() func(*ClusterGetSettingsRequest) { } // WithHuman makes statistical values human-readable. -// func (f ClusterGetSettings) WithHuman() func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { r.Human = true @@ -217,7 +206,6 @@ func (f ClusterGetSettings) WithHuman() func(*ClusterGetSettingsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterGetSettings) WithErrorTrace() func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { r.ErrorTrace = true @@ -225,7 +213,6 @@ func (f ClusterGetSettings) WithErrorTrace() func(*ClusterGetSettingsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ClusterGetSettings) WithFilterPath(v ...string) func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { r.FilterPath = v @@ -233,7 +220,6 @@ func (f ClusterGetSettings) WithFilterPath(v ...string) func(*ClusterGetSettings } // WithHeader adds the headers to the HTTP request. -// func (f ClusterGetSettings) WithHeader(h map[string]string) func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { if r.Header == nil { @@ -246,7 +232,6 @@ func (f ClusterGetSettings) WithHeader(h map[string]string) func(*ClusterGetSett } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterGetSettings) WithOpaqueID(s string) func(*ClusterGetSettingsRequest) { return func(r *ClusterGetSettingsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.health.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.health.go index 630b5b467894..5525813152a1 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.health.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.health.go @@ -47,12 +47,9 @@ func newClusterHealthFunc(t Transport) ClusterHealth { // ----- API Definition ------------------------------------------------------- // ClusterHealth returns basic information about the health of the cluster. -// -// type ClusterHealth func(o ...func(*ClusterHealthRequest)) (*Response, error) // ClusterHealthRequest configures the Cluster Health API request. -// type ClusterHealthRequest struct { Index []string @@ -79,7 +76,6 @@ type ClusterHealthRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterHealthRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -205,7 +201,6 @@ func (r ClusterHealthRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f ClusterHealth) WithContext(v context.Context) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.ctx = v @@ -213,7 +208,6 @@ func (f ClusterHealth) WithContext(v context.Context) func(*ClusterHealthRequest } // WithIndex - limit the information returned to a specific index. -// func (f ClusterHealth) WithIndex(v ...string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.Index = v @@ -221,7 +215,6 @@ func (f ClusterHealth) WithIndex(v ...string) func(*ClusterHealthRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f ClusterHealth) WithExpandWildcards(v string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.ExpandWildcards = v @@ -229,7 +222,6 @@ func (f ClusterHealth) WithExpandWildcards(v string) func(*ClusterHealthRequest) } // WithLevel - specify the level of detail for returned information. -// func (f ClusterHealth) WithLevel(v string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.Level = v @@ -237,7 +229,6 @@ func (f ClusterHealth) WithLevel(v string) func(*ClusterHealthRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f ClusterHealth) WithLocal(v bool) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.Local = &v @@ -245,7 +236,6 @@ func (f ClusterHealth) WithLocal(v bool) func(*ClusterHealthRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f ClusterHealth) WithMasterTimeout(v time.Duration) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.MasterTimeout = v @@ -253,7 +243,6 @@ func (f ClusterHealth) WithMasterTimeout(v time.Duration) func(*ClusterHealthReq } // WithTimeout - explicit operation timeout. -// func (f ClusterHealth) WithTimeout(v time.Duration) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.Timeout = v @@ -261,7 +250,6 @@ func (f ClusterHealth) WithTimeout(v time.Duration) func(*ClusterHealthRequest) } // WithWaitForActiveShards - wait until the specified number of shards is active. -// func (f ClusterHealth) WithWaitForActiveShards(v string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.WaitForActiveShards = v @@ -269,7 +257,6 @@ func (f ClusterHealth) WithWaitForActiveShards(v string) func(*ClusterHealthRequ } // WithWaitForEvents - wait until all currently queued events with the given priority are processed. -// func (f ClusterHealth) WithWaitForEvents(v string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.WaitForEvents = v @@ -277,7 +264,6 @@ func (f ClusterHealth) WithWaitForEvents(v string) func(*ClusterHealthRequest) { } // WithWaitForNoInitializingShards - whether to wait until there are no initializing shards in the cluster. -// func (f ClusterHealth) WithWaitForNoInitializingShards(v bool) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.WaitForNoInitializingShards = &v @@ -285,7 +271,6 @@ func (f ClusterHealth) WithWaitForNoInitializingShards(v bool) func(*ClusterHeal } // WithWaitForNoRelocatingShards - whether to wait until there are no relocating shards in the cluster. -// func (f ClusterHealth) WithWaitForNoRelocatingShards(v bool) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.WaitForNoRelocatingShards = &v @@ -293,7 +278,6 @@ func (f ClusterHealth) WithWaitForNoRelocatingShards(v bool) func(*ClusterHealth } // WithWaitForNodes - wait until the specified number of nodes is available. -// func (f ClusterHealth) WithWaitForNodes(v string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.WaitForNodes = v @@ -301,7 +285,6 @@ func (f ClusterHealth) WithWaitForNodes(v string) func(*ClusterHealthRequest) { } // WithWaitForStatus - wait until cluster is in a specific state. -// func (f ClusterHealth) WithWaitForStatus(v string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.WaitForStatus = v @@ -309,7 +292,6 @@ func (f ClusterHealth) WithWaitForStatus(v string) func(*ClusterHealthRequest) { } // WithPretty makes the response body pretty-printed. -// func (f ClusterHealth) WithPretty() func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.Pretty = true @@ -317,7 +299,6 @@ func (f ClusterHealth) WithPretty() func(*ClusterHealthRequest) { } // WithHuman makes statistical values human-readable. -// func (f ClusterHealth) WithHuman() func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.Human = true @@ -325,7 +306,6 @@ func (f ClusterHealth) WithHuman() func(*ClusterHealthRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterHealth) WithErrorTrace() func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.ErrorTrace = true @@ -333,7 +313,6 @@ func (f ClusterHealth) WithErrorTrace() func(*ClusterHealthRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ClusterHealth) WithFilterPath(v ...string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { r.FilterPath = v @@ -341,7 +320,6 @@ func (f ClusterHealth) WithFilterPath(v ...string) func(*ClusterHealthRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f ClusterHealth) WithHeader(h map[string]string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { if r.Header == nil { @@ -354,7 +332,6 @@ func (f ClusterHealth) WithHeader(h map[string]string) func(*ClusterHealthReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterHealth) WithOpaqueID(s string) func(*ClusterHealthRequest) { return func(r *ClusterHealthRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.pending_tasks.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.pending_tasks.go index 15e64449cf76..adaa8e696b1f 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.pending_tasks.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.pending_tasks.go @@ -48,12 +48,9 @@ func newClusterPendingTasksFunc(t Transport) ClusterPendingTasks { // ClusterPendingTasks returns a list of any cluster-level changes (e.g. create index, update mapping, // allocate or fail shard) which have not yet been executed. -// -// type ClusterPendingTasks func(o ...func(*ClusterPendingTasksRequest)) (*Response, error) // ClusterPendingTasksRequest configures the Cluster Pending Tasks API request. -// type ClusterPendingTasksRequest struct { Local *bool MasterTimeout time.Duration @@ -69,7 +66,6 @@ type ClusterPendingTasksRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterPendingTasksRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -152,7 +148,6 @@ func (r ClusterPendingTasksRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f ClusterPendingTasks) WithContext(v context.Context) func(*ClusterPendingTasksRequest) { return func(r *ClusterPendingTasksRequest) { r.ctx = v @@ -160,7 +155,6 @@ func (f ClusterPendingTasks) WithContext(v context.Context) func(*ClusterPending } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f ClusterPendingTasks) WithLocal(v bool) func(*ClusterPendingTasksRequest) { return func(r *ClusterPendingTasksRequest) { r.Local = &v @@ -168,7 +162,6 @@ func (f ClusterPendingTasks) WithLocal(v bool) func(*ClusterPendingTasksRequest) } // WithMasterTimeout - specify timeout for connection to master. -// func (f ClusterPendingTasks) WithMasterTimeout(v time.Duration) func(*ClusterPendingTasksRequest) { return func(r *ClusterPendingTasksRequest) { r.MasterTimeout = v @@ -176,7 +169,6 @@ func (f ClusterPendingTasks) WithMasterTimeout(v time.Duration) func(*ClusterPen } // WithPretty makes the response body pretty-printed. -// func (f ClusterPendingTasks) WithPretty() func(*ClusterPendingTasksRequest) { return func(r *ClusterPendingTasksRequest) { r.Pretty = true @@ -184,7 +176,6 @@ func (f ClusterPendingTasks) WithPretty() func(*ClusterPendingTasksRequest) { } // WithHuman makes statistical values human-readable. -// func (f ClusterPendingTasks) WithHuman() func(*ClusterPendingTasksRequest) { return func(r *ClusterPendingTasksRequest) { r.Human = true @@ -192,7 +183,6 @@ func (f ClusterPendingTasks) WithHuman() func(*ClusterPendingTasksRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterPendingTasks) WithErrorTrace() func(*ClusterPendingTasksRequest) { return func(r *ClusterPendingTasksRequest) { r.ErrorTrace = true @@ -200,7 +190,6 @@ func (f ClusterPendingTasks) WithErrorTrace() func(*ClusterPendingTasksRequest) } // WithFilterPath filters the properties of the response body. -// func (f ClusterPendingTasks) WithFilterPath(v ...string) func(*ClusterPendingTasksRequest) { return func(r *ClusterPendingTasksRequest) { r.FilterPath = v @@ -208,7 +197,6 @@ func (f ClusterPendingTasks) WithFilterPath(v ...string) func(*ClusterPendingTas } // WithHeader adds the headers to the HTTP request. -// func (f ClusterPendingTasks) WithHeader(h map[string]string) func(*ClusterPendingTasksRequest) { return func(r *ClusterPendingTasksRequest) { if r.Header == nil { @@ -221,7 +209,6 @@ func (f ClusterPendingTasks) WithHeader(h map[string]string) func(*ClusterPendin } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterPendingTasks) WithOpaqueID(s string) func(*ClusterPendingTasksRequest) { return func(r *ClusterPendingTasksRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.post_voting_config_exclusions.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.post_voting_config_exclusions.go index 63692fcc5681..2b6aa4221b36 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.post_voting_config_exclusions.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.post_voting_config_exclusions.go @@ -46,12 +46,9 @@ func newClusterPostVotingConfigExclusionsFunc(t Transport) ClusterPostVotingConf // ----- API Definition ------------------------------------------------------- // ClusterPostVotingConfigExclusions updates the cluster voting config exclusions by node ids or node names. -// -// type ClusterPostVotingConfigExclusions func(o ...func(*ClusterPostVotingConfigExclusionsRequest)) (*Response, error) // ClusterPostVotingConfigExclusionsRequest configures the Cluster Post Voting Config Exclusions API request. -// type ClusterPostVotingConfigExclusionsRequest struct { NodeIds string NodeNames string @@ -68,7 +65,6 @@ type ClusterPostVotingConfigExclusionsRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterPostVotingConfigExclusionsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -155,7 +151,6 @@ func (r ClusterPostVotingConfigExclusionsRequest) Do(ctx context.Context, transp } // WithContext sets the request context. -// func (f ClusterPostVotingConfigExclusions) WithContext(v context.Context) func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { r.ctx = v @@ -163,7 +158,6 @@ func (f ClusterPostVotingConfigExclusions) WithContext(v context.Context) func(* } // WithNodeIds - a list of the persistent ids of the nodes to exclude from the voting configuration. if specified, you may not also specify ?node_names.. -// func (f ClusterPostVotingConfigExclusions) WithNodeIds(v string) func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { r.NodeIds = v @@ -171,7 +165,6 @@ func (f ClusterPostVotingConfigExclusions) WithNodeIds(v string) func(*ClusterPo } // WithNodeNames - a list of the names of the nodes to exclude from the voting configuration. if specified, you may not also specify ?node_ids.. -// func (f ClusterPostVotingConfigExclusions) WithNodeNames(v string) func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { r.NodeNames = v @@ -179,7 +172,6 @@ func (f ClusterPostVotingConfigExclusions) WithNodeNames(v string) func(*Cluster } // WithTimeout - explicit operation timeout. -// func (f ClusterPostVotingConfigExclusions) WithTimeout(v time.Duration) func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { r.Timeout = v @@ -187,7 +179,6 @@ func (f ClusterPostVotingConfigExclusions) WithTimeout(v time.Duration) func(*Cl } // WithPretty makes the response body pretty-printed. -// func (f ClusterPostVotingConfigExclusions) WithPretty() func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { r.Pretty = true @@ -195,7 +186,6 @@ func (f ClusterPostVotingConfigExclusions) WithPretty() func(*ClusterPostVotingC } // WithHuman makes statistical values human-readable. -// func (f ClusterPostVotingConfigExclusions) WithHuman() func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { r.Human = true @@ -203,7 +193,6 @@ func (f ClusterPostVotingConfigExclusions) WithHuman() func(*ClusterPostVotingCo } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterPostVotingConfigExclusions) WithErrorTrace() func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { r.ErrorTrace = true @@ -211,7 +200,6 @@ func (f ClusterPostVotingConfigExclusions) WithErrorTrace() func(*ClusterPostVot } // WithFilterPath filters the properties of the response body. -// func (f ClusterPostVotingConfigExclusions) WithFilterPath(v ...string) func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { r.FilterPath = v @@ -219,7 +207,6 @@ func (f ClusterPostVotingConfigExclusions) WithFilterPath(v ...string) func(*Clu } // WithHeader adds the headers to the HTTP request. -// func (f ClusterPostVotingConfigExclusions) WithHeader(h map[string]string) func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { if r.Header == nil { @@ -232,7 +219,6 @@ func (f ClusterPostVotingConfigExclusions) WithHeader(h map[string]string) func( } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterPostVotingConfigExclusions) WithOpaqueID(s string) func(*ClusterPostVotingConfigExclusionsRequest) { return func(r *ClusterPostVotingConfigExclusionsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.put_component_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.put_component_template.go index c54cebe8dac3..7d30c889c74d 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.put_component_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.put_component_template.go @@ -48,12 +48,9 @@ func newClusterPutComponentTemplateFunc(t Transport) ClusterPutComponentTemplate // ----- API Definition ------------------------------------------------------- // ClusterPutComponentTemplate creates or updates a component template -// -// type ClusterPutComponentTemplate func(name string, body io.Reader, o ...func(*ClusterPutComponentTemplateRequest)) (*Response, error) // ClusterPutComponentTemplateRequest configures the Cluster Put Component Template API request. -// type ClusterPutComponentTemplateRequest struct { Body io.Reader @@ -74,7 +71,6 @@ type ClusterPutComponentTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterPutComponentTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -168,7 +164,6 @@ func (r ClusterPutComponentTemplateRequest) Do(ctx context.Context, transport Tr } // WithContext sets the request context. -// func (f ClusterPutComponentTemplate) WithContext(v context.Context) func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { r.ctx = v @@ -176,7 +171,6 @@ func (f ClusterPutComponentTemplate) WithContext(v context.Context) func(*Cluste } // WithCreate - whether the index template should only be added if new or can also replace an existing one. -// func (f ClusterPutComponentTemplate) WithCreate(v bool) func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { r.Create = &v @@ -184,7 +178,6 @@ func (f ClusterPutComponentTemplate) WithCreate(v bool) func(*ClusterPutComponen } // WithMasterTimeout - specify timeout for connection to master. -// func (f ClusterPutComponentTemplate) WithMasterTimeout(v time.Duration) func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { r.MasterTimeout = v @@ -192,7 +185,6 @@ func (f ClusterPutComponentTemplate) WithMasterTimeout(v time.Duration) func(*Cl } // WithTimeout - explicit operation timeout. -// func (f ClusterPutComponentTemplate) WithTimeout(v time.Duration) func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { r.Timeout = v @@ -200,7 +192,6 @@ func (f ClusterPutComponentTemplate) WithTimeout(v time.Duration) func(*ClusterP } // WithPretty makes the response body pretty-printed. -// func (f ClusterPutComponentTemplate) WithPretty() func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { r.Pretty = true @@ -208,7 +199,6 @@ func (f ClusterPutComponentTemplate) WithPretty() func(*ClusterPutComponentTempl } // WithHuman makes statistical values human-readable. -// func (f ClusterPutComponentTemplate) WithHuman() func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { r.Human = true @@ -216,7 +206,6 @@ func (f ClusterPutComponentTemplate) WithHuman() func(*ClusterPutComponentTempla } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterPutComponentTemplate) WithErrorTrace() func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { r.ErrorTrace = true @@ -224,7 +213,6 @@ func (f ClusterPutComponentTemplate) WithErrorTrace() func(*ClusterPutComponentT } // WithFilterPath filters the properties of the response body. -// func (f ClusterPutComponentTemplate) WithFilterPath(v ...string) func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { r.FilterPath = v @@ -232,7 +220,6 @@ func (f ClusterPutComponentTemplate) WithFilterPath(v ...string) func(*ClusterPu } // WithHeader adds the headers to the HTTP request. -// func (f ClusterPutComponentTemplate) WithHeader(h map[string]string) func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { if r.Header == nil { @@ -245,7 +232,6 @@ func (f ClusterPutComponentTemplate) WithHeader(h map[string]string) func(*Clust } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterPutComponentTemplate) WithOpaqueID(s string) func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.put_settings.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.put_settings.go index 64ed6bc58cf0..a2392d1c6c81 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.put_settings.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.put_settings.go @@ -48,12 +48,9 @@ func newClusterPutSettingsFunc(t Transport) ClusterPutSettings { // ----- API Definition ------------------------------------------------------- // ClusterPutSettings updates the cluster settings. -// -// type ClusterPutSettings func(body io.Reader, o ...func(*ClusterPutSettingsRequest)) (*Response, error) // ClusterPutSettingsRequest configures the Cluster Put Settings API request. -// type ClusterPutSettingsRequest struct { Body io.Reader @@ -72,7 +69,6 @@ type ClusterPutSettingsRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterPutSettingsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -163,7 +159,6 @@ func (r ClusterPutSettingsRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f ClusterPutSettings) WithContext(v context.Context) func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { r.ctx = v @@ -171,7 +166,6 @@ func (f ClusterPutSettings) WithContext(v context.Context) func(*ClusterPutSetti } // WithFlatSettings - return settings in flat format (default: false). -// func (f ClusterPutSettings) WithFlatSettings(v bool) func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { r.FlatSettings = &v @@ -179,7 +173,6 @@ func (f ClusterPutSettings) WithFlatSettings(v bool) func(*ClusterPutSettingsReq } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f ClusterPutSettings) WithMasterTimeout(v time.Duration) func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { r.MasterTimeout = v @@ -187,7 +180,6 @@ func (f ClusterPutSettings) WithMasterTimeout(v time.Duration) func(*ClusterPutS } // WithTimeout - explicit operation timeout. -// func (f ClusterPutSettings) WithTimeout(v time.Duration) func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { r.Timeout = v @@ -195,7 +187,6 @@ func (f ClusterPutSettings) WithTimeout(v time.Duration) func(*ClusterPutSetting } // WithPretty makes the response body pretty-printed. -// func (f ClusterPutSettings) WithPretty() func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { r.Pretty = true @@ -203,7 +194,6 @@ func (f ClusterPutSettings) WithPretty() func(*ClusterPutSettingsRequest) { } // WithHuman makes statistical values human-readable. -// func (f ClusterPutSettings) WithHuman() func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { r.Human = true @@ -211,7 +201,6 @@ func (f ClusterPutSettings) WithHuman() func(*ClusterPutSettingsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterPutSettings) WithErrorTrace() func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { r.ErrorTrace = true @@ -219,7 +208,6 @@ func (f ClusterPutSettings) WithErrorTrace() func(*ClusterPutSettingsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ClusterPutSettings) WithFilterPath(v ...string) func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { r.FilterPath = v @@ -227,7 +215,6 @@ func (f ClusterPutSettings) WithFilterPath(v ...string) func(*ClusterPutSettings } // WithHeader adds the headers to the HTTP request. -// func (f ClusterPutSettings) WithHeader(h map[string]string) func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { if r.Header == nil { @@ -240,7 +227,6 @@ func (f ClusterPutSettings) WithHeader(h map[string]string) func(*ClusterPutSett } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterPutSettings) WithOpaqueID(s string) func(*ClusterPutSettingsRequest) { return func(r *ClusterPutSettingsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.remote_info.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.remote_info.go index c35166be54ad..9c34b3b1f607 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.remote_info.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.remote_info.go @@ -45,12 +45,9 @@ func newClusterRemoteInfoFunc(t Transport) ClusterRemoteInfo { // ----- API Definition ------------------------------------------------------- // ClusterRemoteInfo returns the information about configured remote clusters. -// -// type ClusterRemoteInfo func(o ...func(*ClusterRemoteInfoRequest)) (*Response, error) // ClusterRemoteInfoRequest configures the Cluster Remote Info API request. -// type ClusterRemoteInfoRequest struct { Pretty bool Human bool @@ -63,7 +60,6 @@ type ClusterRemoteInfoRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterRemoteInfoRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -138,7 +134,6 @@ func (r ClusterRemoteInfoRequest) Do(ctx context.Context, transport Transport) ( } // WithContext sets the request context. -// func (f ClusterRemoteInfo) WithContext(v context.Context) func(*ClusterRemoteInfoRequest) { return func(r *ClusterRemoteInfoRequest) { r.ctx = v @@ -146,7 +141,6 @@ func (f ClusterRemoteInfo) WithContext(v context.Context) func(*ClusterRemoteInf } // WithPretty makes the response body pretty-printed. -// func (f ClusterRemoteInfo) WithPretty() func(*ClusterRemoteInfoRequest) { return func(r *ClusterRemoteInfoRequest) { r.Pretty = true @@ -154,7 +148,6 @@ func (f ClusterRemoteInfo) WithPretty() func(*ClusterRemoteInfoRequest) { } // WithHuman makes statistical values human-readable. -// func (f ClusterRemoteInfo) WithHuman() func(*ClusterRemoteInfoRequest) { return func(r *ClusterRemoteInfoRequest) { r.Human = true @@ -162,7 +155,6 @@ func (f ClusterRemoteInfo) WithHuman() func(*ClusterRemoteInfoRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterRemoteInfo) WithErrorTrace() func(*ClusterRemoteInfoRequest) { return func(r *ClusterRemoteInfoRequest) { r.ErrorTrace = true @@ -170,7 +162,6 @@ func (f ClusterRemoteInfo) WithErrorTrace() func(*ClusterRemoteInfoRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ClusterRemoteInfo) WithFilterPath(v ...string) func(*ClusterRemoteInfoRequest) { return func(r *ClusterRemoteInfoRequest) { r.FilterPath = v @@ -178,7 +169,6 @@ func (f ClusterRemoteInfo) WithFilterPath(v ...string) func(*ClusterRemoteInfoRe } // WithHeader adds the headers to the HTTP request. -// func (f ClusterRemoteInfo) WithHeader(h map[string]string) func(*ClusterRemoteInfoRequest) { return func(r *ClusterRemoteInfoRequest) { if r.Header == nil { @@ -191,7 +181,6 @@ func (f ClusterRemoteInfo) WithHeader(h map[string]string) func(*ClusterRemoteIn } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterRemoteInfo) WithOpaqueID(s string) func(*ClusterRemoteInfoRequest) { return func(r *ClusterRemoteInfoRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.reroute.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.reroute.go index a810f3726bc6..fa228400b09a 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.reroute.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.reroute.go @@ -48,12 +48,9 @@ func newClusterRerouteFunc(t Transport) ClusterReroute { // ----- API Definition ------------------------------------------------------- // ClusterReroute allows to manually change the allocation of individual shards in the cluster. -// -// type ClusterReroute func(o ...func(*ClusterRerouteRequest)) (*Response, error) // ClusterRerouteRequest configures the Cluster Reroute API request. -// type ClusterRerouteRequest struct { Body io.Reader @@ -75,7 +72,6 @@ type ClusterRerouteRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterRerouteRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -178,7 +174,6 @@ func (r ClusterRerouteRequest) Do(ctx context.Context, transport Transport) (*Re } // WithContext sets the request context. -// func (f ClusterReroute) WithContext(v context.Context) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.ctx = v @@ -186,7 +181,6 @@ func (f ClusterReroute) WithContext(v context.Context) func(*ClusterRerouteReque } // WithBody - The definition of `commands` to perform (`move`, `cancel`, `allocate`). -// func (f ClusterReroute) WithBody(v io.Reader) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.Body = v @@ -194,7 +188,6 @@ func (f ClusterReroute) WithBody(v io.Reader) func(*ClusterRerouteRequest) { } // WithDryRun - simulate the operation only and return the resulting state. -// func (f ClusterReroute) WithDryRun(v bool) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.DryRun = &v @@ -202,7 +195,6 @@ func (f ClusterReroute) WithDryRun(v bool) func(*ClusterRerouteRequest) { } // WithExplain - return an explanation of why the commands can or cannot be executed. -// func (f ClusterReroute) WithExplain(v bool) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.Explain = &v @@ -210,7 +202,6 @@ func (f ClusterReroute) WithExplain(v bool) func(*ClusterRerouteRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f ClusterReroute) WithMasterTimeout(v time.Duration) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.MasterTimeout = v @@ -218,7 +209,6 @@ func (f ClusterReroute) WithMasterTimeout(v time.Duration) func(*ClusterRerouteR } // WithMetric - limit the information returned to the specified metrics. defaults to all but metadata. -// func (f ClusterReroute) WithMetric(v ...string) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.Metric = v @@ -226,7 +216,6 @@ func (f ClusterReroute) WithMetric(v ...string) func(*ClusterRerouteRequest) { } // WithRetryFailed - retries allocation of shards that are blocked due to too many subsequent allocation failures. -// func (f ClusterReroute) WithRetryFailed(v bool) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.RetryFailed = &v @@ -234,7 +223,6 @@ func (f ClusterReroute) WithRetryFailed(v bool) func(*ClusterRerouteRequest) { } // WithTimeout - explicit operation timeout. -// func (f ClusterReroute) WithTimeout(v time.Duration) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.Timeout = v @@ -242,7 +230,6 @@ func (f ClusterReroute) WithTimeout(v time.Duration) func(*ClusterRerouteRequest } // WithPretty makes the response body pretty-printed. -// func (f ClusterReroute) WithPretty() func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.Pretty = true @@ -250,7 +237,6 @@ func (f ClusterReroute) WithPretty() func(*ClusterRerouteRequest) { } // WithHuman makes statistical values human-readable. -// func (f ClusterReroute) WithHuman() func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.Human = true @@ -258,7 +244,6 @@ func (f ClusterReroute) WithHuman() func(*ClusterRerouteRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterReroute) WithErrorTrace() func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.ErrorTrace = true @@ -266,7 +251,6 @@ func (f ClusterReroute) WithErrorTrace() func(*ClusterRerouteRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ClusterReroute) WithFilterPath(v ...string) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { r.FilterPath = v @@ -274,7 +258,6 @@ func (f ClusterReroute) WithFilterPath(v ...string) func(*ClusterRerouteRequest) } // WithHeader adds the headers to the HTTP request. -// func (f ClusterReroute) WithHeader(h map[string]string) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { if r.Header == nil { @@ -287,7 +270,6 @@ func (f ClusterReroute) WithHeader(h map[string]string) func(*ClusterRerouteRequ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterReroute) WithOpaqueID(s string) func(*ClusterRerouteRequest) { return func(r *ClusterRerouteRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.state.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.state.go index 3abced62e742..d87a487ae44d 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.state.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.state.go @@ -47,12 +47,9 @@ func newClusterStateFunc(t Transport) ClusterState { // ----- API Definition ------------------------------------------------------- // ClusterState returns a comprehensive information about the state of the cluster. -// -// type ClusterState func(o ...func(*ClusterStateRequest)) (*Response, error) // ClusterStateRequest configures the Cluster State API request. -// type ClusterStateRequest struct { Index []string @@ -78,7 +75,6 @@ type ClusterStateRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterStateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -196,7 +192,6 @@ func (r ClusterStateRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f ClusterState) WithContext(v context.Context) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.ctx = v @@ -204,7 +199,6 @@ func (f ClusterState) WithContext(v context.Context) func(*ClusterStateRequest) } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f ClusterState) WithIndex(v ...string) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.Index = v @@ -212,7 +206,6 @@ func (f ClusterState) WithIndex(v ...string) func(*ClusterStateRequest) { } // WithMetric - limit the information returned to the specified metrics. -// func (f ClusterState) WithMetric(v ...string) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.Metric = v @@ -220,7 +213,6 @@ func (f ClusterState) WithMetric(v ...string) func(*ClusterStateRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f ClusterState) WithAllowNoIndices(v bool) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.AllowNoIndices = &v @@ -228,7 +220,6 @@ func (f ClusterState) WithAllowNoIndices(v bool) func(*ClusterStateRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f ClusterState) WithExpandWildcards(v string) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.ExpandWildcards = v @@ -236,7 +227,6 @@ func (f ClusterState) WithExpandWildcards(v string) func(*ClusterStateRequest) { } // WithFlatSettings - return settings in flat format (default: false). -// func (f ClusterState) WithFlatSettings(v bool) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.FlatSettings = &v @@ -244,7 +234,6 @@ func (f ClusterState) WithFlatSettings(v bool) func(*ClusterStateRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f ClusterState) WithIgnoreUnavailable(v bool) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.IgnoreUnavailable = &v @@ -252,7 +241,6 @@ func (f ClusterState) WithIgnoreUnavailable(v bool) func(*ClusterStateRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f ClusterState) WithLocal(v bool) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.Local = &v @@ -260,7 +248,6 @@ func (f ClusterState) WithLocal(v bool) func(*ClusterStateRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f ClusterState) WithMasterTimeout(v time.Duration) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.MasterTimeout = v @@ -268,7 +255,6 @@ func (f ClusterState) WithMasterTimeout(v time.Duration) func(*ClusterStateReque } // WithWaitForMetadataVersion - wait for the metadata version to be equal or greater than the specified metadata version. -// func (f ClusterState) WithWaitForMetadataVersion(v int) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.WaitForMetadataVersion = &v @@ -276,7 +262,6 @@ func (f ClusterState) WithWaitForMetadataVersion(v int) func(*ClusterStateReques } // WithWaitForTimeout - the maximum time to wait for wait_for_metadata_version before timing out. -// func (f ClusterState) WithWaitForTimeout(v time.Duration) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.WaitForTimeout = v @@ -284,7 +269,6 @@ func (f ClusterState) WithWaitForTimeout(v time.Duration) func(*ClusterStateRequ } // WithPretty makes the response body pretty-printed. -// func (f ClusterState) WithPretty() func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.Pretty = true @@ -292,7 +276,6 @@ func (f ClusterState) WithPretty() func(*ClusterStateRequest) { } // WithHuman makes statistical values human-readable. -// func (f ClusterState) WithHuman() func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.Human = true @@ -300,7 +283,6 @@ func (f ClusterState) WithHuman() func(*ClusterStateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterState) WithErrorTrace() func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.ErrorTrace = true @@ -308,7 +290,6 @@ func (f ClusterState) WithErrorTrace() func(*ClusterStateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ClusterState) WithFilterPath(v ...string) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { r.FilterPath = v @@ -316,7 +297,6 @@ func (f ClusterState) WithFilterPath(v ...string) func(*ClusterStateRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f ClusterState) WithHeader(h map[string]string) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { if r.Header == nil { @@ -329,7 +309,6 @@ func (f ClusterState) WithHeader(h map[string]string) func(*ClusterStateRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterState) WithOpaqueID(s string) func(*ClusterStateRequest) { return func(r *ClusterStateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.stats.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.stats.go index a4006787643b..b5823cdcbeea 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.stats.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.cluster.stats.go @@ -47,12 +47,9 @@ func newClusterStatsFunc(t Transport) ClusterStats { // ----- API Definition ------------------------------------------------------- // ClusterStats returns high-level overview of cluster statistics. -// -// type ClusterStats func(o ...func(*ClusterStatsRequest)) (*Response, error) // ClusterStatsRequest configures the Cluster Stats API request. -// type ClusterStatsRequest struct { NodeID []string @@ -70,7 +67,6 @@ type ClusterStatsRequest struct { } // Do executes the request and returns response or error. -// func (r ClusterStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -162,7 +158,6 @@ func (r ClusterStatsRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f ClusterStats) WithContext(v context.Context) func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { r.ctx = v @@ -170,7 +165,6 @@ func (f ClusterStats) WithContext(v context.Context) func(*ClusterStatsRequest) } // WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. -// func (f ClusterStats) WithNodeID(v ...string) func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { r.NodeID = v @@ -178,7 +172,6 @@ func (f ClusterStats) WithNodeID(v ...string) func(*ClusterStatsRequest) { } // WithFlatSettings - return settings in flat format (default: false). -// func (f ClusterStats) WithFlatSettings(v bool) func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { r.FlatSettings = &v @@ -186,7 +179,6 @@ func (f ClusterStats) WithFlatSettings(v bool) func(*ClusterStatsRequest) { } // WithTimeout - explicit operation timeout. -// func (f ClusterStats) WithTimeout(v time.Duration) func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { r.Timeout = v @@ -194,7 +186,6 @@ func (f ClusterStats) WithTimeout(v time.Duration) func(*ClusterStatsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f ClusterStats) WithPretty() func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { r.Pretty = true @@ -202,7 +193,6 @@ func (f ClusterStats) WithPretty() func(*ClusterStatsRequest) { } // WithHuman makes statistical values human-readable. -// func (f ClusterStats) WithHuman() func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { r.Human = true @@ -210,7 +200,6 @@ func (f ClusterStats) WithHuman() func(*ClusterStatsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ClusterStats) WithErrorTrace() func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { r.ErrorTrace = true @@ -218,7 +207,6 @@ func (f ClusterStats) WithErrorTrace() func(*ClusterStatsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ClusterStats) WithFilterPath(v ...string) func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { r.FilterPath = v @@ -226,7 +214,6 @@ func (f ClusterStats) WithFilterPath(v ...string) func(*ClusterStatsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f ClusterStats) WithHeader(h map[string]string) func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { if r.Header == nil { @@ -239,7 +226,6 @@ func (f ClusterStats) WithHeader(h map[string]string) func(*ClusterStatsRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ClusterStats) WithOpaqueID(s string) func(*ClusterStatsRequest) { return func(r *ClusterStatsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.count.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.count.go index 4d2605bd39a2..06a1e55aac6d 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.count.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.count.go @@ -47,12 +47,9 @@ func newCountFunc(t Transport) Count { // ----- API Definition ------------------------------------------------------- // Count returns number of documents matching a query. -// -// type Count func(o ...func(*CountRequest)) (*Response, error) // CountRequest configures the Count API request. -// type CountRequest struct { Index []string DocumentType []string @@ -85,7 +82,6 @@ type CountRequest struct { } // Do executes the request and returns response or error. -// func (r CountRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -229,7 +225,6 @@ func (r CountRequest) Do(ctx context.Context, transport Transport) (*Response, e } // WithContext sets the request context. -// func (f Count) WithContext(v context.Context) func(*CountRequest) { return func(r *CountRequest) { r.ctx = v @@ -237,7 +232,6 @@ func (f Count) WithContext(v context.Context) func(*CountRequest) { } // WithBody - A query to restrict the results specified with the Query DSL (optional). -// func (f Count) WithBody(v io.Reader) func(*CountRequest) { return func(r *CountRequest) { r.Body = v @@ -245,7 +239,6 @@ func (f Count) WithBody(v io.Reader) func(*CountRequest) { } // WithIndex - a list of indices to restrict the results. -// func (f Count) WithIndex(v ...string) func(*CountRequest) { return func(r *CountRequest) { r.Index = v @@ -253,7 +246,6 @@ func (f Count) WithIndex(v ...string) func(*CountRequest) { } // WithDocumentType - a list of types to restrict the results. -// func (f Count) WithDocumentType(v ...string) func(*CountRequest) { return func(r *CountRequest) { r.DocumentType = v @@ -261,7 +253,6 @@ func (f Count) WithDocumentType(v ...string) func(*CountRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f Count) WithAllowNoIndices(v bool) func(*CountRequest) { return func(r *CountRequest) { r.AllowNoIndices = &v @@ -269,7 +260,6 @@ func (f Count) WithAllowNoIndices(v bool) func(*CountRequest) { } // WithAnalyzer - the analyzer to use for the query string. -// func (f Count) WithAnalyzer(v string) func(*CountRequest) { return func(r *CountRequest) { r.Analyzer = v @@ -277,7 +267,6 @@ func (f Count) WithAnalyzer(v string) func(*CountRequest) { } // WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false). -// func (f Count) WithAnalyzeWildcard(v bool) func(*CountRequest) { return func(r *CountRequest) { r.AnalyzeWildcard = &v @@ -285,7 +274,6 @@ func (f Count) WithAnalyzeWildcard(v bool) func(*CountRequest) { } // WithDefaultOperator - the default operator for query string query (and or or). -// func (f Count) WithDefaultOperator(v string) func(*CountRequest) { return func(r *CountRequest) { r.DefaultOperator = v @@ -293,7 +281,6 @@ func (f Count) WithDefaultOperator(v string) func(*CountRequest) { } // WithDf - the field to use as default where no field prefix is given in the query string. -// func (f Count) WithDf(v string) func(*CountRequest) { return func(r *CountRequest) { r.Df = v @@ -301,7 +288,6 @@ func (f Count) WithDf(v string) func(*CountRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f Count) WithExpandWildcards(v string) func(*CountRequest) { return func(r *CountRequest) { r.ExpandWildcards = v @@ -309,7 +295,6 @@ func (f Count) WithExpandWildcards(v string) func(*CountRequest) { } // WithIgnoreThrottled - whether specified concrete, expanded or aliased indices should be ignored when throttled. -// func (f Count) WithIgnoreThrottled(v bool) func(*CountRequest) { return func(r *CountRequest) { r.IgnoreThrottled = &v @@ -317,7 +302,6 @@ func (f Count) WithIgnoreThrottled(v bool) func(*CountRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f Count) WithIgnoreUnavailable(v bool) func(*CountRequest) { return func(r *CountRequest) { r.IgnoreUnavailable = &v @@ -325,7 +309,6 @@ func (f Count) WithIgnoreUnavailable(v bool) func(*CountRequest) { } // WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored. -// func (f Count) WithLenient(v bool) func(*CountRequest) { return func(r *CountRequest) { r.Lenient = &v @@ -333,7 +316,6 @@ func (f Count) WithLenient(v bool) func(*CountRequest) { } // WithMinScore - include only documents with a specific `_score` value in the result. -// func (f Count) WithMinScore(v int) func(*CountRequest) { return func(r *CountRequest) { r.MinScore = &v @@ -341,7 +323,6 @@ func (f Count) WithMinScore(v int) func(*CountRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f Count) WithPreference(v string) func(*CountRequest) { return func(r *CountRequest) { r.Preference = v @@ -349,7 +330,6 @@ func (f Count) WithPreference(v string) func(*CountRequest) { } // WithQuery - query in the lucene query string syntax. -// func (f Count) WithQuery(v string) func(*CountRequest) { return func(r *CountRequest) { r.Query = v @@ -357,7 +337,6 @@ func (f Count) WithQuery(v string) func(*CountRequest) { } // WithRouting - a list of specific routing values. -// func (f Count) WithRouting(v ...string) func(*CountRequest) { return func(r *CountRequest) { r.Routing = v @@ -365,7 +344,6 @@ func (f Count) WithRouting(v ...string) func(*CountRequest) { } // WithTerminateAfter - the maximum count for each shard, upon reaching which the query execution will terminate early. -// func (f Count) WithTerminateAfter(v int) func(*CountRequest) { return func(r *CountRequest) { r.TerminateAfter = &v @@ -373,7 +351,6 @@ func (f Count) WithTerminateAfter(v int) func(*CountRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Count) WithPretty() func(*CountRequest) { return func(r *CountRequest) { r.Pretty = true @@ -381,7 +358,6 @@ func (f Count) WithPretty() func(*CountRequest) { } // WithHuman makes statistical values human-readable. -// func (f Count) WithHuman() func(*CountRequest) { return func(r *CountRequest) { r.Human = true @@ -389,7 +365,6 @@ func (f Count) WithHuman() func(*CountRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Count) WithErrorTrace() func(*CountRequest) { return func(r *CountRequest) { r.ErrorTrace = true @@ -397,7 +372,6 @@ func (f Count) WithErrorTrace() func(*CountRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Count) WithFilterPath(v ...string) func(*CountRequest) { return func(r *CountRequest) { r.FilterPath = v @@ -405,7 +379,6 @@ func (f Count) WithFilterPath(v ...string) func(*CountRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Count) WithHeader(h map[string]string) func(*CountRequest) { return func(r *CountRequest) { if r.Header == nil { @@ -418,7 +391,6 @@ func (f Count) WithHeader(h map[string]string) func(*CountRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Count) WithOpaqueID(s string) func(*CountRequest) { return func(r *CountRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.create.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.create.go index e16d9c98c6cc..51e123b5612d 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.create.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.create.go @@ -50,12 +50,9 @@ func newCreateFunc(t Transport) Create { // Create creates a new document in the index. // // Returns a 409 response when a document with a same ID already exists in the index. -// -// type Create func(index string, id string, body io.Reader, o ...func(*CreateRequest)) (*Response, error) // CreateRequest configures the Create API request. -// type CreateRequest struct { Index string DocumentType string @@ -82,7 +79,6 @@ type CreateRequest struct { } // Do executes the request and returns response or error. -// func (r CreateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -202,7 +198,6 @@ func (r CreateRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f Create) WithContext(v context.Context) func(*CreateRequest) { return func(r *CreateRequest) { r.ctx = v @@ -210,7 +205,6 @@ func (f Create) WithContext(v context.Context) func(*CreateRequest) { } // WithDocumentType - the type of the document. -// func (f Create) WithDocumentType(v string) func(*CreateRequest) { return func(r *CreateRequest) { r.DocumentType = v @@ -218,7 +212,6 @@ func (f Create) WithDocumentType(v string) func(*CreateRequest) { } // WithPipeline - the pipeline ID to preprocess incoming documents with. -// func (f Create) WithPipeline(v string) func(*CreateRequest) { return func(r *CreateRequest) { r.Pipeline = v @@ -226,7 +219,6 @@ func (f Create) WithPipeline(v string) func(*CreateRequest) { } // WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.. -// func (f Create) WithRefresh(v string) func(*CreateRequest) { return func(r *CreateRequest) { r.Refresh = v @@ -234,7 +226,6 @@ func (f Create) WithRefresh(v string) func(*CreateRequest) { } // WithRouting - specific routing value. -// func (f Create) WithRouting(v string) func(*CreateRequest) { return func(r *CreateRequest) { r.Routing = v @@ -242,7 +233,6 @@ func (f Create) WithRouting(v string) func(*CreateRequest) { } // WithTimeout - explicit operation timeout. -// func (f Create) WithTimeout(v time.Duration) func(*CreateRequest) { return func(r *CreateRequest) { r.Timeout = v @@ -250,7 +240,6 @@ func (f Create) WithTimeout(v time.Duration) func(*CreateRequest) { } // WithVersion - explicit version number for concurrency control. -// func (f Create) WithVersion(v int) func(*CreateRequest) { return func(r *CreateRequest) { r.Version = &v @@ -258,7 +247,6 @@ func (f Create) WithVersion(v int) func(*CreateRequest) { } // WithVersionType - specific version type. -// func (f Create) WithVersionType(v string) func(*CreateRequest) { return func(r *CreateRequest) { r.VersionType = v @@ -266,7 +254,6 @@ func (f Create) WithVersionType(v string) func(*CreateRequest) { } // WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the index operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1). -// func (f Create) WithWaitForActiveShards(v string) func(*CreateRequest) { return func(r *CreateRequest) { r.WaitForActiveShards = v @@ -274,7 +261,6 @@ func (f Create) WithWaitForActiveShards(v string) func(*CreateRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Create) WithPretty() func(*CreateRequest) { return func(r *CreateRequest) { r.Pretty = true @@ -282,7 +268,6 @@ func (f Create) WithPretty() func(*CreateRequest) { } // WithHuman makes statistical values human-readable. -// func (f Create) WithHuman() func(*CreateRequest) { return func(r *CreateRequest) { r.Human = true @@ -290,7 +275,6 @@ func (f Create) WithHuman() func(*CreateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Create) WithErrorTrace() func(*CreateRequest) { return func(r *CreateRequest) { r.ErrorTrace = true @@ -298,7 +282,6 @@ func (f Create) WithErrorTrace() func(*CreateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Create) WithFilterPath(v ...string) func(*CreateRequest) { return func(r *CreateRequest) { r.FilterPath = v @@ -306,7 +289,6 @@ func (f Create) WithFilterPath(v ...string) func(*CreateRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Create) WithHeader(h map[string]string) func(*CreateRequest) { return func(r *CreateRequest) { if r.Header == nil { @@ -319,7 +301,6 @@ func (f Create) WithHeader(h map[string]string) func(*CreateRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Create) WithOpaqueID(s string) func(*CreateRequest) { return func(r *CreateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.delete_dangling_index.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.delete_dangling_index.go index b931235ae282..ae14355963b1 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.delete_dangling_index.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.delete_dangling_index.go @@ -47,12 +47,9 @@ func newDanglingIndicesDeleteDanglingIndexFunc(t Transport) DanglingIndicesDelet // ----- API Definition ------------------------------------------------------- // DanglingIndicesDeleteDanglingIndex deletes the specified dangling index -// -// type DanglingIndicesDeleteDanglingIndex func(index_uuid string, o ...func(*DanglingIndicesDeleteDanglingIndexRequest)) (*Response, error) // DanglingIndicesDeleteDanglingIndexRequest configures the Dangling Indices Delete Dangling Index API request. -// type DanglingIndicesDeleteDanglingIndexRequest struct { IndexUUID string @@ -71,7 +68,6 @@ type DanglingIndicesDeleteDanglingIndexRequest struct { } // Do executes the request and returns response or error. -// func (r DanglingIndicesDeleteDanglingIndexRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -161,7 +157,6 @@ func (r DanglingIndicesDeleteDanglingIndexRequest) Do(ctx context.Context, trans } // WithContext sets the request context. -// func (f DanglingIndicesDeleteDanglingIndex) WithContext(v context.Context) func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { r.ctx = v @@ -169,7 +164,6 @@ func (f DanglingIndicesDeleteDanglingIndex) WithContext(v context.Context) func( } // WithAcceptDataLoss - must be set to true in order to delete the dangling index. -// func (f DanglingIndicesDeleteDanglingIndex) WithAcceptDataLoss(v bool) func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { r.AcceptDataLoss = &v @@ -177,7 +171,6 @@ func (f DanglingIndicesDeleteDanglingIndex) WithAcceptDataLoss(v bool) func(*Dan } // WithMasterTimeout - specify timeout for connection to master. -// func (f DanglingIndicesDeleteDanglingIndex) WithMasterTimeout(v time.Duration) func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { r.MasterTimeout = v @@ -185,7 +178,6 @@ func (f DanglingIndicesDeleteDanglingIndex) WithMasterTimeout(v time.Duration) f } // WithTimeout - explicit operation timeout. -// func (f DanglingIndicesDeleteDanglingIndex) WithTimeout(v time.Duration) func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { r.Timeout = v @@ -193,7 +185,6 @@ func (f DanglingIndicesDeleteDanglingIndex) WithTimeout(v time.Duration) func(*D } // WithPretty makes the response body pretty-printed. -// func (f DanglingIndicesDeleteDanglingIndex) WithPretty() func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { r.Pretty = true @@ -201,7 +192,6 @@ func (f DanglingIndicesDeleteDanglingIndex) WithPretty() func(*DanglingIndicesDe } // WithHuman makes statistical values human-readable. -// func (f DanglingIndicesDeleteDanglingIndex) WithHuman() func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { r.Human = true @@ -209,7 +199,6 @@ func (f DanglingIndicesDeleteDanglingIndex) WithHuman() func(*DanglingIndicesDel } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f DanglingIndicesDeleteDanglingIndex) WithErrorTrace() func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { r.ErrorTrace = true @@ -217,7 +206,6 @@ func (f DanglingIndicesDeleteDanglingIndex) WithErrorTrace() func(*DanglingIndic } // WithFilterPath filters the properties of the response body. -// func (f DanglingIndicesDeleteDanglingIndex) WithFilterPath(v ...string) func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { r.FilterPath = v @@ -225,7 +213,6 @@ func (f DanglingIndicesDeleteDanglingIndex) WithFilterPath(v ...string) func(*Da } // WithHeader adds the headers to the HTTP request. -// func (f DanglingIndicesDeleteDanglingIndex) WithHeader(h map[string]string) func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { if r.Header == nil { @@ -238,7 +225,6 @@ func (f DanglingIndicesDeleteDanglingIndex) WithHeader(h map[string]string) func } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f DanglingIndicesDeleteDanglingIndex) WithOpaqueID(s string) func(*DanglingIndicesDeleteDanglingIndexRequest) { return func(r *DanglingIndicesDeleteDanglingIndexRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.import_dangling_index.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.import_dangling_index.go index fb46c0668361..ceb9d02dd08f 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.import_dangling_index.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.import_dangling_index.go @@ -47,12 +47,9 @@ func newDanglingIndicesImportDanglingIndexFunc(t Transport) DanglingIndicesImpor // ----- API Definition ------------------------------------------------------- // DanglingIndicesImportDanglingIndex imports the specified dangling index -// -// type DanglingIndicesImportDanglingIndex func(index_uuid string, o ...func(*DanglingIndicesImportDanglingIndexRequest)) (*Response, error) // DanglingIndicesImportDanglingIndexRequest configures the Dangling Indices Import Dangling Index API request. -// type DanglingIndicesImportDanglingIndexRequest struct { IndexUUID string @@ -71,7 +68,6 @@ type DanglingIndicesImportDanglingIndexRequest struct { } // Do executes the request and returns response or error. -// func (r DanglingIndicesImportDanglingIndexRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -161,7 +157,6 @@ func (r DanglingIndicesImportDanglingIndexRequest) Do(ctx context.Context, trans } // WithContext sets the request context. -// func (f DanglingIndicesImportDanglingIndex) WithContext(v context.Context) func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { r.ctx = v @@ -169,7 +164,6 @@ func (f DanglingIndicesImportDanglingIndex) WithContext(v context.Context) func( } // WithAcceptDataLoss - must be set to true in order to import the dangling index. -// func (f DanglingIndicesImportDanglingIndex) WithAcceptDataLoss(v bool) func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { r.AcceptDataLoss = &v @@ -177,7 +171,6 @@ func (f DanglingIndicesImportDanglingIndex) WithAcceptDataLoss(v bool) func(*Dan } // WithMasterTimeout - specify timeout for connection to master. -// func (f DanglingIndicesImportDanglingIndex) WithMasterTimeout(v time.Duration) func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { r.MasterTimeout = v @@ -185,7 +178,6 @@ func (f DanglingIndicesImportDanglingIndex) WithMasterTimeout(v time.Duration) f } // WithTimeout - explicit operation timeout. -// func (f DanglingIndicesImportDanglingIndex) WithTimeout(v time.Duration) func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { r.Timeout = v @@ -193,7 +185,6 @@ func (f DanglingIndicesImportDanglingIndex) WithTimeout(v time.Duration) func(*D } // WithPretty makes the response body pretty-printed. -// func (f DanglingIndicesImportDanglingIndex) WithPretty() func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { r.Pretty = true @@ -201,7 +192,6 @@ func (f DanglingIndicesImportDanglingIndex) WithPretty() func(*DanglingIndicesIm } // WithHuman makes statistical values human-readable. -// func (f DanglingIndicesImportDanglingIndex) WithHuman() func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { r.Human = true @@ -209,7 +199,6 @@ func (f DanglingIndicesImportDanglingIndex) WithHuman() func(*DanglingIndicesImp } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f DanglingIndicesImportDanglingIndex) WithErrorTrace() func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { r.ErrorTrace = true @@ -217,7 +206,6 @@ func (f DanglingIndicesImportDanglingIndex) WithErrorTrace() func(*DanglingIndic } // WithFilterPath filters the properties of the response body. -// func (f DanglingIndicesImportDanglingIndex) WithFilterPath(v ...string) func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { r.FilterPath = v @@ -225,7 +213,6 @@ func (f DanglingIndicesImportDanglingIndex) WithFilterPath(v ...string) func(*Da } // WithHeader adds the headers to the HTTP request. -// func (f DanglingIndicesImportDanglingIndex) WithHeader(h map[string]string) func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { if r.Header == nil { @@ -238,7 +225,6 @@ func (f DanglingIndicesImportDanglingIndex) WithHeader(h map[string]string) func } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f DanglingIndicesImportDanglingIndex) WithOpaqueID(s string) func(*DanglingIndicesImportDanglingIndexRequest) { return func(r *DanglingIndicesImportDanglingIndexRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.list_dangling_indices.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.list_dangling_indices.go index a45237767fad..9ecefb0e121d 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.list_dangling_indices.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.dangling_indices.list_dangling_indices.go @@ -45,12 +45,9 @@ func newDanglingIndicesListDanglingIndicesFunc(t Transport) DanglingIndicesListD // ----- API Definition ------------------------------------------------------- // DanglingIndicesListDanglingIndices returns all dangling indices. -// -// type DanglingIndicesListDanglingIndices func(o ...func(*DanglingIndicesListDanglingIndicesRequest)) (*Response, error) // DanglingIndicesListDanglingIndicesRequest configures the Dangling Indices List Dangling Indices API request. -// type DanglingIndicesListDanglingIndicesRequest struct { Pretty bool Human bool @@ -63,7 +60,6 @@ type DanglingIndicesListDanglingIndicesRequest struct { } // Do executes the request and returns response or error. -// func (r DanglingIndicesListDanglingIndicesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -138,7 +134,6 @@ func (r DanglingIndicesListDanglingIndicesRequest) Do(ctx context.Context, trans } // WithContext sets the request context. -// func (f DanglingIndicesListDanglingIndices) WithContext(v context.Context) func(*DanglingIndicesListDanglingIndicesRequest) { return func(r *DanglingIndicesListDanglingIndicesRequest) { r.ctx = v @@ -146,7 +141,6 @@ func (f DanglingIndicesListDanglingIndices) WithContext(v context.Context) func( } // WithPretty makes the response body pretty-printed. -// func (f DanglingIndicesListDanglingIndices) WithPretty() func(*DanglingIndicesListDanglingIndicesRequest) { return func(r *DanglingIndicesListDanglingIndicesRequest) { r.Pretty = true @@ -154,7 +148,6 @@ func (f DanglingIndicesListDanglingIndices) WithPretty() func(*DanglingIndicesLi } // WithHuman makes statistical values human-readable. -// func (f DanglingIndicesListDanglingIndices) WithHuman() func(*DanglingIndicesListDanglingIndicesRequest) { return func(r *DanglingIndicesListDanglingIndicesRequest) { r.Human = true @@ -162,7 +155,6 @@ func (f DanglingIndicesListDanglingIndices) WithHuman() func(*DanglingIndicesLis } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f DanglingIndicesListDanglingIndices) WithErrorTrace() func(*DanglingIndicesListDanglingIndicesRequest) { return func(r *DanglingIndicesListDanglingIndicesRequest) { r.ErrorTrace = true @@ -170,7 +162,6 @@ func (f DanglingIndicesListDanglingIndices) WithErrorTrace() func(*DanglingIndic } // WithFilterPath filters the properties of the response body. -// func (f DanglingIndicesListDanglingIndices) WithFilterPath(v ...string) func(*DanglingIndicesListDanglingIndicesRequest) { return func(r *DanglingIndicesListDanglingIndicesRequest) { r.FilterPath = v @@ -178,7 +169,6 @@ func (f DanglingIndicesListDanglingIndices) WithFilterPath(v ...string) func(*Da } // WithHeader adds the headers to the HTTP request. -// func (f DanglingIndicesListDanglingIndices) WithHeader(h map[string]string) func(*DanglingIndicesListDanglingIndicesRequest) { return func(r *DanglingIndicesListDanglingIndicesRequest) { if r.Header == nil { @@ -191,7 +181,6 @@ func (f DanglingIndicesListDanglingIndices) WithHeader(h map[string]string) func } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f DanglingIndicesListDanglingIndices) WithOpaqueID(s string) func(*DanglingIndicesListDanglingIndicesRequest) { return func(r *DanglingIndicesListDanglingIndicesRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete.go index ac62544fa05a..d47bf614e62b 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete.go @@ -47,12 +47,9 @@ func newDeleteFunc(t Transport) Delete { // ----- API Definition ------------------------------------------------------- // Delete removes a document from the index. -// -// type Delete func(index string, id string, o ...func(*DeleteRequest)) (*Response, error) // DeleteRequest configures the Delete API request. -// type DeleteRequest struct { Index string DocumentType string @@ -78,7 +75,6 @@ type DeleteRequest struct { } // Do executes the request and returns response or error. -// func (r DeleteRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -196,7 +192,6 @@ func (r DeleteRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f Delete) WithContext(v context.Context) func(*DeleteRequest) { return func(r *DeleteRequest) { r.ctx = v @@ -204,7 +199,6 @@ func (f Delete) WithContext(v context.Context) func(*DeleteRequest) { } // WithDocumentType - the type of the document. -// func (f Delete) WithDocumentType(v string) func(*DeleteRequest) { return func(r *DeleteRequest) { r.DocumentType = v @@ -212,7 +206,6 @@ func (f Delete) WithDocumentType(v string) func(*DeleteRequest) { } // WithIfPrimaryTerm - only perform the delete operation if the last operation that has changed the document has the specified primary term. -// func (f Delete) WithIfPrimaryTerm(v int) func(*DeleteRequest) { return func(r *DeleteRequest) { r.IfPrimaryTerm = &v @@ -220,7 +213,6 @@ func (f Delete) WithIfPrimaryTerm(v int) func(*DeleteRequest) { } // WithIfSeqNo - only perform the delete operation if the last operation that has changed the document has the specified sequence number. -// func (f Delete) WithIfSeqNo(v int) func(*DeleteRequest) { return func(r *DeleteRequest) { r.IfSeqNo = &v @@ -228,7 +220,6 @@ func (f Delete) WithIfSeqNo(v int) func(*DeleteRequest) { } // WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.. -// func (f Delete) WithRefresh(v string) func(*DeleteRequest) { return func(r *DeleteRequest) { r.Refresh = v @@ -236,7 +227,6 @@ func (f Delete) WithRefresh(v string) func(*DeleteRequest) { } // WithRouting - specific routing value. -// func (f Delete) WithRouting(v string) func(*DeleteRequest) { return func(r *DeleteRequest) { r.Routing = v @@ -244,7 +234,6 @@ func (f Delete) WithRouting(v string) func(*DeleteRequest) { } // WithTimeout - explicit operation timeout. -// func (f Delete) WithTimeout(v time.Duration) func(*DeleteRequest) { return func(r *DeleteRequest) { r.Timeout = v @@ -252,7 +241,6 @@ func (f Delete) WithTimeout(v time.Duration) func(*DeleteRequest) { } // WithVersion - explicit version number for concurrency control. -// func (f Delete) WithVersion(v int) func(*DeleteRequest) { return func(r *DeleteRequest) { r.Version = &v @@ -260,7 +248,6 @@ func (f Delete) WithVersion(v int) func(*DeleteRequest) { } // WithVersionType - specific version type. -// func (f Delete) WithVersionType(v string) func(*DeleteRequest) { return func(r *DeleteRequest) { r.VersionType = v @@ -268,7 +255,6 @@ func (f Delete) WithVersionType(v string) func(*DeleteRequest) { } // WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the delete operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1). -// func (f Delete) WithWaitForActiveShards(v string) func(*DeleteRequest) { return func(r *DeleteRequest) { r.WaitForActiveShards = v @@ -276,7 +262,6 @@ func (f Delete) WithWaitForActiveShards(v string) func(*DeleteRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Delete) WithPretty() func(*DeleteRequest) { return func(r *DeleteRequest) { r.Pretty = true @@ -284,7 +269,6 @@ func (f Delete) WithPretty() func(*DeleteRequest) { } // WithHuman makes statistical values human-readable. -// func (f Delete) WithHuman() func(*DeleteRequest) { return func(r *DeleteRequest) { r.Human = true @@ -292,7 +276,6 @@ func (f Delete) WithHuman() func(*DeleteRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Delete) WithErrorTrace() func(*DeleteRequest) { return func(r *DeleteRequest) { r.ErrorTrace = true @@ -300,7 +283,6 @@ func (f Delete) WithErrorTrace() func(*DeleteRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Delete) WithFilterPath(v ...string) func(*DeleteRequest) { return func(r *DeleteRequest) { r.FilterPath = v @@ -308,7 +290,6 @@ func (f Delete) WithFilterPath(v ...string) func(*DeleteRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Delete) WithHeader(h map[string]string) func(*DeleteRequest) { return func(r *DeleteRequest) { if r.Header == nil { @@ -321,7 +302,6 @@ func (f Delete) WithHeader(h map[string]string) func(*DeleteRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Delete) WithOpaqueID(s string) func(*DeleteRequest) { return func(r *DeleteRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_by_query.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_by_query.go index 0b30fe3e21b3..072de1099089 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_by_query.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_by_query.go @@ -49,12 +49,9 @@ func newDeleteByQueryFunc(t Transport) DeleteByQuery { // ----- API Definition ------------------------------------------------------- // DeleteByQuery deletes documents matching the provided query. -// -// type DeleteByQuery func(index []string, body io.Reader, o ...func(*DeleteByQueryRequest)) (*Response, error) // DeleteByQueryRequest configures the Delete By Query API request. -// type DeleteByQueryRequest struct { Index []string DocumentType []string @@ -106,7 +103,6 @@ type DeleteByQueryRequest struct { } // Do executes the request and returns response or error. -// func (r DeleteByQueryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -324,7 +320,6 @@ func (r DeleteByQueryRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f DeleteByQuery) WithContext(v context.Context) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.ctx = v @@ -332,7 +327,6 @@ func (f DeleteByQuery) WithContext(v context.Context) func(*DeleteByQueryRequest } // WithDocumentType - a list of document types to search; leave empty to perform the operation on all types. -// func (f DeleteByQuery) WithDocumentType(v ...string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.DocumentType = v @@ -340,7 +334,6 @@ func (f DeleteByQuery) WithDocumentType(v ...string) func(*DeleteByQueryRequest) } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f DeleteByQuery) WithAllowNoIndices(v bool) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.AllowNoIndices = &v @@ -348,7 +341,6 @@ func (f DeleteByQuery) WithAllowNoIndices(v bool) func(*DeleteByQueryRequest) { } // WithAnalyzer - the analyzer to use for the query string. -// func (f DeleteByQuery) WithAnalyzer(v string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Analyzer = v @@ -356,7 +348,6 @@ func (f DeleteByQuery) WithAnalyzer(v string) func(*DeleteByQueryRequest) { } // WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false). -// func (f DeleteByQuery) WithAnalyzeWildcard(v bool) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.AnalyzeWildcard = &v @@ -364,7 +355,6 @@ func (f DeleteByQuery) WithAnalyzeWildcard(v bool) func(*DeleteByQueryRequest) { } // WithConflicts - what to do when the delete by query hits version conflicts?. -// func (f DeleteByQuery) WithConflicts(v string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Conflicts = v @@ -372,7 +362,6 @@ func (f DeleteByQuery) WithConflicts(v string) func(*DeleteByQueryRequest) { } // WithDefaultOperator - the default operator for query string query (and or or). -// func (f DeleteByQuery) WithDefaultOperator(v string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.DefaultOperator = v @@ -380,7 +369,6 @@ func (f DeleteByQuery) WithDefaultOperator(v string) func(*DeleteByQueryRequest) } // WithDf - the field to use as default where no field prefix is given in the query string. -// func (f DeleteByQuery) WithDf(v string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Df = v @@ -388,7 +376,6 @@ func (f DeleteByQuery) WithDf(v string) func(*DeleteByQueryRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f DeleteByQuery) WithExpandWildcards(v string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.ExpandWildcards = v @@ -396,7 +383,6 @@ func (f DeleteByQuery) WithExpandWildcards(v string) func(*DeleteByQueryRequest) } // WithFrom - starting offset (default: 0). -// func (f DeleteByQuery) WithFrom(v int) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.From = &v @@ -404,7 +390,6 @@ func (f DeleteByQuery) WithFrom(v int) func(*DeleteByQueryRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f DeleteByQuery) WithIgnoreUnavailable(v bool) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.IgnoreUnavailable = &v @@ -412,7 +397,6 @@ func (f DeleteByQuery) WithIgnoreUnavailable(v bool) func(*DeleteByQueryRequest) } // WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored. -// func (f DeleteByQuery) WithLenient(v bool) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Lenient = &v @@ -420,7 +404,6 @@ func (f DeleteByQuery) WithLenient(v bool) func(*DeleteByQueryRequest) { } // WithMaxDocs - maximum number of documents to process (default: all documents). -// func (f DeleteByQuery) WithMaxDocs(v int) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.MaxDocs = &v @@ -428,7 +411,6 @@ func (f DeleteByQuery) WithMaxDocs(v int) func(*DeleteByQueryRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f DeleteByQuery) WithPreference(v string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Preference = v @@ -436,7 +418,6 @@ func (f DeleteByQuery) WithPreference(v string) func(*DeleteByQueryRequest) { } // WithQuery - query in the lucene query string syntax. -// func (f DeleteByQuery) WithQuery(v string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Query = v @@ -444,7 +425,6 @@ func (f DeleteByQuery) WithQuery(v string) func(*DeleteByQueryRequest) { } // WithRefresh - should the effected indexes be refreshed?. -// func (f DeleteByQuery) WithRefresh(v bool) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Refresh = &v @@ -452,7 +432,6 @@ func (f DeleteByQuery) WithRefresh(v bool) func(*DeleteByQueryRequest) { } // WithRequestCache - specify if request cache should be used for this request or not, defaults to index level setting. -// func (f DeleteByQuery) WithRequestCache(v bool) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.RequestCache = &v @@ -460,7 +439,6 @@ func (f DeleteByQuery) WithRequestCache(v bool) func(*DeleteByQueryRequest) { } // WithRequestsPerSecond - the throttle for this request in sub-requests per second. -1 means no throttle.. -// func (f DeleteByQuery) WithRequestsPerSecond(v int) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.RequestsPerSecond = &v @@ -468,7 +446,6 @@ func (f DeleteByQuery) WithRequestsPerSecond(v int) func(*DeleteByQueryRequest) } // WithRouting - a list of specific routing values. -// func (f DeleteByQuery) WithRouting(v ...string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Routing = v @@ -476,7 +453,6 @@ func (f DeleteByQuery) WithRouting(v ...string) func(*DeleteByQueryRequest) { } // WithScroll - specify how long a consistent view of the index should be maintained for scrolled search. -// func (f DeleteByQuery) WithScroll(v time.Duration) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Scroll = v @@ -484,7 +460,6 @@ func (f DeleteByQuery) WithScroll(v time.Duration) func(*DeleteByQueryRequest) { } // WithScrollSize - size on the scroll request powering the delete by query. -// func (f DeleteByQuery) WithScrollSize(v int) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.ScrollSize = &v @@ -492,7 +467,6 @@ func (f DeleteByQuery) WithScrollSize(v int) func(*DeleteByQueryRequest) { } // WithSearchTimeout - explicit timeout for each search request. defaults to no timeout.. -// func (f DeleteByQuery) WithSearchTimeout(v time.Duration) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.SearchTimeout = v @@ -500,7 +474,6 @@ func (f DeleteByQuery) WithSearchTimeout(v time.Duration) func(*DeleteByQueryReq } // WithSearchType - search operation type. -// func (f DeleteByQuery) WithSearchType(v string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.SearchType = v @@ -508,7 +481,6 @@ func (f DeleteByQuery) WithSearchType(v string) func(*DeleteByQueryRequest) { } // WithSize - deprecated, please use `max_docs` instead. -// func (f DeleteByQuery) WithSize(v int) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Size = &v @@ -516,7 +488,6 @@ func (f DeleteByQuery) WithSize(v int) func(*DeleteByQueryRequest) { } // WithSlices - the number of slices this task should be divided into. defaults to 1, meaning the task isn't sliced into subtasks. can be set to `auto`.. -// func (f DeleteByQuery) WithSlices(v interface{}) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Slices = v @@ -524,7 +495,6 @@ func (f DeleteByQuery) WithSlices(v interface{}) func(*DeleteByQueryRequest) { } // WithSort - a list of : pairs. -// func (f DeleteByQuery) WithSort(v ...string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Sort = v @@ -532,7 +502,6 @@ func (f DeleteByQuery) WithSort(v ...string) func(*DeleteByQueryRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f DeleteByQuery) WithSource(v ...string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Source = v @@ -540,7 +509,6 @@ func (f DeleteByQuery) WithSource(v ...string) func(*DeleteByQueryRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f DeleteByQuery) WithSourceExcludes(v ...string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.SourceExcludes = v @@ -548,7 +516,6 @@ func (f DeleteByQuery) WithSourceExcludes(v ...string) func(*DeleteByQueryReques } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f DeleteByQuery) WithSourceIncludes(v ...string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.SourceIncludes = v @@ -556,7 +523,6 @@ func (f DeleteByQuery) WithSourceIncludes(v ...string) func(*DeleteByQueryReques } // WithStats - specific 'tag' of the request for logging and statistical purposes. -// func (f DeleteByQuery) WithStats(v ...string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Stats = v @@ -564,7 +530,6 @@ func (f DeleteByQuery) WithStats(v ...string) func(*DeleteByQueryRequest) { } // WithTerminateAfter - the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.. -// func (f DeleteByQuery) WithTerminateAfter(v int) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.TerminateAfter = &v @@ -572,7 +537,6 @@ func (f DeleteByQuery) WithTerminateAfter(v int) func(*DeleteByQueryRequest) { } // WithTimeout - time each individual bulk request should wait for shards that are unavailable.. -// func (f DeleteByQuery) WithTimeout(v time.Duration) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Timeout = v @@ -580,7 +544,6 @@ func (f DeleteByQuery) WithTimeout(v time.Duration) func(*DeleteByQueryRequest) } // WithVersion - specify whether to return document version as part of a hit. -// func (f DeleteByQuery) WithVersion(v bool) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Version = &v @@ -588,7 +551,6 @@ func (f DeleteByQuery) WithVersion(v bool) func(*DeleteByQueryRequest) { } // WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the delete by query operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1). -// func (f DeleteByQuery) WithWaitForActiveShards(v string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.WaitForActiveShards = v @@ -596,7 +558,6 @@ func (f DeleteByQuery) WithWaitForActiveShards(v string) func(*DeleteByQueryRequ } // WithWaitForCompletion - should the request should block until the delete by query is complete.. -// func (f DeleteByQuery) WithWaitForCompletion(v bool) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.WaitForCompletion = &v @@ -604,7 +565,6 @@ func (f DeleteByQuery) WithWaitForCompletion(v bool) func(*DeleteByQueryRequest) } // WithPretty makes the response body pretty-printed. -// func (f DeleteByQuery) WithPretty() func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Pretty = true @@ -612,7 +572,6 @@ func (f DeleteByQuery) WithPretty() func(*DeleteByQueryRequest) { } // WithHuman makes statistical values human-readable. -// func (f DeleteByQuery) WithHuman() func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.Human = true @@ -620,7 +579,6 @@ func (f DeleteByQuery) WithHuman() func(*DeleteByQueryRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f DeleteByQuery) WithErrorTrace() func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.ErrorTrace = true @@ -628,7 +586,6 @@ func (f DeleteByQuery) WithErrorTrace() func(*DeleteByQueryRequest) { } // WithFilterPath filters the properties of the response body. -// func (f DeleteByQuery) WithFilterPath(v ...string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { r.FilterPath = v @@ -636,7 +593,6 @@ func (f DeleteByQuery) WithFilterPath(v ...string) func(*DeleteByQueryRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f DeleteByQuery) WithHeader(h map[string]string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { if r.Header == nil { @@ -649,7 +605,6 @@ func (f DeleteByQuery) WithHeader(h map[string]string) func(*DeleteByQueryReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f DeleteByQuery) WithOpaqueID(s string) func(*DeleteByQueryRequest) { return func(r *DeleteByQueryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_by_query_rethrottle.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_by_query_rethrottle.go index befdf5adb320..9bac80ea4139 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_by_query_rethrottle.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_by_query_rethrottle.go @@ -46,12 +46,9 @@ func newDeleteByQueryRethrottleFunc(t Transport) DeleteByQueryRethrottle { // ----- API Definition ------------------------------------------------------- // DeleteByQueryRethrottle changes the number of requests per second for a particular Delete By Query operation. -// -// type DeleteByQueryRethrottle func(task_id string, requests_per_second *int, o ...func(*DeleteByQueryRethrottleRequest)) (*Response, error) // DeleteByQueryRethrottleRequest configures the Delete By Query Rethrottle API request. -// type DeleteByQueryRethrottleRequest struct { TaskID string @@ -68,7 +65,6 @@ type DeleteByQueryRethrottleRequest struct { } // Do executes the request and returns response or error. -// func (r DeleteByQueryRethrottleRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -152,7 +148,6 @@ func (r DeleteByQueryRethrottleRequest) Do(ctx context.Context, transport Transp } // WithContext sets the request context. -// func (f DeleteByQueryRethrottle) WithContext(v context.Context) func(*DeleteByQueryRethrottleRequest) { return func(r *DeleteByQueryRethrottleRequest) { r.ctx = v @@ -160,7 +155,6 @@ func (f DeleteByQueryRethrottle) WithContext(v context.Context) func(*DeleteByQu } // WithRequestsPerSecond - the throttle to set on this request in floating sub-requests per second. -1 means set no throttle.. -// func (f DeleteByQueryRethrottle) WithRequestsPerSecond(v int) func(*DeleteByQueryRethrottleRequest) { return func(r *DeleteByQueryRethrottleRequest) { r.RequestsPerSecond = &v @@ -168,7 +162,6 @@ func (f DeleteByQueryRethrottle) WithRequestsPerSecond(v int) func(*DeleteByQuer } // WithPretty makes the response body pretty-printed. -// func (f DeleteByQueryRethrottle) WithPretty() func(*DeleteByQueryRethrottleRequest) { return func(r *DeleteByQueryRethrottleRequest) { r.Pretty = true @@ -176,7 +169,6 @@ func (f DeleteByQueryRethrottle) WithPretty() func(*DeleteByQueryRethrottleReque } // WithHuman makes statistical values human-readable. -// func (f DeleteByQueryRethrottle) WithHuman() func(*DeleteByQueryRethrottleRequest) { return func(r *DeleteByQueryRethrottleRequest) { r.Human = true @@ -184,7 +176,6 @@ func (f DeleteByQueryRethrottle) WithHuman() func(*DeleteByQueryRethrottleReques } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f DeleteByQueryRethrottle) WithErrorTrace() func(*DeleteByQueryRethrottleRequest) { return func(r *DeleteByQueryRethrottleRequest) { r.ErrorTrace = true @@ -192,7 +183,6 @@ func (f DeleteByQueryRethrottle) WithErrorTrace() func(*DeleteByQueryRethrottleR } // WithFilterPath filters the properties of the response body. -// func (f DeleteByQueryRethrottle) WithFilterPath(v ...string) func(*DeleteByQueryRethrottleRequest) { return func(r *DeleteByQueryRethrottleRequest) { r.FilterPath = v @@ -200,7 +190,6 @@ func (f DeleteByQueryRethrottle) WithFilterPath(v ...string) func(*DeleteByQuery } // WithHeader adds the headers to the HTTP request. -// func (f DeleteByQueryRethrottle) WithHeader(h map[string]string) func(*DeleteByQueryRethrottleRequest) { return func(r *DeleteByQueryRethrottleRequest) { if r.Header == nil { @@ -213,7 +202,6 @@ func (f DeleteByQueryRethrottle) WithHeader(h map[string]string) func(*DeleteByQ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f DeleteByQueryRethrottle) WithOpaqueID(s string) func(*DeleteByQueryRethrottleRequest) { return func(r *DeleteByQueryRethrottleRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_script.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_script.go index e2a7aee61f5b..5557456a9a81 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_script.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.delete_script.go @@ -46,12 +46,9 @@ func newDeleteScriptFunc(t Transport) DeleteScript { // ----- API Definition ------------------------------------------------------- // DeleteScript deletes a script. -// -// type DeleteScript func(id string, o ...func(*DeleteScriptRequest)) (*Response, error) // DeleteScriptRequest configures the Delete Script API request. -// type DeleteScriptRequest struct { ScriptID string @@ -69,7 +66,6 @@ type DeleteScriptRequest struct { } // Do executes the request and returns response or error. -// func (r DeleteScriptRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -155,7 +151,6 @@ func (r DeleteScriptRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f DeleteScript) WithContext(v context.Context) func(*DeleteScriptRequest) { return func(r *DeleteScriptRequest) { r.ctx = v @@ -163,7 +158,6 @@ func (f DeleteScript) WithContext(v context.Context) func(*DeleteScriptRequest) } // WithMasterTimeout - specify timeout for connection to master. -// func (f DeleteScript) WithMasterTimeout(v time.Duration) func(*DeleteScriptRequest) { return func(r *DeleteScriptRequest) { r.MasterTimeout = v @@ -171,7 +165,6 @@ func (f DeleteScript) WithMasterTimeout(v time.Duration) func(*DeleteScriptReque } // WithTimeout - explicit operation timeout. -// func (f DeleteScript) WithTimeout(v time.Duration) func(*DeleteScriptRequest) { return func(r *DeleteScriptRequest) { r.Timeout = v @@ -179,7 +172,6 @@ func (f DeleteScript) WithTimeout(v time.Duration) func(*DeleteScriptRequest) { } // WithPretty makes the response body pretty-printed. -// func (f DeleteScript) WithPretty() func(*DeleteScriptRequest) { return func(r *DeleteScriptRequest) { r.Pretty = true @@ -187,7 +179,6 @@ func (f DeleteScript) WithPretty() func(*DeleteScriptRequest) { } // WithHuman makes statistical values human-readable. -// func (f DeleteScript) WithHuman() func(*DeleteScriptRequest) { return func(r *DeleteScriptRequest) { r.Human = true @@ -195,7 +186,6 @@ func (f DeleteScript) WithHuman() func(*DeleteScriptRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f DeleteScript) WithErrorTrace() func(*DeleteScriptRequest) { return func(r *DeleteScriptRequest) { r.ErrorTrace = true @@ -203,7 +193,6 @@ func (f DeleteScript) WithErrorTrace() func(*DeleteScriptRequest) { } // WithFilterPath filters the properties of the response body. -// func (f DeleteScript) WithFilterPath(v ...string) func(*DeleteScriptRequest) { return func(r *DeleteScriptRequest) { r.FilterPath = v @@ -211,7 +200,6 @@ func (f DeleteScript) WithFilterPath(v ...string) func(*DeleteScriptRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f DeleteScript) WithHeader(h map[string]string) func(*DeleteScriptRequest) { return func(r *DeleteScriptRequest) { if r.Header == nil { @@ -224,7 +212,6 @@ func (f DeleteScript) WithHeader(h map[string]string) func(*DeleteScriptRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f DeleteScript) WithOpaqueID(s string) func(*DeleteScriptRequest) { return func(r *DeleteScriptRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.exists.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.exists.go index 2918844a883b..c6baed82703b 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.exists.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.exists.go @@ -46,12 +46,9 @@ func newExistsFunc(t Transport) Exists { // ----- API Definition ------------------------------------------------------- // Exists returns information about whether a document exists in an index. -// -// type Exists func(index string, id string, o ...func(*ExistsRequest)) (*Response, error) // ExistsRequest configures the Exists API request. -// type ExistsRequest struct { Index string DocumentType string @@ -79,7 +76,6 @@ type ExistsRequest struct { } // Do executes the request and returns response or error. -// func (r ExistsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -205,7 +201,6 @@ func (r ExistsRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f Exists) WithContext(v context.Context) func(*ExistsRequest) { return func(r *ExistsRequest) { r.ctx = v @@ -213,7 +208,6 @@ func (f Exists) WithContext(v context.Context) func(*ExistsRequest) { } // WithDocumentType - the type of the document (use `_all` to fetch the first document matching the ID across all types). -// func (f Exists) WithDocumentType(v string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.DocumentType = v @@ -221,7 +215,6 @@ func (f Exists) WithDocumentType(v string) func(*ExistsRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f Exists) WithPreference(v string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.Preference = v @@ -229,7 +222,6 @@ func (f Exists) WithPreference(v string) func(*ExistsRequest) { } // WithRealtime - specify whether to perform the operation in realtime or search mode. -// func (f Exists) WithRealtime(v bool) func(*ExistsRequest) { return func(r *ExistsRequest) { r.Realtime = &v @@ -237,7 +229,6 @@ func (f Exists) WithRealtime(v bool) func(*ExistsRequest) { } // WithRefresh - refresh the shard containing the document before performing the operation. -// func (f Exists) WithRefresh(v bool) func(*ExistsRequest) { return func(r *ExistsRequest) { r.Refresh = &v @@ -245,7 +236,6 @@ func (f Exists) WithRefresh(v bool) func(*ExistsRequest) { } // WithRouting - specific routing value. -// func (f Exists) WithRouting(v string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.Routing = v @@ -253,7 +243,6 @@ func (f Exists) WithRouting(v string) func(*ExistsRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f Exists) WithSource(v ...string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.Source = v @@ -261,7 +250,6 @@ func (f Exists) WithSource(v ...string) func(*ExistsRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f Exists) WithSourceExcludes(v ...string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.SourceExcludes = v @@ -269,7 +257,6 @@ func (f Exists) WithSourceExcludes(v ...string) func(*ExistsRequest) { } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f Exists) WithSourceIncludes(v ...string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.SourceIncludes = v @@ -277,7 +264,6 @@ func (f Exists) WithSourceIncludes(v ...string) func(*ExistsRequest) { } // WithStoredFields - a list of stored fields to return in the response. -// func (f Exists) WithStoredFields(v ...string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.StoredFields = v @@ -285,7 +271,6 @@ func (f Exists) WithStoredFields(v ...string) func(*ExistsRequest) { } // WithVersion - explicit version number for concurrency control. -// func (f Exists) WithVersion(v int) func(*ExistsRequest) { return func(r *ExistsRequest) { r.Version = &v @@ -293,7 +278,6 @@ func (f Exists) WithVersion(v int) func(*ExistsRequest) { } // WithVersionType - specific version type. -// func (f Exists) WithVersionType(v string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.VersionType = v @@ -301,7 +285,6 @@ func (f Exists) WithVersionType(v string) func(*ExistsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Exists) WithPretty() func(*ExistsRequest) { return func(r *ExistsRequest) { r.Pretty = true @@ -309,7 +292,6 @@ func (f Exists) WithPretty() func(*ExistsRequest) { } // WithHuman makes statistical values human-readable. -// func (f Exists) WithHuman() func(*ExistsRequest) { return func(r *ExistsRequest) { r.Human = true @@ -317,7 +299,6 @@ func (f Exists) WithHuman() func(*ExistsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Exists) WithErrorTrace() func(*ExistsRequest) { return func(r *ExistsRequest) { r.ErrorTrace = true @@ -325,7 +306,6 @@ func (f Exists) WithErrorTrace() func(*ExistsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Exists) WithFilterPath(v ...string) func(*ExistsRequest) { return func(r *ExistsRequest) { r.FilterPath = v @@ -333,7 +313,6 @@ func (f Exists) WithFilterPath(v ...string) func(*ExistsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Exists) WithHeader(h map[string]string) func(*ExistsRequest) { return func(r *ExistsRequest) { if r.Header == nil { @@ -346,7 +325,6 @@ func (f Exists) WithHeader(h map[string]string) func(*ExistsRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Exists) WithOpaqueID(s string) func(*ExistsRequest) { return func(r *ExistsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.exists_source.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.exists_source.go index b6e702a67e1c..252358f95532 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.exists_source.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.exists_source.go @@ -46,12 +46,9 @@ func newExistsSourceFunc(t Transport) ExistsSource { // ----- API Definition ------------------------------------------------------- // ExistsSource returns information about whether a document source exists in an index. -// -// type ExistsSource func(index string, id string, o ...func(*ExistsSourceRequest)) (*Response, error) // ExistsSourceRequest configures the Exists Source API request. -// type ExistsSourceRequest struct { Index string DocumentType string @@ -78,7 +75,6 @@ type ExistsSourceRequest struct { } // Do executes the request and returns response or error. -// func (r ExistsSourceRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -198,7 +194,6 @@ func (r ExistsSourceRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f ExistsSource) WithContext(v context.Context) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.ctx = v @@ -206,7 +201,6 @@ func (f ExistsSource) WithContext(v context.Context) func(*ExistsSourceRequest) } // WithDocumentType - the type of the document; deprecated and optional starting with 7.0. -// func (f ExistsSource) WithDocumentType(v string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.DocumentType = v @@ -214,7 +208,6 @@ func (f ExistsSource) WithDocumentType(v string) func(*ExistsSourceRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f ExistsSource) WithPreference(v string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.Preference = v @@ -222,7 +215,6 @@ func (f ExistsSource) WithPreference(v string) func(*ExistsSourceRequest) { } // WithRealtime - specify whether to perform the operation in realtime or search mode. -// func (f ExistsSource) WithRealtime(v bool) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.Realtime = &v @@ -230,7 +222,6 @@ func (f ExistsSource) WithRealtime(v bool) func(*ExistsSourceRequest) { } // WithRefresh - refresh the shard containing the document before performing the operation. -// func (f ExistsSource) WithRefresh(v bool) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.Refresh = &v @@ -238,7 +229,6 @@ func (f ExistsSource) WithRefresh(v bool) func(*ExistsSourceRequest) { } // WithRouting - specific routing value. -// func (f ExistsSource) WithRouting(v string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.Routing = v @@ -246,7 +236,6 @@ func (f ExistsSource) WithRouting(v string) func(*ExistsSourceRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f ExistsSource) WithSource(v ...string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.Source = v @@ -254,7 +243,6 @@ func (f ExistsSource) WithSource(v ...string) func(*ExistsSourceRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f ExistsSource) WithSourceExcludes(v ...string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.SourceExcludes = v @@ -262,7 +250,6 @@ func (f ExistsSource) WithSourceExcludes(v ...string) func(*ExistsSourceRequest) } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f ExistsSource) WithSourceIncludes(v ...string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.SourceIncludes = v @@ -270,7 +257,6 @@ func (f ExistsSource) WithSourceIncludes(v ...string) func(*ExistsSourceRequest) } // WithVersion - explicit version number for concurrency control. -// func (f ExistsSource) WithVersion(v int) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.Version = &v @@ -278,7 +264,6 @@ func (f ExistsSource) WithVersion(v int) func(*ExistsSourceRequest) { } // WithVersionType - specific version type. -// func (f ExistsSource) WithVersionType(v string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.VersionType = v @@ -286,7 +271,6 @@ func (f ExistsSource) WithVersionType(v string) func(*ExistsSourceRequest) { } // WithPretty makes the response body pretty-printed. -// func (f ExistsSource) WithPretty() func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.Pretty = true @@ -294,7 +278,6 @@ func (f ExistsSource) WithPretty() func(*ExistsSourceRequest) { } // WithHuman makes statistical values human-readable. -// func (f ExistsSource) WithHuman() func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.Human = true @@ -302,7 +285,6 @@ func (f ExistsSource) WithHuman() func(*ExistsSourceRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ExistsSource) WithErrorTrace() func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.ErrorTrace = true @@ -310,7 +292,6 @@ func (f ExistsSource) WithErrorTrace() func(*ExistsSourceRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ExistsSource) WithFilterPath(v ...string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { r.FilterPath = v @@ -318,7 +299,6 @@ func (f ExistsSource) WithFilterPath(v ...string) func(*ExistsSourceRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f ExistsSource) WithHeader(h map[string]string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { if r.Header == nil { @@ -331,7 +311,6 @@ func (f ExistsSource) WithHeader(h map[string]string) func(*ExistsSourceRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ExistsSource) WithOpaqueID(s string) func(*ExistsSourceRequest) { return func(r *ExistsSourceRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.explain.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.explain.go index cc855a29b711..326c465a45a9 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.explain.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.explain.go @@ -47,12 +47,9 @@ func newExplainFunc(t Transport) Explain { // ----- API Definition ------------------------------------------------------- // Explain returns information about why a specific matches (or doesn't match) a query. -// -// type Explain func(index string, id string, o ...func(*ExplainRequest)) (*Response, error) // ExplainRequest configures the Explain API request. -// type ExplainRequest struct { Index string DocumentType string @@ -84,7 +81,6 @@ type ExplainRequest struct { } // Do executes the request and returns response or error. -// func (r ExplainRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -224,7 +220,6 @@ func (r ExplainRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f Explain) WithContext(v context.Context) func(*ExplainRequest) { return func(r *ExplainRequest) { r.ctx = v @@ -232,7 +227,6 @@ func (f Explain) WithContext(v context.Context) func(*ExplainRequest) { } // WithBody - The query definition using the Query DSL. -// func (f Explain) WithBody(v io.Reader) func(*ExplainRequest) { return func(r *ExplainRequest) { r.Body = v @@ -240,7 +234,6 @@ func (f Explain) WithBody(v io.Reader) func(*ExplainRequest) { } // WithDocumentType - the type of the document. -// func (f Explain) WithDocumentType(v string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.DocumentType = v @@ -248,7 +241,6 @@ func (f Explain) WithDocumentType(v string) func(*ExplainRequest) { } // WithAnalyzer - the analyzer for the query string query. -// func (f Explain) WithAnalyzer(v string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.Analyzer = v @@ -256,7 +248,6 @@ func (f Explain) WithAnalyzer(v string) func(*ExplainRequest) { } // WithAnalyzeWildcard - specify whether wildcards and prefix queries in the query string query should be analyzed (default: false). -// func (f Explain) WithAnalyzeWildcard(v bool) func(*ExplainRequest) { return func(r *ExplainRequest) { r.AnalyzeWildcard = &v @@ -264,7 +255,6 @@ func (f Explain) WithAnalyzeWildcard(v bool) func(*ExplainRequest) { } // WithDefaultOperator - the default operator for query string query (and or or). -// func (f Explain) WithDefaultOperator(v string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.DefaultOperator = v @@ -272,7 +262,6 @@ func (f Explain) WithDefaultOperator(v string) func(*ExplainRequest) { } // WithDf - the default field for query string query (default: _all). -// func (f Explain) WithDf(v string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.Df = v @@ -280,7 +269,6 @@ func (f Explain) WithDf(v string) func(*ExplainRequest) { } // WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored. -// func (f Explain) WithLenient(v bool) func(*ExplainRequest) { return func(r *ExplainRequest) { r.Lenient = &v @@ -288,7 +276,6 @@ func (f Explain) WithLenient(v bool) func(*ExplainRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f Explain) WithPreference(v string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.Preference = v @@ -296,7 +283,6 @@ func (f Explain) WithPreference(v string) func(*ExplainRequest) { } // WithQuery - query in the lucene query string syntax. -// func (f Explain) WithQuery(v string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.Query = v @@ -304,7 +290,6 @@ func (f Explain) WithQuery(v string) func(*ExplainRequest) { } // WithRouting - specific routing value. -// func (f Explain) WithRouting(v string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.Routing = v @@ -312,7 +297,6 @@ func (f Explain) WithRouting(v string) func(*ExplainRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f Explain) WithSource(v ...string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.Source = v @@ -320,7 +304,6 @@ func (f Explain) WithSource(v ...string) func(*ExplainRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f Explain) WithSourceExcludes(v ...string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.SourceExcludes = v @@ -328,7 +311,6 @@ func (f Explain) WithSourceExcludes(v ...string) func(*ExplainRequest) { } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f Explain) WithSourceIncludes(v ...string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.SourceIncludes = v @@ -336,7 +318,6 @@ func (f Explain) WithSourceIncludes(v ...string) func(*ExplainRequest) { } // WithStoredFields - a list of stored fields to return in the response. -// func (f Explain) WithStoredFields(v ...string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.StoredFields = v @@ -344,7 +325,6 @@ func (f Explain) WithStoredFields(v ...string) func(*ExplainRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Explain) WithPretty() func(*ExplainRequest) { return func(r *ExplainRequest) { r.Pretty = true @@ -352,7 +332,6 @@ func (f Explain) WithPretty() func(*ExplainRequest) { } // WithHuman makes statistical values human-readable. -// func (f Explain) WithHuman() func(*ExplainRequest) { return func(r *ExplainRequest) { r.Human = true @@ -360,7 +339,6 @@ func (f Explain) WithHuman() func(*ExplainRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Explain) WithErrorTrace() func(*ExplainRequest) { return func(r *ExplainRequest) { r.ErrorTrace = true @@ -368,7 +346,6 @@ func (f Explain) WithErrorTrace() func(*ExplainRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Explain) WithFilterPath(v ...string) func(*ExplainRequest) { return func(r *ExplainRequest) { r.FilterPath = v @@ -376,7 +353,6 @@ func (f Explain) WithFilterPath(v ...string) func(*ExplainRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Explain) WithHeader(h map[string]string) func(*ExplainRequest) { return func(r *ExplainRequest) { if r.Header == nil { @@ -389,7 +365,6 @@ func (f Explain) WithHeader(h map[string]string) func(*ExplainRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Explain) WithOpaqueID(s string) func(*ExplainRequest) { return func(r *ExplainRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.field_caps.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.field_caps.go index 5dfedc89655d..a4220732f777 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.field_caps.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.field_caps.go @@ -47,12 +47,9 @@ func newFieldCapsFunc(t Transport) FieldCaps { // ----- API Definition ------------------------------------------------------- // FieldCaps returns the information about the capabilities of fields among multiple indices. -// -// type FieldCaps func(o ...func(*FieldCapsRequest)) (*Response, error) // FieldCapsRequest configures the Field Caps API request. -// type FieldCapsRequest struct { Index []string @@ -75,7 +72,6 @@ type FieldCapsRequest struct { } // Do executes the request and returns response or error. -// func (r FieldCapsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -179,7 +175,6 @@ func (r FieldCapsRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f FieldCaps) WithContext(v context.Context) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.ctx = v @@ -187,7 +182,6 @@ func (f FieldCaps) WithContext(v context.Context) func(*FieldCapsRequest) { } // WithBody - An index filter specified with the Query DSL. -// func (f FieldCaps) WithBody(v io.Reader) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.Body = v @@ -195,7 +189,6 @@ func (f FieldCaps) WithBody(v io.Reader) func(*FieldCapsRequest) { } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f FieldCaps) WithIndex(v ...string) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.Index = v @@ -203,7 +196,6 @@ func (f FieldCaps) WithIndex(v ...string) func(*FieldCapsRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f FieldCaps) WithAllowNoIndices(v bool) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.AllowNoIndices = &v @@ -211,7 +203,6 @@ func (f FieldCaps) WithAllowNoIndices(v bool) func(*FieldCapsRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f FieldCaps) WithExpandWildcards(v string) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.ExpandWildcards = v @@ -219,7 +210,6 @@ func (f FieldCaps) WithExpandWildcards(v string) func(*FieldCapsRequest) { } // WithFields - a list of field names. -// func (f FieldCaps) WithFields(v ...string) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.Fields = v @@ -227,7 +217,6 @@ func (f FieldCaps) WithFields(v ...string) func(*FieldCapsRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f FieldCaps) WithIgnoreUnavailable(v bool) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.IgnoreUnavailable = &v @@ -235,7 +224,6 @@ func (f FieldCaps) WithIgnoreUnavailable(v bool) func(*FieldCapsRequest) { } // WithIncludeUnmapped - indicates whether unmapped fields should be included in the response.. -// func (f FieldCaps) WithIncludeUnmapped(v bool) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.IncludeUnmapped = &v @@ -243,7 +231,6 @@ func (f FieldCaps) WithIncludeUnmapped(v bool) func(*FieldCapsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f FieldCaps) WithPretty() func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.Pretty = true @@ -251,7 +238,6 @@ func (f FieldCaps) WithPretty() func(*FieldCapsRequest) { } // WithHuman makes statistical values human-readable. -// func (f FieldCaps) WithHuman() func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.Human = true @@ -259,7 +245,6 @@ func (f FieldCaps) WithHuman() func(*FieldCapsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f FieldCaps) WithErrorTrace() func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.ErrorTrace = true @@ -267,7 +252,6 @@ func (f FieldCaps) WithErrorTrace() func(*FieldCapsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f FieldCaps) WithFilterPath(v ...string) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { r.FilterPath = v @@ -275,7 +259,6 @@ func (f FieldCaps) WithFilterPath(v ...string) func(*FieldCapsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f FieldCaps) WithHeader(h map[string]string) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { if r.Header == nil { @@ -288,7 +271,6 @@ func (f FieldCaps) WithHeader(h map[string]string) func(*FieldCapsRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f FieldCaps) WithOpaqueID(s string) func(*FieldCapsRequest) { return func(r *FieldCapsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get.go index 615dd7b63f27..013e28692f7f 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get.go @@ -46,12 +46,9 @@ func newGetFunc(t Transport) Get { // ----- API Definition ------------------------------------------------------- // Get returns a document. -// -// type Get func(index string, id string, o ...func(*GetRequest)) (*Response, error) // GetRequest configures the Get API request. -// type GetRequest struct { Index string DocumentType string @@ -79,7 +76,6 @@ type GetRequest struct { } // Do executes the request and returns response or error. -// func (r GetRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -205,7 +201,6 @@ func (r GetRequest) Do(ctx context.Context, transport Transport) (*Response, err } // WithContext sets the request context. -// func (f Get) WithContext(v context.Context) func(*GetRequest) { return func(r *GetRequest) { r.ctx = v @@ -213,7 +208,6 @@ func (f Get) WithContext(v context.Context) func(*GetRequest) { } // WithDocumentType - the type of the document (use `_all` to fetch the first document matching the ID across all types). -// func (f Get) WithDocumentType(v string) func(*GetRequest) { return func(r *GetRequest) { r.DocumentType = v @@ -221,7 +215,6 @@ func (f Get) WithDocumentType(v string) func(*GetRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f Get) WithPreference(v string) func(*GetRequest) { return func(r *GetRequest) { r.Preference = v @@ -229,7 +222,6 @@ func (f Get) WithPreference(v string) func(*GetRequest) { } // WithRealtime - specify whether to perform the operation in realtime or search mode. -// func (f Get) WithRealtime(v bool) func(*GetRequest) { return func(r *GetRequest) { r.Realtime = &v @@ -237,7 +229,6 @@ func (f Get) WithRealtime(v bool) func(*GetRequest) { } // WithRefresh - refresh the shard containing the document before performing the operation. -// func (f Get) WithRefresh(v bool) func(*GetRequest) { return func(r *GetRequest) { r.Refresh = &v @@ -245,7 +236,6 @@ func (f Get) WithRefresh(v bool) func(*GetRequest) { } // WithRouting - specific routing value. -// func (f Get) WithRouting(v string) func(*GetRequest) { return func(r *GetRequest) { r.Routing = v @@ -253,7 +243,6 @@ func (f Get) WithRouting(v string) func(*GetRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f Get) WithSource(v ...string) func(*GetRequest) { return func(r *GetRequest) { r.Source = v @@ -261,7 +250,6 @@ func (f Get) WithSource(v ...string) func(*GetRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f Get) WithSourceExcludes(v ...string) func(*GetRequest) { return func(r *GetRequest) { r.SourceExcludes = v @@ -269,7 +257,6 @@ func (f Get) WithSourceExcludes(v ...string) func(*GetRequest) { } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f Get) WithSourceIncludes(v ...string) func(*GetRequest) { return func(r *GetRequest) { r.SourceIncludes = v @@ -277,7 +264,6 @@ func (f Get) WithSourceIncludes(v ...string) func(*GetRequest) { } // WithStoredFields - a list of stored fields to return in the response. -// func (f Get) WithStoredFields(v ...string) func(*GetRequest) { return func(r *GetRequest) { r.StoredFields = v @@ -285,7 +271,6 @@ func (f Get) WithStoredFields(v ...string) func(*GetRequest) { } // WithVersion - explicit version number for concurrency control. -// func (f Get) WithVersion(v int) func(*GetRequest) { return func(r *GetRequest) { r.Version = &v @@ -293,7 +278,6 @@ func (f Get) WithVersion(v int) func(*GetRequest) { } // WithVersionType - specific version type. -// func (f Get) WithVersionType(v string) func(*GetRequest) { return func(r *GetRequest) { r.VersionType = v @@ -301,7 +285,6 @@ func (f Get) WithVersionType(v string) func(*GetRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Get) WithPretty() func(*GetRequest) { return func(r *GetRequest) { r.Pretty = true @@ -309,7 +292,6 @@ func (f Get) WithPretty() func(*GetRequest) { } // WithHuman makes statistical values human-readable. -// func (f Get) WithHuman() func(*GetRequest) { return func(r *GetRequest) { r.Human = true @@ -317,7 +299,6 @@ func (f Get) WithHuman() func(*GetRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Get) WithErrorTrace() func(*GetRequest) { return func(r *GetRequest) { r.ErrorTrace = true @@ -325,7 +306,6 @@ func (f Get) WithErrorTrace() func(*GetRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Get) WithFilterPath(v ...string) func(*GetRequest) { return func(r *GetRequest) { r.FilterPath = v @@ -333,7 +313,6 @@ func (f Get) WithFilterPath(v ...string) func(*GetRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Get) WithHeader(h map[string]string) func(*GetRequest) { return func(r *GetRequest) { if r.Header == nil { @@ -346,7 +325,6 @@ func (f Get) WithHeader(h map[string]string) func(*GetRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Get) WithOpaqueID(s string) func(*GetRequest) { return func(r *GetRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script.go index 4af9cc22789e..cc0a91e75491 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script.go @@ -46,12 +46,9 @@ func newGetScriptFunc(t Transport) GetScript { // ----- API Definition ------------------------------------------------------- // GetScript returns a script. -// -// type GetScript func(id string, o ...func(*GetScriptRequest)) (*Response, error) // GetScriptRequest configures the Get Script API request. -// type GetScriptRequest struct { ScriptID string @@ -68,7 +65,6 @@ type GetScriptRequest struct { } // Do executes the request and returns response or error. -// func (r GetScriptRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -150,7 +146,6 @@ func (r GetScriptRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f GetScript) WithContext(v context.Context) func(*GetScriptRequest) { return func(r *GetScriptRequest) { r.ctx = v @@ -158,7 +153,6 @@ func (f GetScript) WithContext(v context.Context) func(*GetScriptRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f GetScript) WithMasterTimeout(v time.Duration) func(*GetScriptRequest) { return func(r *GetScriptRequest) { r.MasterTimeout = v @@ -166,7 +160,6 @@ func (f GetScript) WithMasterTimeout(v time.Duration) func(*GetScriptRequest) { } // WithPretty makes the response body pretty-printed. -// func (f GetScript) WithPretty() func(*GetScriptRequest) { return func(r *GetScriptRequest) { r.Pretty = true @@ -174,7 +167,6 @@ func (f GetScript) WithPretty() func(*GetScriptRequest) { } // WithHuman makes statistical values human-readable. -// func (f GetScript) WithHuman() func(*GetScriptRequest) { return func(r *GetScriptRequest) { r.Human = true @@ -182,7 +174,6 @@ func (f GetScript) WithHuman() func(*GetScriptRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f GetScript) WithErrorTrace() func(*GetScriptRequest) { return func(r *GetScriptRequest) { r.ErrorTrace = true @@ -190,7 +181,6 @@ func (f GetScript) WithErrorTrace() func(*GetScriptRequest) { } // WithFilterPath filters the properties of the response body. -// func (f GetScript) WithFilterPath(v ...string) func(*GetScriptRequest) { return func(r *GetScriptRequest) { r.FilterPath = v @@ -198,7 +188,6 @@ func (f GetScript) WithFilterPath(v ...string) func(*GetScriptRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f GetScript) WithHeader(h map[string]string) func(*GetScriptRequest) { return func(r *GetScriptRequest) { if r.Header == nil { @@ -211,7 +200,6 @@ func (f GetScript) WithHeader(h map[string]string) func(*GetScriptRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f GetScript) WithOpaqueID(s string) func(*GetScriptRequest) { return func(r *GetScriptRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script_context.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script_context.go index 769a3d0c0979..9cef1b274bee 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script_context.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script_context.go @@ -47,12 +47,9 @@ func newGetScriptContextFunc(t Transport) GetScriptContext { // GetScriptContext returns all script contexts. // // This API is experimental. -// -// type GetScriptContext func(o ...func(*GetScriptContextRequest)) (*Response, error) // GetScriptContextRequest configures the Get Script Context API request. -// type GetScriptContextRequest struct { Pretty bool Human bool @@ -65,7 +62,6 @@ type GetScriptContextRequest struct { } // Do executes the request and returns response or error. -// func (r GetScriptContextRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -140,7 +136,6 @@ func (r GetScriptContextRequest) Do(ctx context.Context, transport Transport) (* } // WithContext sets the request context. -// func (f GetScriptContext) WithContext(v context.Context) func(*GetScriptContextRequest) { return func(r *GetScriptContextRequest) { r.ctx = v @@ -148,7 +143,6 @@ func (f GetScriptContext) WithContext(v context.Context) func(*GetScriptContextR } // WithPretty makes the response body pretty-printed. -// func (f GetScriptContext) WithPretty() func(*GetScriptContextRequest) { return func(r *GetScriptContextRequest) { r.Pretty = true @@ -156,7 +150,6 @@ func (f GetScriptContext) WithPretty() func(*GetScriptContextRequest) { } // WithHuman makes statistical values human-readable. -// func (f GetScriptContext) WithHuman() func(*GetScriptContextRequest) { return func(r *GetScriptContextRequest) { r.Human = true @@ -164,7 +157,6 @@ func (f GetScriptContext) WithHuman() func(*GetScriptContextRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f GetScriptContext) WithErrorTrace() func(*GetScriptContextRequest) { return func(r *GetScriptContextRequest) { r.ErrorTrace = true @@ -172,7 +164,6 @@ func (f GetScriptContext) WithErrorTrace() func(*GetScriptContextRequest) { } // WithFilterPath filters the properties of the response body. -// func (f GetScriptContext) WithFilterPath(v ...string) func(*GetScriptContextRequest) { return func(r *GetScriptContextRequest) { r.FilterPath = v @@ -180,7 +171,6 @@ func (f GetScriptContext) WithFilterPath(v ...string) func(*GetScriptContextRequ } // WithHeader adds the headers to the HTTP request. -// func (f GetScriptContext) WithHeader(h map[string]string) func(*GetScriptContextRequest) { return func(r *GetScriptContextRequest) { if r.Header == nil { @@ -193,7 +183,6 @@ func (f GetScriptContext) WithHeader(h map[string]string) func(*GetScriptContext } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f GetScriptContext) WithOpaqueID(s string) func(*GetScriptContextRequest) { return func(r *GetScriptContextRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script_languages.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script_languages.go index 647bc8e0fee7..ce023bd2f5b6 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script_languages.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_script_languages.go @@ -47,12 +47,9 @@ func newGetScriptLanguagesFunc(t Transport) GetScriptLanguages { // GetScriptLanguages returns available script types, languages and contexts // // This API is experimental. -// -// type GetScriptLanguages func(o ...func(*GetScriptLanguagesRequest)) (*Response, error) // GetScriptLanguagesRequest configures the Get Script Languages API request. -// type GetScriptLanguagesRequest struct { Pretty bool Human bool @@ -65,7 +62,6 @@ type GetScriptLanguagesRequest struct { } // Do executes the request and returns response or error. -// func (r GetScriptLanguagesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -140,7 +136,6 @@ func (r GetScriptLanguagesRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f GetScriptLanguages) WithContext(v context.Context) func(*GetScriptLanguagesRequest) { return func(r *GetScriptLanguagesRequest) { r.ctx = v @@ -148,7 +143,6 @@ func (f GetScriptLanguages) WithContext(v context.Context) func(*GetScriptLangua } // WithPretty makes the response body pretty-printed. -// func (f GetScriptLanguages) WithPretty() func(*GetScriptLanguagesRequest) { return func(r *GetScriptLanguagesRequest) { r.Pretty = true @@ -156,7 +150,6 @@ func (f GetScriptLanguages) WithPretty() func(*GetScriptLanguagesRequest) { } // WithHuman makes statistical values human-readable. -// func (f GetScriptLanguages) WithHuman() func(*GetScriptLanguagesRequest) { return func(r *GetScriptLanguagesRequest) { r.Human = true @@ -164,7 +157,6 @@ func (f GetScriptLanguages) WithHuman() func(*GetScriptLanguagesRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f GetScriptLanguages) WithErrorTrace() func(*GetScriptLanguagesRequest) { return func(r *GetScriptLanguagesRequest) { r.ErrorTrace = true @@ -172,7 +164,6 @@ func (f GetScriptLanguages) WithErrorTrace() func(*GetScriptLanguagesRequest) { } // WithFilterPath filters the properties of the response body. -// func (f GetScriptLanguages) WithFilterPath(v ...string) func(*GetScriptLanguagesRequest) { return func(r *GetScriptLanguagesRequest) { r.FilterPath = v @@ -180,7 +171,6 @@ func (f GetScriptLanguages) WithFilterPath(v ...string) func(*GetScriptLanguages } // WithHeader adds the headers to the HTTP request. -// func (f GetScriptLanguages) WithHeader(h map[string]string) func(*GetScriptLanguagesRequest) { return func(r *GetScriptLanguagesRequest) { if r.Header == nil { @@ -193,7 +183,6 @@ func (f GetScriptLanguages) WithHeader(h map[string]string) func(*GetScriptLangu } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f GetScriptLanguages) WithOpaqueID(s string) func(*GetScriptLanguagesRequest) { return func(r *GetScriptLanguagesRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_source.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_source.go index f204a9b091a5..1cfa105185c9 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_source.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.get_source.go @@ -46,12 +46,9 @@ func newGetSourceFunc(t Transport) GetSource { // ----- API Definition ------------------------------------------------------- // GetSource returns the source of a document. -// -// type GetSource func(index string, id string, o ...func(*GetSourceRequest)) (*Response, error) // GetSourceRequest configures the Get Source API request. -// type GetSourceRequest struct { Index string DocumentType string @@ -78,7 +75,6 @@ type GetSourceRequest struct { } // Do executes the request and returns response or error. -// func (r GetSourceRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -202,7 +198,6 @@ func (r GetSourceRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f GetSource) WithContext(v context.Context) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.ctx = v @@ -210,7 +205,6 @@ func (f GetSource) WithContext(v context.Context) func(*GetSourceRequest) { } // WithDocumentType - the type of the document; deprecated and optional starting with 7.0. -// func (f GetSource) WithDocumentType(v string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.DocumentType = v @@ -218,7 +212,6 @@ func (f GetSource) WithDocumentType(v string) func(*GetSourceRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f GetSource) WithPreference(v string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.Preference = v @@ -226,7 +219,6 @@ func (f GetSource) WithPreference(v string) func(*GetSourceRequest) { } // WithRealtime - specify whether to perform the operation in realtime or search mode. -// func (f GetSource) WithRealtime(v bool) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.Realtime = &v @@ -234,7 +226,6 @@ func (f GetSource) WithRealtime(v bool) func(*GetSourceRequest) { } // WithRefresh - refresh the shard containing the document before performing the operation. -// func (f GetSource) WithRefresh(v bool) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.Refresh = &v @@ -242,7 +233,6 @@ func (f GetSource) WithRefresh(v bool) func(*GetSourceRequest) { } // WithRouting - specific routing value. -// func (f GetSource) WithRouting(v string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.Routing = v @@ -250,7 +240,6 @@ func (f GetSource) WithRouting(v string) func(*GetSourceRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f GetSource) WithSource(v ...string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.Source = v @@ -258,7 +247,6 @@ func (f GetSource) WithSource(v ...string) func(*GetSourceRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f GetSource) WithSourceExcludes(v ...string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.SourceExcludes = v @@ -266,7 +254,6 @@ func (f GetSource) WithSourceExcludes(v ...string) func(*GetSourceRequest) { } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f GetSource) WithSourceIncludes(v ...string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.SourceIncludes = v @@ -274,7 +261,6 @@ func (f GetSource) WithSourceIncludes(v ...string) func(*GetSourceRequest) { } // WithVersion - explicit version number for concurrency control. -// func (f GetSource) WithVersion(v int) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.Version = &v @@ -282,7 +268,6 @@ func (f GetSource) WithVersion(v int) func(*GetSourceRequest) { } // WithVersionType - specific version type. -// func (f GetSource) WithVersionType(v string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.VersionType = v @@ -290,7 +275,6 @@ func (f GetSource) WithVersionType(v string) func(*GetSourceRequest) { } // WithPretty makes the response body pretty-printed. -// func (f GetSource) WithPretty() func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.Pretty = true @@ -298,7 +282,6 @@ func (f GetSource) WithPretty() func(*GetSourceRequest) { } // WithHuman makes statistical values human-readable. -// func (f GetSource) WithHuman() func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.Human = true @@ -306,7 +289,6 @@ func (f GetSource) WithHuman() func(*GetSourceRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f GetSource) WithErrorTrace() func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.ErrorTrace = true @@ -314,7 +296,6 @@ func (f GetSource) WithErrorTrace() func(*GetSourceRequest) { } // WithFilterPath filters the properties of the response body. -// func (f GetSource) WithFilterPath(v ...string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { r.FilterPath = v @@ -322,7 +303,6 @@ func (f GetSource) WithFilterPath(v ...string) func(*GetSourceRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f GetSource) WithHeader(h map[string]string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { if r.Header == nil { @@ -335,7 +315,6 @@ func (f GetSource) WithHeader(h map[string]string) func(*GetSourceRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f GetSource) WithOpaqueID(s string) func(*GetSourceRequest) { return func(r *GetSourceRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.index.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.index.go index c526ae8f9a65..a62f7191bed2 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.index.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.index.go @@ -48,12 +48,9 @@ func newIndexFunc(t Transport) Index { // ----- API Definition ------------------------------------------------------- // Index creates or updates a document in an index. -// -// type Index func(index string, body io.Reader, o ...func(*IndexRequest)) (*Response, error) // IndexRequest configures the Index API request. -// type IndexRequest struct { Index string DocumentType string @@ -84,7 +81,6 @@ type IndexRequest struct { } // Do executes the request and returns response or error. -// func (r IndexRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -224,7 +220,6 @@ func (r IndexRequest) Do(ctx context.Context, transport Transport) (*Response, e } // WithContext sets the request context. -// func (f Index) WithContext(v context.Context) func(*IndexRequest) { return func(r *IndexRequest) { r.ctx = v @@ -232,7 +227,6 @@ func (f Index) WithContext(v context.Context) func(*IndexRequest) { } // WithDocumentID - document ID. -// func (f Index) WithDocumentID(v string) func(*IndexRequest) { return func(r *IndexRequest) { r.DocumentID = v @@ -240,7 +234,6 @@ func (f Index) WithDocumentID(v string) func(*IndexRequest) { } // WithDocumentType - the type of the document. -// func (f Index) WithDocumentType(v string) func(*IndexRequest) { return func(r *IndexRequest) { r.DocumentType = v @@ -248,7 +241,6 @@ func (f Index) WithDocumentType(v string) func(*IndexRequest) { } // WithIfPrimaryTerm - only perform the index operation if the last operation that has changed the document has the specified primary term. -// func (f Index) WithIfPrimaryTerm(v int) func(*IndexRequest) { return func(r *IndexRequest) { r.IfPrimaryTerm = &v @@ -256,7 +248,6 @@ func (f Index) WithIfPrimaryTerm(v int) func(*IndexRequest) { } // WithIfSeqNo - only perform the index operation if the last operation that has changed the document has the specified sequence number. -// func (f Index) WithIfSeqNo(v int) func(*IndexRequest) { return func(r *IndexRequest) { r.IfSeqNo = &v @@ -264,7 +255,6 @@ func (f Index) WithIfSeqNo(v int) func(*IndexRequest) { } // WithOpType - explicit operation type. defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID. -// func (f Index) WithOpType(v string) func(*IndexRequest) { return func(r *IndexRequest) { r.OpType = v @@ -272,7 +262,6 @@ func (f Index) WithOpType(v string) func(*IndexRequest) { } // WithPipeline - the pipeline ID to preprocess incoming documents with. -// func (f Index) WithPipeline(v string) func(*IndexRequest) { return func(r *IndexRequest) { r.Pipeline = v @@ -280,7 +269,6 @@ func (f Index) WithPipeline(v string) func(*IndexRequest) { } // WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.. -// func (f Index) WithRefresh(v string) func(*IndexRequest) { return func(r *IndexRequest) { r.Refresh = v @@ -288,7 +276,6 @@ func (f Index) WithRefresh(v string) func(*IndexRequest) { } // WithRequireAlias - when true, requires destination to be an alias. default is false. -// func (f Index) WithRequireAlias(v bool) func(*IndexRequest) { return func(r *IndexRequest) { r.RequireAlias = &v @@ -296,7 +283,6 @@ func (f Index) WithRequireAlias(v bool) func(*IndexRequest) { } // WithRouting - specific routing value. -// func (f Index) WithRouting(v string) func(*IndexRequest) { return func(r *IndexRequest) { r.Routing = v @@ -304,7 +290,6 @@ func (f Index) WithRouting(v string) func(*IndexRequest) { } // WithTimeout - explicit operation timeout. -// func (f Index) WithTimeout(v time.Duration) func(*IndexRequest) { return func(r *IndexRequest) { r.Timeout = v @@ -312,7 +297,6 @@ func (f Index) WithTimeout(v time.Duration) func(*IndexRequest) { } // WithVersion - explicit version number for concurrency control. -// func (f Index) WithVersion(v int) func(*IndexRequest) { return func(r *IndexRequest) { r.Version = &v @@ -320,7 +304,6 @@ func (f Index) WithVersion(v int) func(*IndexRequest) { } // WithVersionType - specific version type. -// func (f Index) WithVersionType(v string) func(*IndexRequest) { return func(r *IndexRequest) { r.VersionType = v @@ -328,7 +311,6 @@ func (f Index) WithVersionType(v string) func(*IndexRequest) { } // WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the index operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1). -// func (f Index) WithWaitForActiveShards(v string) func(*IndexRequest) { return func(r *IndexRequest) { r.WaitForActiveShards = v @@ -336,7 +318,6 @@ func (f Index) WithWaitForActiveShards(v string) func(*IndexRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Index) WithPretty() func(*IndexRequest) { return func(r *IndexRequest) { r.Pretty = true @@ -344,7 +325,6 @@ func (f Index) WithPretty() func(*IndexRequest) { } // WithHuman makes statistical values human-readable. -// func (f Index) WithHuman() func(*IndexRequest) { return func(r *IndexRequest) { r.Human = true @@ -352,7 +332,6 @@ func (f Index) WithHuman() func(*IndexRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Index) WithErrorTrace() func(*IndexRequest) { return func(r *IndexRequest) { r.ErrorTrace = true @@ -360,7 +339,6 @@ func (f Index) WithErrorTrace() func(*IndexRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Index) WithFilterPath(v ...string) func(*IndexRequest) { return func(r *IndexRequest) { r.FilterPath = v @@ -368,7 +346,6 @@ func (f Index) WithFilterPath(v ...string) func(*IndexRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Index) WithHeader(h map[string]string) func(*IndexRequest) { return func(r *IndexRequest) { if r.Header == nil { @@ -381,7 +358,6 @@ func (f Index) WithHeader(h map[string]string) func(*IndexRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Index) WithOpaqueID(s string) func(*IndexRequest) { return func(r *IndexRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.add_block.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.add_block.go index 0f2417180195..18db7d3a674f 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.add_block.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.add_block.go @@ -47,12 +47,9 @@ func newIndicesAddBlockFunc(t Transport) IndicesAddBlock { // ----- API Definition ------------------------------------------------------- // IndicesAddBlock adds a block to an index. -// -// type IndicesAddBlock func(index []string, block string, o ...func(*IndicesAddBlockRequest)) (*Response, error) // IndicesAddBlockRequest configures the Indices Add Block API request. -// type IndicesAddBlockRequest struct { Index []string @@ -75,7 +72,6 @@ type IndicesAddBlockRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesAddBlockRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -175,7 +171,6 @@ func (r IndicesAddBlockRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f IndicesAddBlock) WithContext(v context.Context) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.ctx = v @@ -183,7 +178,6 @@ func (f IndicesAddBlock) WithContext(v context.Context) func(*IndicesAddBlockReq } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesAddBlock) WithAllowNoIndices(v bool) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.AllowNoIndices = &v @@ -191,7 +185,6 @@ func (f IndicesAddBlock) WithAllowNoIndices(v bool) func(*IndicesAddBlockRequest } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesAddBlock) WithExpandWildcards(v string) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.ExpandWildcards = v @@ -199,7 +192,6 @@ func (f IndicesAddBlock) WithExpandWildcards(v string) func(*IndicesAddBlockRequ } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesAddBlock) WithIgnoreUnavailable(v bool) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.IgnoreUnavailable = &v @@ -207,7 +199,6 @@ func (f IndicesAddBlock) WithIgnoreUnavailable(v bool) func(*IndicesAddBlockRequ } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesAddBlock) WithMasterTimeout(v time.Duration) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.MasterTimeout = v @@ -215,7 +206,6 @@ func (f IndicesAddBlock) WithMasterTimeout(v time.Duration) func(*IndicesAddBloc } // WithTimeout - explicit operation timeout. -// func (f IndicesAddBlock) WithTimeout(v time.Duration) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.Timeout = v @@ -223,7 +213,6 @@ func (f IndicesAddBlock) WithTimeout(v time.Duration) func(*IndicesAddBlockReque } // WithPretty makes the response body pretty-printed. -// func (f IndicesAddBlock) WithPretty() func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.Pretty = true @@ -231,7 +220,6 @@ func (f IndicesAddBlock) WithPretty() func(*IndicesAddBlockRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesAddBlock) WithHuman() func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.Human = true @@ -239,7 +227,6 @@ func (f IndicesAddBlock) WithHuman() func(*IndicesAddBlockRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesAddBlock) WithErrorTrace() func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.ErrorTrace = true @@ -247,7 +234,6 @@ func (f IndicesAddBlock) WithErrorTrace() func(*IndicesAddBlockRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesAddBlock) WithFilterPath(v ...string) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { r.FilterPath = v @@ -255,7 +241,6 @@ func (f IndicesAddBlock) WithFilterPath(v ...string) func(*IndicesAddBlockReques } // WithHeader adds the headers to the HTTP request. -// func (f IndicesAddBlock) WithHeader(h map[string]string) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { if r.Header == nil { @@ -268,7 +253,6 @@ func (f IndicesAddBlock) WithHeader(h map[string]string) func(*IndicesAddBlockRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesAddBlock) WithOpaqueID(s string) func(*IndicesAddBlockRequest) { return func(r *IndicesAddBlockRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.analyze.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.analyze.go index e3f039d1f623..a1e8750dcc8a 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.analyze.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.analyze.go @@ -46,12 +46,9 @@ func newIndicesAnalyzeFunc(t Transport) IndicesAnalyze { // ----- API Definition ------------------------------------------------------- // IndicesAnalyze performs the analysis process on a text and return the tokens breakdown of the text. -// -// type IndicesAnalyze func(o ...func(*IndicesAnalyzeRequest)) (*Response, error) // IndicesAnalyzeRequest configures the Indices Analyze API request. -// type IndicesAnalyzeRequest struct { Index string @@ -68,7 +65,6 @@ type IndicesAnalyzeRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesAnalyzeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -156,7 +152,6 @@ func (r IndicesAnalyzeRequest) Do(ctx context.Context, transport Transport) (*Re } // WithContext sets the request context. -// func (f IndicesAnalyze) WithContext(v context.Context) func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { r.ctx = v @@ -164,7 +159,6 @@ func (f IndicesAnalyze) WithContext(v context.Context) func(*IndicesAnalyzeReque } // WithBody - Define analyzer/tokenizer parameters and the text on which the analysis should be performed. -// func (f IndicesAnalyze) WithBody(v io.Reader) func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { r.Body = v @@ -172,7 +166,6 @@ func (f IndicesAnalyze) WithBody(v io.Reader) func(*IndicesAnalyzeRequest) { } // WithIndex - the name of the index to scope the operation. -// func (f IndicesAnalyze) WithIndex(v string) func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { r.Index = v @@ -180,7 +173,6 @@ func (f IndicesAnalyze) WithIndex(v string) func(*IndicesAnalyzeRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesAnalyze) WithPretty() func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { r.Pretty = true @@ -188,7 +180,6 @@ func (f IndicesAnalyze) WithPretty() func(*IndicesAnalyzeRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesAnalyze) WithHuman() func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { r.Human = true @@ -196,7 +187,6 @@ func (f IndicesAnalyze) WithHuman() func(*IndicesAnalyzeRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesAnalyze) WithErrorTrace() func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { r.ErrorTrace = true @@ -204,7 +194,6 @@ func (f IndicesAnalyze) WithErrorTrace() func(*IndicesAnalyzeRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesAnalyze) WithFilterPath(v ...string) func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { r.FilterPath = v @@ -212,7 +201,6 @@ func (f IndicesAnalyze) WithFilterPath(v ...string) func(*IndicesAnalyzeRequest) } // WithHeader adds the headers to the HTTP request. -// func (f IndicesAnalyze) WithHeader(h map[string]string) func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { if r.Header == nil { @@ -225,7 +213,6 @@ func (f IndicesAnalyze) WithHeader(h map[string]string) func(*IndicesAnalyzeRequ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesAnalyze) WithOpaqueID(s string) func(*IndicesAnalyzeRequest) { return func(r *IndicesAnalyzeRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.clear_cache.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.clear_cache.go index f3ce8cef6d53..0335ba808f75 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.clear_cache.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.clear_cache.go @@ -46,12 +46,9 @@ func newIndicesClearCacheFunc(t Transport) IndicesClearCache { // ----- API Definition ------------------------------------------------------- // IndicesClearCache clears all or specific caches for one or more indices. -// -// type IndicesClearCache func(o ...func(*IndicesClearCacheRequest)) (*Response, error) // IndicesClearCacheRequest configures the Indices Clear Cache API request. -// type IndicesClearCacheRequest struct { Index []string @@ -74,7 +71,6 @@ type IndicesClearCacheRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesClearCacheRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -188,7 +184,6 @@ func (r IndicesClearCacheRequest) Do(ctx context.Context, transport Transport) ( } // WithContext sets the request context. -// func (f IndicesClearCache) WithContext(v context.Context) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.ctx = v @@ -196,7 +191,6 @@ func (f IndicesClearCache) WithContext(v context.Context) func(*IndicesClearCach } // WithIndex - a list of index name to limit the operation. -// func (f IndicesClearCache) WithIndex(v ...string) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.Index = v @@ -204,7 +198,6 @@ func (f IndicesClearCache) WithIndex(v ...string) func(*IndicesClearCacheRequest } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesClearCache) WithAllowNoIndices(v bool) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.AllowNoIndices = &v @@ -212,7 +205,6 @@ func (f IndicesClearCache) WithAllowNoIndices(v bool) func(*IndicesClearCacheReq } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesClearCache) WithExpandWildcards(v string) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.ExpandWildcards = v @@ -220,7 +212,6 @@ func (f IndicesClearCache) WithExpandWildcards(v string) func(*IndicesClearCache } // WithFielddata - clear field data. -// func (f IndicesClearCache) WithFielddata(v bool) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.Fielddata = &v @@ -228,7 +219,6 @@ func (f IndicesClearCache) WithFielddata(v bool) func(*IndicesClearCacheRequest) } // WithFields - a list of fields to clear when using the `fielddata` parameter (default: all). -// func (f IndicesClearCache) WithFields(v ...string) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.Fields = v @@ -236,7 +226,6 @@ func (f IndicesClearCache) WithFields(v ...string) func(*IndicesClearCacheReques } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesClearCache) WithIgnoreUnavailable(v bool) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.IgnoreUnavailable = &v @@ -244,7 +233,6 @@ func (f IndicesClearCache) WithIgnoreUnavailable(v bool) func(*IndicesClearCache } // WithQuery - clear query caches. -// func (f IndicesClearCache) WithQuery(v bool) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.Query = &v @@ -252,7 +240,6 @@ func (f IndicesClearCache) WithQuery(v bool) func(*IndicesClearCacheRequest) { } // WithRequest - clear request cache. -// func (f IndicesClearCache) WithRequest(v bool) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.Request = &v @@ -260,7 +247,6 @@ func (f IndicesClearCache) WithRequest(v bool) func(*IndicesClearCacheRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesClearCache) WithPretty() func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.Pretty = true @@ -268,7 +254,6 @@ func (f IndicesClearCache) WithPretty() func(*IndicesClearCacheRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesClearCache) WithHuman() func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.Human = true @@ -276,7 +261,6 @@ func (f IndicesClearCache) WithHuman() func(*IndicesClearCacheRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesClearCache) WithErrorTrace() func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.ErrorTrace = true @@ -284,7 +268,6 @@ func (f IndicesClearCache) WithErrorTrace() func(*IndicesClearCacheRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesClearCache) WithFilterPath(v ...string) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { r.FilterPath = v @@ -292,7 +275,6 @@ func (f IndicesClearCache) WithFilterPath(v ...string) func(*IndicesClearCacheRe } // WithHeader adds the headers to the HTTP request. -// func (f IndicesClearCache) WithHeader(h map[string]string) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { if r.Header == nil { @@ -305,7 +287,6 @@ func (f IndicesClearCache) WithHeader(h map[string]string) func(*IndicesClearCac } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesClearCache) WithOpaqueID(s string) func(*IndicesClearCacheRequest) { return func(r *IndicesClearCacheRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.clone.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.clone.go index 1770851789ec..7581eaa9a76b 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.clone.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.clone.go @@ -47,12 +47,9 @@ func newIndicesCloneFunc(t Transport) IndicesClone { // ----- API Definition ------------------------------------------------------- // IndicesClone clones an index -// -// type IndicesClone func(index string, target string, o ...func(*IndicesCloneRequest)) (*Response, error) // IndicesCloneRequest configures the Indices Clone API request. -// type IndicesCloneRequest struct { Index string @@ -75,7 +72,6 @@ type IndicesCloneRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesCloneRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -171,7 +167,6 @@ func (r IndicesCloneRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f IndicesClone) WithContext(v context.Context) func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { r.ctx = v @@ -179,7 +174,6 @@ func (f IndicesClone) WithContext(v context.Context) func(*IndicesCloneRequest) } // WithBody - The configuration for the target index (`settings` and `aliases`). -// func (f IndicesClone) WithBody(v io.Reader) func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { r.Body = v @@ -187,7 +181,6 @@ func (f IndicesClone) WithBody(v io.Reader) func(*IndicesCloneRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesClone) WithMasterTimeout(v time.Duration) func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { r.MasterTimeout = v @@ -195,7 +188,6 @@ func (f IndicesClone) WithMasterTimeout(v time.Duration) func(*IndicesCloneReque } // WithTimeout - explicit operation timeout. -// func (f IndicesClone) WithTimeout(v time.Duration) func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { r.Timeout = v @@ -203,7 +195,6 @@ func (f IndicesClone) WithTimeout(v time.Duration) func(*IndicesCloneRequest) { } // WithWaitForActiveShards - set the number of active shards to wait for on the cloned index before the operation returns.. -// func (f IndicesClone) WithWaitForActiveShards(v string) func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { r.WaitForActiveShards = v @@ -211,7 +202,6 @@ func (f IndicesClone) WithWaitForActiveShards(v string) func(*IndicesCloneReques } // WithPretty makes the response body pretty-printed. -// func (f IndicesClone) WithPretty() func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { r.Pretty = true @@ -219,7 +209,6 @@ func (f IndicesClone) WithPretty() func(*IndicesCloneRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesClone) WithHuman() func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { r.Human = true @@ -227,7 +216,6 @@ func (f IndicesClone) WithHuman() func(*IndicesCloneRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesClone) WithErrorTrace() func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { r.ErrorTrace = true @@ -235,7 +223,6 @@ func (f IndicesClone) WithErrorTrace() func(*IndicesCloneRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesClone) WithFilterPath(v ...string) func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { r.FilterPath = v @@ -243,7 +230,6 @@ func (f IndicesClone) WithFilterPath(v ...string) func(*IndicesCloneRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesClone) WithHeader(h map[string]string) func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { if r.Header == nil { @@ -256,7 +242,6 @@ func (f IndicesClone) WithHeader(h map[string]string) func(*IndicesCloneRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesClone) WithOpaqueID(s string) func(*IndicesCloneRequest) { return func(r *IndicesCloneRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.close.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.close.go index 32bf1b54e1b9..130439489ea2 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.close.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.close.go @@ -47,12 +47,9 @@ func newIndicesCloseFunc(t Transport) IndicesClose { // ----- API Definition ------------------------------------------------------- // IndicesClose closes an index. -// -// type IndicesClose func(index []string, o ...func(*IndicesCloseRequest)) (*Response, error) // IndicesCloseRequest configures the Indices Close API request. -// type IndicesCloseRequest struct { Index []string @@ -74,7 +71,6 @@ type IndicesCloseRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesCloseRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -176,7 +172,6 @@ func (r IndicesCloseRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f IndicesClose) WithContext(v context.Context) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.ctx = v @@ -184,7 +179,6 @@ func (f IndicesClose) WithContext(v context.Context) func(*IndicesCloseRequest) } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesClose) WithAllowNoIndices(v bool) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.AllowNoIndices = &v @@ -192,7 +186,6 @@ func (f IndicesClose) WithAllowNoIndices(v bool) func(*IndicesCloseRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesClose) WithExpandWildcards(v string) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.ExpandWildcards = v @@ -200,7 +193,6 @@ func (f IndicesClose) WithExpandWildcards(v string) func(*IndicesCloseRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesClose) WithIgnoreUnavailable(v bool) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.IgnoreUnavailable = &v @@ -208,7 +200,6 @@ func (f IndicesClose) WithIgnoreUnavailable(v bool) func(*IndicesCloseRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesClose) WithMasterTimeout(v time.Duration) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.MasterTimeout = v @@ -216,7 +207,6 @@ func (f IndicesClose) WithMasterTimeout(v time.Duration) func(*IndicesCloseReque } // WithTimeout - explicit operation timeout. -// func (f IndicesClose) WithTimeout(v time.Duration) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.Timeout = v @@ -224,7 +214,6 @@ func (f IndicesClose) WithTimeout(v time.Duration) func(*IndicesCloseRequest) { } // WithWaitForActiveShards - sets the number of active shards to wait for before the operation returns. set to `index-setting` to wait according to the index setting `index.write.wait_for_active_shards`, or `all` to wait for all shards, or an integer. defaults to `0`.. -// func (f IndicesClose) WithWaitForActiveShards(v string) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.WaitForActiveShards = v @@ -232,7 +221,6 @@ func (f IndicesClose) WithWaitForActiveShards(v string) func(*IndicesCloseReques } // WithPretty makes the response body pretty-printed. -// func (f IndicesClose) WithPretty() func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.Pretty = true @@ -240,7 +228,6 @@ func (f IndicesClose) WithPretty() func(*IndicesCloseRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesClose) WithHuman() func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.Human = true @@ -248,7 +235,6 @@ func (f IndicesClose) WithHuman() func(*IndicesCloseRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesClose) WithErrorTrace() func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.ErrorTrace = true @@ -256,7 +242,6 @@ func (f IndicesClose) WithErrorTrace() func(*IndicesCloseRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesClose) WithFilterPath(v ...string) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { r.FilterPath = v @@ -264,7 +249,6 @@ func (f IndicesClose) WithFilterPath(v ...string) func(*IndicesCloseRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesClose) WithHeader(h map[string]string) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { if r.Header == nil { @@ -277,7 +261,6 @@ func (f IndicesClose) WithHeader(h map[string]string) func(*IndicesCloseRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesClose) WithOpaqueID(s string) func(*IndicesCloseRequest) { return func(r *IndicesCloseRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.create.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.create.go index b01703732d66..eeaf3021f2ad 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.create.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.create.go @@ -48,12 +48,9 @@ func newIndicesCreateFunc(t Transport) IndicesCreate { // ----- API Definition ------------------------------------------------------- // IndicesCreate creates an index with optional settings and mappings. -// -// type IndicesCreate func(index string, o ...func(*IndicesCreateRequest)) (*Response, error) // IndicesCreateRequest configures the Indices Create API request. -// type IndicesCreateRequest struct { Index string @@ -75,7 +72,6 @@ type IndicesCreateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesCreateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -171,7 +167,6 @@ func (r IndicesCreateRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f IndicesCreate) WithContext(v context.Context) func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.ctx = v @@ -179,7 +174,6 @@ func (f IndicesCreate) WithContext(v context.Context) func(*IndicesCreateRequest } // WithBody - The configuration for the index (`settings` and `mappings`). -// func (f IndicesCreate) WithBody(v io.Reader) func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.Body = v @@ -187,7 +181,6 @@ func (f IndicesCreate) WithBody(v io.Reader) func(*IndicesCreateRequest) { } // WithIncludeTypeName - whether a type should be expected in the body of the mappings.. -// func (f IndicesCreate) WithIncludeTypeName(v bool) func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.IncludeTypeName = &v @@ -195,7 +188,6 @@ func (f IndicesCreate) WithIncludeTypeName(v bool) func(*IndicesCreateRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesCreate) WithMasterTimeout(v time.Duration) func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.MasterTimeout = v @@ -203,7 +195,6 @@ func (f IndicesCreate) WithMasterTimeout(v time.Duration) func(*IndicesCreateReq } // WithTimeout - explicit operation timeout. -// func (f IndicesCreate) WithTimeout(v time.Duration) func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.Timeout = v @@ -211,7 +202,6 @@ func (f IndicesCreate) WithTimeout(v time.Duration) func(*IndicesCreateRequest) } // WithWaitForActiveShards - set the number of active shards to wait for before the operation returns.. -// func (f IndicesCreate) WithWaitForActiveShards(v string) func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.WaitForActiveShards = v @@ -219,7 +209,6 @@ func (f IndicesCreate) WithWaitForActiveShards(v string) func(*IndicesCreateRequ } // WithPretty makes the response body pretty-printed. -// func (f IndicesCreate) WithPretty() func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.Pretty = true @@ -227,7 +216,6 @@ func (f IndicesCreate) WithPretty() func(*IndicesCreateRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesCreate) WithHuman() func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.Human = true @@ -235,7 +223,6 @@ func (f IndicesCreate) WithHuman() func(*IndicesCreateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesCreate) WithErrorTrace() func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.ErrorTrace = true @@ -243,7 +230,6 @@ func (f IndicesCreate) WithErrorTrace() func(*IndicesCreateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesCreate) WithFilterPath(v ...string) func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { r.FilterPath = v @@ -251,7 +237,6 @@ func (f IndicesCreate) WithFilterPath(v ...string) func(*IndicesCreateRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesCreate) WithHeader(h map[string]string) func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { if r.Header == nil { @@ -264,7 +249,6 @@ func (f IndicesCreate) WithHeader(h map[string]string) func(*IndicesCreateReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesCreate) WithOpaqueID(s string) func(*IndicesCreateRequest) { return func(r *IndicesCreateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete.go index 401e6eb71969..7bc05d6d6941 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete.go @@ -47,12 +47,9 @@ func newIndicesDeleteFunc(t Transport) IndicesDelete { // ----- API Definition ------------------------------------------------------- // IndicesDelete deletes an index. -// -// type IndicesDelete func(index []string, o ...func(*IndicesDeleteRequest)) (*Response, error) // IndicesDeleteRequest configures the Indices Delete API request. -// type IndicesDeleteRequest struct { Index []string @@ -73,7 +70,6 @@ type IndicesDeleteRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesDeleteRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -169,7 +165,6 @@ func (r IndicesDeleteRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f IndicesDelete) WithContext(v context.Context) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.ctx = v @@ -177,7 +172,6 @@ func (f IndicesDelete) WithContext(v context.Context) func(*IndicesDeleteRequest } // WithAllowNoIndices - ignore if a wildcard expression resolves to no concrete indices (default: false). -// func (f IndicesDelete) WithAllowNoIndices(v bool) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.AllowNoIndices = &v @@ -185,7 +179,6 @@ func (f IndicesDelete) WithAllowNoIndices(v bool) func(*IndicesDeleteRequest) { } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -// func (f IndicesDelete) WithExpandWildcards(v string) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.ExpandWildcards = v @@ -193,7 +186,6 @@ func (f IndicesDelete) WithExpandWildcards(v string) func(*IndicesDeleteRequest) } // WithIgnoreUnavailable - ignore unavailable indexes (default: false). -// func (f IndicesDelete) WithIgnoreUnavailable(v bool) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.IgnoreUnavailable = &v @@ -201,7 +193,6 @@ func (f IndicesDelete) WithIgnoreUnavailable(v bool) func(*IndicesDeleteRequest) } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesDelete) WithMasterTimeout(v time.Duration) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.MasterTimeout = v @@ -209,7 +200,6 @@ func (f IndicesDelete) WithMasterTimeout(v time.Duration) func(*IndicesDeleteReq } // WithTimeout - explicit operation timeout. -// func (f IndicesDelete) WithTimeout(v time.Duration) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.Timeout = v @@ -217,7 +207,6 @@ func (f IndicesDelete) WithTimeout(v time.Duration) func(*IndicesDeleteRequest) } // WithPretty makes the response body pretty-printed. -// func (f IndicesDelete) WithPretty() func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.Pretty = true @@ -225,7 +214,6 @@ func (f IndicesDelete) WithPretty() func(*IndicesDeleteRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesDelete) WithHuman() func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.Human = true @@ -233,7 +221,6 @@ func (f IndicesDelete) WithHuman() func(*IndicesDeleteRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesDelete) WithErrorTrace() func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.ErrorTrace = true @@ -241,7 +228,6 @@ func (f IndicesDelete) WithErrorTrace() func(*IndicesDeleteRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesDelete) WithFilterPath(v ...string) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { r.FilterPath = v @@ -249,7 +235,6 @@ func (f IndicesDelete) WithFilterPath(v ...string) func(*IndicesDeleteRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesDelete) WithHeader(h map[string]string) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { if r.Header == nil { @@ -262,7 +247,6 @@ func (f IndicesDelete) WithHeader(h map[string]string) func(*IndicesDeleteReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesDelete) WithOpaqueID(s string) func(*IndicesDeleteRequest) { return func(r *IndicesDeleteRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_alias.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_alias.go index 46220832a4b0..31ee33d184f5 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_alias.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_alias.go @@ -46,12 +46,9 @@ func newIndicesDeleteAliasFunc(t Transport) IndicesDeleteAlias { // ----- API Definition ------------------------------------------------------- // IndicesDeleteAlias deletes an alias. -// -// type IndicesDeleteAlias func(index []string, name []string, o ...func(*IndicesDeleteAliasRequest)) (*Response, error) // IndicesDeleteAliasRequest configures the Indices Delete Alias API request. -// type IndicesDeleteAliasRequest struct { Index []string @@ -71,7 +68,6 @@ type IndicesDeleteAliasRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesDeleteAliasRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -159,7 +155,6 @@ func (r IndicesDeleteAliasRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IndicesDeleteAlias) WithContext(v context.Context) func(*IndicesDeleteAliasRequest) { return func(r *IndicesDeleteAliasRequest) { r.ctx = v @@ -167,7 +162,6 @@ func (f IndicesDeleteAlias) WithContext(v context.Context) func(*IndicesDeleteAl } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesDeleteAlias) WithMasterTimeout(v time.Duration) func(*IndicesDeleteAliasRequest) { return func(r *IndicesDeleteAliasRequest) { r.MasterTimeout = v @@ -175,7 +169,6 @@ func (f IndicesDeleteAlias) WithMasterTimeout(v time.Duration) func(*IndicesDele } // WithTimeout - explicit timestamp for the document. -// func (f IndicesDeleteAlias) WithTimeout(v time.Duration) func(*IndicesDeleteAliasRequest) { return func(r *IndicesDeleteAliasRequest) { r.Timeout = v @@ -183,7 +176,6 @@ func (f IndicesDeleteAlias) WithTimeout(v time.Duration) func(*IndicesDeleteAlia } // WithPretty makes the response body pretty-printed. -// func (f IndicesDeleteAlias) WithPretty() func(*IndicesDeleteAliasRequest) { return func(r *IndicesDeleteAliasRequest) { r.Pretty = true @@ -191,7 +183,6 @@ func (f IndicesDeleteAlias) WithPretty() func(*IndicesDeleteAliasRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesDeleteAlias) WithHuman() func(*IndicesDeleteAliasRequest) { return func(r *IndicesDeleteAliasRequest) { r.Human = true @@ -199,7 +190,6 @@ func (f IndicesDeleteAlias) WithHuman() func(*IndicesDeleteAliasRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesDeleteAlias) WithErrorTrace() func(*IndicesDeleteAliasRequest) { return func(r *IndicesDeleteAliasRequest) { r.ErrorTrace = true @@ -207,7 +197,6 @@ func (f IndicesDeleteAlias) WithErrorTrace() func(*IndicesDeleteAliasRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesDeleteAlias) WithFilterPath(v ...string) func(*IndicesDeleteAliasRequest) { return func(r *IndicesDeleteAliasRequest) { r.FilterPath = v @@ -215,7 +204,6 @@ func (f IndicesDeleteAlias) WithFilterPath(v ...string) func(*IndicesDeleteAlias } // WithHeader adds the headers to the HTTP request. -// func (f IndicesDeleteAlias) WithHeader(h map[string]string) func(*IndicesDeleteAliasRequest) { return func(r *IndicesDeleteAliasRequest) { if r.Header == nil { @@ -228,7 +216,6 @@ func (f IndicesDeleteAlias) WithHeader(h map[string]string) func(*IndicesDeleteA } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesDeleteAlias) WithOpaqueID(s string) func(*IndicesDeleteAliasRequest) { return func(r *IndicesDeleteAliasRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_index_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_index_template.go index 19e77aedfd1a..cabd3ec9d140 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_index_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_index_template.go @@ -46,12 +46,9 @@ func newIndicesDeleteIndexTemplateFunc(t Transport) IndicesDeleteIndexTemplate { // ----- API Definition ------------------------------------------------------- // IndicesDeleteIndexTemplate deletes an index template. -// -// type IndicesDeleteIndexTemplate func(name string, o ...func(*IndicesDeleteIndexTemplateRequest)) (*Response, error) // IndicesDeleteIndexTemplateRequest configures the Indices Delete Index Template API request. -// type IndicesDeleteIndexTemplateRequest struct { Name string @@ -69,7 +66,6 @@ type IndicesDeleteIndexTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesDeleteIndexTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -155,7 +151,6 @@ func (r IndicesDeleteIndexTemplateRequest) Do(ctx context.Context, transport Tra } // WithContext sets the request context. -// func (f IndicesDeleteIndexTemplate) WithContext(v context.Context) func(*IndicesDeleteIndexTemplateRequest) { return func(r *IndicesDeleteIndexTemplateRequest) { r.ctx = v @@ -163,7 +158,6 @@ func (f IndicesDeleteIndexTemplate) WithContext(v context.Context) func(*Indices } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesDeleteIndexTemplate) WithMasterTimeout(v time.Duration) func(*IndicesDeleteIndexTemplateRequest) { return func(r *IndicesDeleteIndexTemplateRequest) { r.MasterTimeout = v @@ -171,7 +165,6 @@ func (f IndicesDeleteIndexTemplate) WithMasterTimeout(v time.Duration) func(*Ind } // WithTimeout - explicit operation timeout. -// func (f IndicesDeleteIndexTemplate) WithTimeout(v time.Duration) func(*IndicesDeleteIndexTemplateRequest) { return func(r *IndicesDeleteIndexTemplateRequest) { r.Timeout = v @@ -179,7 +172,6 @@ func (f IndicesDeleteIndexTemplate) WithTimeout(v time.Duration) func(*IndicesDe } // WithPretty makes the response body pretty-printed. -// func (f IndicesDeleteIndexTemplate) WithPretty() func(*IndicesDeleteIndexTemplateRequest) { return func(r *IndicesDeleteIndexTemplateRequest) { r.Pretty = true @@ -187,7 +179,6 @@ func (f IndicesDeleteIndexTemplate) WithPretty() func(*IndicesDeleteIndexTemplat } // WithHuman makes statistical values human-readable. -// func (f IndicesDeleteIndexTemplate) WithHuman() func(*IndicesDeleteIndexTemplateRequest) { return func(r *IndicesDeleteIndexTemplateRequest) { r.Human = true @@ -195,7 +186,6 @@ func (f IndicesDeleteIndexTemplate) WithHuman() func(*IndicesDeleteIndexTemplate } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesDeleteIndexTemplate) WithErrorTrace() func(*IndicesDeleteIndexTemplateRequest) { return func(r *IndicesDeleteIndexTemplateRequest) { r.ErrorTrace = true @@ -203,7 +193,6 @@ func (f IndicesDeleteIndexTemplate) WithErrorTrace() func(*IndicesDeleteIndexTem } // WithFilterPath filters the properties of the response body. -// func (f IndicesDeleteIndexTemplate) WithFilterPath(v ...string) func(*IndicesDeleteIndexTemplateRequest) { return func(r *IndicesDeleteIndexTemplateRequest) { r.FilterPath = v @@ -211,7 +200,6 @@ func (f IndicesDeleteIndexTemplate) WithFilterPath(v ...string) func(*IndicesDel } // WithHeader adds the headers to the HTTP request. -// func (f IndicesDeleteIndexTemplate) WithHeader(h map[string]string) func(*IndicesDeleteIndexTemplateRequest) { return func(r *IndicesDeleteIndexTemplateRequest) { if r.Header == nil { @@ -224,7 +212,6 @@ func (f IndicesDeleteIndexTemplate) WithHeader(h map[string]string) func(*Indice } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesDeleteIndexTemplate) WithOpaqueID(s string) func(*IndicesDeleteIndexTemplateRequest) { return func(r *IndicesDeleteIndexTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_template.go index c5f22b22e21e..e1383d9d7fb9 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.delete_template.go @@ -46,12 +46,9 @@ func newIndicesDeleteTemplateFunc(t Transport) IndicesDeleteTemplate { // ----- API Definition ------------------------------------------------------- // IndicesDeleteTemplate deletes an index template. -// -// type IndicesDeleteTemplate func(name string, o ...func(*IndicesDeleteTemplateRequest)) (*Response, error) // IndicesDeleteTemplateRequest configures the Indices Delete Template API request. -// type IndicesDeleteTemplateRequest struct { Name string @@ -69,7 +66,6 @@ type IndicesDeleteTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesDeleteTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -155,7 +151,6 @@ func (r IndicesDeleteTemplateRequest) Do(ctx context.Context, transport Transpor } // WithContext sets the request context. -// func (f IndicesDeleteTemplate) WithContext(v context.Context) func(*IndicesDeleteTemplateRequest) { return func(r *IndicesDeleteTemplateRequest) { r.ctx = v @@ -163,7 +158,6 @@ func (f IndicesDeleteTemplate) WithContext(v context.Context) func(*IndicesDelet } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesDeleteTemplate) WithMasterTimeout(v time.Duration) func(*IndicesDeleteTemplateRequest) { return func(r *IndicesDeleteTemplateRequest) { r.MasterTimeout = v @@ -171,7 +165,6 @@ func (f IndicesDeleteTemplate) WithMasterTimeout(v time.Duration) func(*IndicesD } // WithTimeout - explicit operation timeout. -// func (f IndicesDeleteTemplate) WithTimeout(v time.Duration) func(*IndicesDeleteTemplateRequest) { return func(r *IndicesDeleteTemplateRequest) { r.Timeout = v @@ -179,7 +172,6 @@ func (f IndicesDeleteTemplate) WithTimeout(v time.Duration) func(*IndicesDeleteT } // WithPretty makes the response body pretty-printed. -// func (f IndicesDeleteTemplate) WithPretty() func(*IndicesDeleteTemplateRequest) { return func(r *IndicesDeleteTemplateRequest) { r.Pretty = true @@ -187,7 +179,6 @@ func (f IndicesDeleteTemplate) WithPretty() func(*IndicesDeleteTemplateRequest) } // WithHuman makes statistical values human-readable. -// func (f IndicesDeleteTemplate) WithHuman() func(*IndicesDeleteTemplateRequest) { return func(r *IndicesDeleteTemplateRequest) { r.Human = true @@ -195,7 +186,6 @@ func (f IndicesDeleteTemplate) WithHuman() func(*IndicesDeleteTemplateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesDeleteTemplate) WithErrorTrace() func(*IndicesDeleteTemplateRequest) { return func(r *IndicesDeleteTemplateRequest) { r.ErrorTrace = true @@ -203,7 +193,6 @@ func (f IndicesDeleteTemplate) WithErrorTrace() func(*IndicesDeleteTemplateReque } // WithFilterPath filters the properties of the response body. -// func (f IndicesDeleteTemplate) WithFilterPath(v ...string) func(*IndicesDeleteTemplateRequest) { return func(r *IndicesDeleteTemplateRequest) { r.FilterPath = v @@ -211,7 +200,6 @@ func (f IndicesDeleteTemplate) WithFilterPath(v ...string) func(*IndicesDeleteTe } // WithHeader adds the headers to the HTTP request. -// func (f IndicesDeleteTemplate) WithHeader(h map[string]string) func(*IndicesDeleteTemplateRequest) { return func(r *IndicesDeleteTemplateRequest) { if r.Header == nil { @@ -224,7 +212,6 @@ func (f IndicesDeleteTemplate) WithHeader(h map[string]string) func(*IndicesDele } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesDeleteTemplate) WithOpaqueID(s string) func(*IndicesDeleteTemplateRequest) { return func(r *IndicesDeleteTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.disk_usage.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.disk_usage.go index da3ac56f5275..a537a31ff339 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.disk_usage.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.disk_usage.go @@ -48,12 +48,9 @@ func newIndicesDiskUsageFunc(t Transport) IndicesDiskUsage { // IndicesDiskUsage analyzes the disk usage of each field of an index or data stream // // This API is experimental. -// -// type IndicesDiskUsage func(index string, o ...func(*IndicesDiskUsageRequest)) (*Response, error) // IndicesDiskUsageRequest configures the Indices Disk Usage API request. -// type IndicesDiskUsageRequest struct { Index string @@ -74,7 +71,6 @@ type IndicesDiskUsageRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesDiskUsageRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -172,7 +168,6 @@ func (r IndicesDiskUsageRequest) Do(ctx context.Context, transport Transport) (* } // WithContext sets the request context. -// func (f IndicesDiskUsage) WithContext(v context.Context) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.ctx = v @@ -180,7 +175,6 @@ func (f IndicesDiskUsage) WithContext(v context.Context) func(*IndicesDiskUsageR } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesDiskUsage) WithAllowNoIndices(v bool) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.AllowNoIndices = &v @@ -188,7 +182,6 @@ func (f IndicesDiskUsage) WithAllowNoIndices(v bool) func(*IndicesDiskUsageReque } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesDiskUsage) WithExpandWildcards(v string) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.ExpandWildcards = v @@ -196,7 +189,6 @@ func (f IndicesDiskUsage) WithExpandWildcards(v string) func(*IndicesDiskUsageRe } // WithFlush - whether flush or not before analyzing the index disk usage. defaults to true. -// func (f IndicesDiskUsage) WithFlush(v bool) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.Flush = &v @@ -204,7 +196,6 @@ func (f IndicesDiskUsage) WithFlush(v bool) func(*IndicesDiskUsageRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesDiskUsage) WithIgnoreUnavailable(v bool) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.IgnoreUnavailable = &v @@ -212,7 +203,6 @@ func (f IndicesDiskUsage) WithIgnoreUnavailable(v bool) func(*IndicesDiskUsageRe } // WithRunExpensiveTasks - must be set to [true] in order for the task to be performed. defaults to false.. -// func (f IndicesDiskUsage) WithRunExpensiveTasks(v bool) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.RunExpensiveTasks = &v @@ -220,7 +210,6 @@ func (f IndicesDiskUsage) WithRunExpensiveTasks(v bool) func(*IndicesDiskUsageRe } // WithPretty makes the response body pretty-printed. -// func (f IndicesDiskUsage) WithPretty() func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.Pretty = true @@ -228,7 +217,6 @@ func (f IndicesDiskUsage) WithPretty() func(*IndicesDiskUsageRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesDiskUsage) WithHuman() func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.Human = true @@ -236,7 +224,6 @@ func (f IndicesDiskUsage) WithHuman() func(*IndicesDiskUsageRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesDiskUsage) WithErrorTrace() func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.ErrorTrace = true @@ -244,7 +231,6 @@ func (f IndicesDiskUsage) WithErrorTrace() func(*IndicesDiskUsageRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesDiskUsage) WithFilterPath(v ...string) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { r.FilterPath = v @@ -252,7 +238,6 @@ func (f IndicesDiskUsage) WithFilterPath(v ...string) func(*IndicesDiskUsageRequ } // WithHeader adds the headers to the HTTP request. -// func (f IndicesDiskUsage) WithHeader(h map[string]string) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { if r.Header == nil { @@ -265,7 +250,6 @@ func (f IndicesDiskUsage) WithHeader(h map[string]string) func(*IndicesDiskUsage } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesDiskUsage) WithOpaqueID(s string) func(*IndicesDiskUsageRequest) { return func(r *IndicesDiskUsageRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists.go index b27334336db8..ea13281db082 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists.go @@ -46,12 +46,9 @@ func newIndicesExistsFunc(t Transport) IndicesExists { // ----- API Definition ------------------------------------------------------- // IndicesExists returns information about whether a particular index exists. -// -// type IndicesExists func(index []string, o ...func(*IndicesExistsRequest)) (*Response, error) // IndicesExistsRequest configures the Indices Exists API request. -// type IndicesExistsRequest struct { Index []string @@ -73,7 +70,6 @@ type IndicesExistsRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesExistsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -173,7 +169,6 @@ func (r IndicesExistsRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f IndicesExists) WithContext(v context.Context) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.ctx = v @@ -181,7 +176,6 @@ func (f IndicesExists) WithContext(v context.Context) func(*IndicesExistsRequest } // WithAllowNoIndices - ignore if a wildcard expression resolves to no concrete indices (default: false). -// func (f IndicesExists) WithAllowNoIndices(v bool) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.AllowNoIndices = &v @@ -189,7 +183,6 @@ func (f IndicesExists) WithAllowNoIndices(v bool) func(*IndicesExistsRequest) { } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -// func (f IndicesExists) WithExpandWildcards(v string) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.ExpandWildcards = v @@ -197,7 +190,6 @@ func (f IndicesExists) WithExpandWildcards(v string) func(*IndicesExistsRequest) } // WithFlatSettings - return settings in flat format (default: false). -// func (f IndicesExists) WithFlatSettings(v bool) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.FlatSettings = &v @@ -205,7 +197,6 @@ func (f IndicesExists) WithFlatSettings(v bool) func(*IndicesExistsRequest) { } // WithIgnoreUnavailable - ignore unavailable indexes (default: false). -// func (f IndicesExists) WithIgnoreUnavailable(v bool) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.IgnoreUnavailable = &v @@ -213,7 +204,6 @@ func (f IndicesExists) WithIgnoreUnavailable(v bool) func(*IndicesExistsRequest) } // WithIncludeDefaults - whether to return all default setting for each of the indices.. -// func (f IndicesExists) WithIncludeDefaults(v bool) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.IncludeDefaults = &v @@ -221,7 +211,6 @@ func (f IndicesExists) WithIncludeDefaults(v bool) func(*IndicesExistsRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesExists) WithLocal(v bool) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.Local = &v @@ -229,7 +218,6 @@ func (f IndicesExists) WithLocal(v bool) func(*IndicesExistsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesExists) WithPretty() func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.Pretty = true @@ -237,7 +225,6 @@ func (f IndicesExists) WithPretty() func(*IndicesExistsRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesExists) WithHuman() func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.Human = true @@ -245,7 +232,6 @@ func (f IndicesExists) WithHuman() func(*IndicesExistsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesExists) WithErrorTrace() func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.ErrorTrace = true @@ -253,7 +239,6 @@ func (f IndicesExists) WithErrorTrace() func(*IndicesExistsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesExists) WithFilterPath(v ...string) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { r.FilterPath = v @@ -261,7 +246,6 @@ func (f IndicesExists) WithFilterPath(v ...string) func(*IndicesExistsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesExists) WithHeader(h map[string]string) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { if r.Header == nil { @@ -274,7 +258,6 @@ func (f IndicesExists) WithHeader(h map[string]string) func(*IndicesExistsReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesExists) WithOpaqueID(s string) func(*IndicesExistsRequest) { return func(r *IndicesExistsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_alias.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_alias.go index cf80d38a5b29..9e0ed491bc98 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_alias.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_alias.go @@ -46,12 +46,9 @@ func newIndicesExistsAliasFunc(t Transport) IndicesExistsAlias { // ----- API Definition ------------------------------------------------------- // IndicesExistsAlias returns information about whether a particular alias exists. -// -// type IndicesExistsAlias func(name []string, o ...func(*IndicesExistsAliasRequest)) (*Response, error) // IndicesExistsAliasRequest configures the Indices Exists Alias API request. -// type IndicesExistsAliasRequest struct { Index []string @@ -73,7 +70,6 @@ type IndicesExistsAliasRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesExistsAliasRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -171,7 +167,6 @@ func (r IndicesExistsAliasRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IndicesExistsAlias) WithContext(v context.Context) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.ctx = v @@ -179,7 +174,6 @@ func (f IndicesExistsAlias) WithContext(v context.Context) func(*IndicesExistsAl } // WithIndex - a list of index names to filter aliases. -// func (f IndicesExistsAlias) WithIndex(v ...string) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.Index = v @@ -187,7 +181,6 @@ func (f IndicesExistsAlias) WithIndex(v ...string) func(*IndicesExistsAliasReque } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesExistsAlias) WithAllowNoIndices(v bool) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.AllowNoIndices = &v @@ -195,7 +188,6 @@ func (f IndicesExistsAlias) WithAllowNoIndices(v bool) func(*IndicesExistsAliasR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesExistsAlias) WithExpandWildcards(v string) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.ExpandWildcards = v @@ -203,7 +195,6 @@ func (f IndicesExistsAlias) WithExpandWildcards(v string) func(*IndicesExistsAli } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesExistsAlias) WithIgnoreUnavailable(v bool) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.IgnoreUnavailable = &v @@ -211,7 +202,6 @@ func (f IndicesExistsAlias) WithIgnoreUnavailable(v bool) func(*IndicesExistsAli } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesExistsAlias) WithLocal(v bool) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.Local = &v @@ -219,7 +209,6 @@ func (f IndicesExistsAlias) WithLocal(v bool) func(*IndicesExistsAliasRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesExistsAlias) WithPretty() func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.Pretty = true @@ -227,7 +216,6 @@ func (f IndicesExistsAlias) WithPretty() func(*IndicesExistsAliasRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesExistsAlias) WithHuman() func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.Human = true @@ -235,7 +223,6 @@ func (f IndicesExistsAlias) WithHuman() func(*IndicesExistsAliasRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesExistsAlias) WithErrorTrace() func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.ErrorTrace = true @@ -243,7 +230,6 @@ func (f IndicesExistsAlias) WithErrorTrace() func(*IndicesExistsAliasRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesExistsAlias) WithFilterPath(v ...string) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { r.FilterPath = v @@ -251,7 +237,6 @@ func (f IndicesExistsAlias) WithFilterPath(v ...string) func(*IndicesExistsAlias } // WithHeader adds the headers to the HTTP request. -// func (f IndicesExistsAlias) WithHeader(h map[string]string) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { if r.Header == nil { @@ -264,7 +249,6 @@ func (f IndicesExistsAlias) WithHeader(h map[string]string) func(*IndicesExistsA } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesExistsAlias) WithOpaqueID(s string) func(*IndicesExistsAliasRequest) { return func(r *IndicesExistsAliasRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_index_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_index_template.go index 3e8b11a41c44..beca767951d3 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_index_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_index_template.go @@ -47,12 +47,9 @@ func newIndicesExistsIndexTemplateFunc(t Transport) IndicesExistsIndexTemplate { // ----- API Definition ------------------------------------------------------- // IndicesExistsIndexTemplate returns information about whether a particular index template exists. -// -// type IndicesExistsIndexTemplate func(name string, o ...func(*IndicesExistsIndexTemplateRequest)) (*Response, error) // IndicesExistsIndexTemplateRequest configures the Indices Exists Index Template API request. -// type IndicesExistsIndexTemplateRequest struct { Name string @@ -71,7 +68,6 @@ type IndicesExistsIndexTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesExistsIndexTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -161,7 +157,6 @@ func (r IndicesExistsIndexTemplateRequest) Do(ctx context.Context, transport Tra } // WithContext sets the request context. -// func (f IndicesExistsIndexTemplate) WithContext(v context.Context) func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { r.ctx = v @@ -169,7 +164,6 @@ func (f IndicesExistsIndexTemplate) WithContext(v context.Context) func(*Indices } // WithFlatSettings - return settings in flat format (default: false). -// func (f IndicesExistsIndexTemplate) WithFlatSettings(v bool) func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { r.FlatSettings = &v @@ -177,7 +171,6 @@ func (f IndicesExistsIndexTemplate) WithFlatSettings(v bool) func(*IndicesExists } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesExistsIndexTemplate) WithLocal(v bool) func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { r.Local = &v @@ -185,7 +178,6 @@ func (f IndicesExistsIndexTemplate) WithLocal(v bool) func(*IndicesExistsIndexTe } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f IndicesExistsIndexTemplate) WithMasterTimeout(v time.Duration) func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { r.MasterTimeout = v @@ -193,7 +185,6 @@ func (f IndicesExistsIndexTemplate) WithMasterTimeout(v time.Duration) func(*Ind } // WithPretty makes the response body pretty-printed. -// func (f IndicesExistsIndexTemplate) WithPretty() func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { r.Pretty = true @@ -201,7 +192,6 @@ func (f IndicesExistsIndexTemplate) WithPretty() func(*IndicesExistsIndexTemplat } // WithHuman makes statistical values human-readable. -// func (f IndicesExistsIndexTemplate) WithHuman() func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { r.Human = true @@ -209,7 +199,6 @@ func (f IndicesExistsIndexTemplate) WithHuman() func(*IndicesExistsIndexTemplate } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesExistsIndexTemplate) WithErrorTrace() func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { r.ErrorTrace = true @@ -217,7 +206,6 @@ func (f IndicesExistsIndexTemplate) WithErrorTrace() func(*IndicesExistsIndexTem } // WithFilterPath filters the properties of the response body. -// func (f IndicesExistsIndexTemplate) WithFilterPath(v ...string) func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { r.FilterPath = v @@ -225,7 +213,6 @@ func (f IndicesExistsIndexTemplate) WithFilterPath(v ...string) func(*IndicesExi } // WithHeader adds the headers to the HTTP request. -// func (f IndicesExistsIndexTemplate) WithHeader(h map[string]string) func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { if r.Header == nil { @@ -238,7 +225,6 @@ func (f IndicesExistsIndexTemplate) WithHeader(h map[string]string) func(*Indice } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesExistsIndexTemplate) WithOpaqueID(s string) func(*IndicesExistsIndexTemplateRequest) { return func(r *IndicesExistsIndexTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_template.go index 6feb7daa7330..3a63f92a19c0 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_template.go @@ -47,12 +47,9 @@ func newIndicesExistsTemplateFunc(t Transport) IndicesExistsTemplate { // ----- API Definition ------------------------------------------------------- // IndicesExistsTemplate returns information about whether a particular index template exists. -// -// type IndicesExistsTemplate func(name []string, o ...func(*IndicesExistsTemplateRequest)) (*Response, error) // IndicesExistsTemplateRequest configures the Indices Exists Template API request. -// type IndicesExistsTemplateRequest struct { Name []string @@ -71,7 +68,6 @@ type IndicesExistsTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesExistsTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -161,7 +157,6 @@ func (r IndicesExistsTemplateRequest) Do(ctx context.Context, transport Transpor } // WithContext sets the request context. -// func (f IndicesExistsTemplate) WithContext(v context.Context) func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { r.ctx = v @@ -169,7 +164,6 @@ func (f IndicesExistsTemplate) WithContext(v context.Context) func(*IndicesExist } // WithFlatSettings - return settings in flat format (default: false). -// func (f IndicesExistsTemplate) WithFlatSettings(v bool) func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { r.FlatSettings = &v @@ -177,7 +171,6 @@ func (f IndicesExistsTemplate) WithFlatSettings(v bool) func(*IndicesExistsTempl } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesExistsTemplate) WithLocal(v bool) func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { r.Local = &v @@ -185,7 +178,6 @@ func (f IndicesExistsTemplate) WithLocal(v bool) func(*IndicesExistsTemplateRequ } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f IndicesExistsTemplate) WithMasterTimeout(v time.Duration) func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { r.MasterTimeout = v @@ -193,7 +185,6 @@ func (f IndicesExistsTemplate) WithMasterTimeout(v time.Duration) func(*IndicesE } // WithPretty makes the response body pretty-printed. -// func (f IndicesExistsTemplate) WithPretty() func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { r.Pretty = true @@ -201,7 +192,6 @@ func (f IndicesExistsTemplate) WithPretty() func(*IndicesExistsTemplateRequest) } // WithHuman makes statistical values human-readable. -// func (f IndicesExistsTemplate) WithHuman() func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { r.Human = true @@ -209,7 +199,6 @@ func (f IndicesExistsTemplate) WithHuman() func(*IndicesExistsTemplateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesExistsTemplate) WithErrorTrace() func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { r.ErrorTrace = true @@ -217,7 +206,6 @@ func (f IndicesExistsTemplate) WithErrorTrace() func(*IndicesExistsTemplateReque } // WithFilterPath filters the properties of the response body. -// func (f IndicesExistsTemplate) WithFilterPath(v ...string) func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { r.FilterPath = v @@ -225,7 +213,6 @@ func (f IndicesExistsTemplate) WithFilterPath(v ...string) func(*IndicesExistsTe } // WithHeader adds the headers to the HTTP request. -// func (f IndicesExistsTemplate) WithHeader(h map[string]string) func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { if r.Header == nil { @@ -238,7 +225,6 @@ func (f IndicesExistsTemplate) WithHeader(h map[string]string) func(*IndicesExis } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesExistsTemplate) WithOpaqueID(s string) func(*IndicesExistsTemplateRequest) { return func(r *IndicesExistsTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_type.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_type.go index 6241053a723e..068a2c6d898c 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_type.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.exists_type.go @@ -46,12 +46,9 @@ func newIndicesExistsDocumentTypeFunc(t Transport) IndicesExistsDocumentType { // ----- API Definition ------------------------------------------------------- // IndicesExistsDocumentType returns information about whether a particular document type exists. (DEPRECATED) -// -// type IndicesExistsDocumentType func(index []string, o ...func(*IndicesExistsDocumentTypeRequest)) (*Response, error) // IndicesExistsDocumentTypeRequest configures the Indices Exists Document Type API request. -// type IndicesExistsDocumentTypeRequest struct { Index []string DocumentType []string @@ -72,7 +69,6 @@ type IndicesExistsDocumentTypeRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesExistsDocumentTypeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -168,7 +164,6 @@ func (r IndicesExistsDocumentTypeRequest) Do(ctx context.Context, transport Tran } // WithContext sets the request context. -// func (f IndicesExistsDocumentType) WithContext(v context.Context) func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.ctx = v @@ -176,7 +171,6 @@ func (f IndicesExistsDocumentType) WithContext(v context.Context) func(*IndicesE } // WithDocumentType - a list of document types to check. -// func (f IndicesExistsDocumentType) WithDocumentType(v ...string) func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.DocumentType = v @@ -184,7 +178,6 @@ func (f IndicesExistsDocumentType) WithDocumentType(v ...string) func(*IndicesEx } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesExistsDocumentType) WithAllowNoIndices(v bool) func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.AllowNoIndices = &v @@ -192,7 +185,6 @@ func (f IndicesExistsDocumentType) WithAllowNoIndices(v bool) func(*IndicesExist } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesExistsDocumentType) WithExpandWildcards(v string) func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.ExpandWildcards = v @@ -200,7 +192,6 @@ func (f IndicesExistsDocumentType) WithExpandWildcards(v string) func(*IndicesEx } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesExistsDocumentType) WithIgnoreUnavailable(v bool) func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.IgnoreUnavailable = &v @@ -208,7 +199,6 @@ func (f IndicesExistsDocumentType) WithIgnoreUnavailable(v bool) func(*IndicesEx } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesExistsDocumentType) WithLocal(v bool) func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.Local = &v @@ -216,7 +206,6 @@ func (f IndicesExistsDocumentType) WithLocal(v bool) func(*IndicesExistsDocument } // WithPretty makes the response body pretty-printed. -// func (f IndicesExistsDocumentType) WithPretty() func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.Pretty = true @@ -224,7 +213,6 @@ func (f IndicesExistsDocumentType) WithPretty() func(*IndicesExistsDocumentTypeR } // WithHuman makes statistical values human-readable. -// func (f IndicesExistsDocumentType) WithHuman() func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.Human = true @@ -232,7 +220,6 @@ func (f IndicesExistsDocumentType) WithHuman() func(*IndicesExistsDocumentTypeRe } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesExistsDocumentType) WithErrorTrace() func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.ErrorTrace = true @@ -240,7 +227,6 @@ func (f IndicesExistsDocumentType) WithErrorTrace() func(*IndicesExistsDocumentT } // WithFilterPath filters the properties of the response body. -// func (f IndicesExistsDocumentType) WithFilterPath(v ...string) func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { r.FilterPath = v @@ -248,7 +234,6 @@ func (f IndicesExistsDocumentType) WithFilterPath(v ...string) func(*IndicesExis } // WithHeader adds the headers to the HTTP request. -// func (f IndicesExistsDocumentType) WithHeader(h map[string]string) func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { if r.Header == nil { @@ -261,7 +246,6 @@ func (f IndicesExistsDocumentType) WithHeader(h map[string]string) func(*Indices } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesExistsDocumentType) WithOpaqueID(s string) func(*IndicesExistsDocumentTypeRequest) { return func(r *IndicesExistsDocumentTypeRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.field_usage_stats.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.field_usage_stats.go index d4a81306dc49..a9e6f07c9460 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.field_usage_stats.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.field_usage_stats.go @@ -48,12 +48,9 @@ func newIndicesFieldUsageStatsFunc(t Transport) IndicesFieldUsageStats { // IndicesFieldUsageStats returns the field usage stats for each field of an index // // This API is experimental. -// -// type IndicesFieldUsageStats func(index string, o ...func(*IndicesFieldUsageStatsRequest)) (*Response, error) // IndicesFieldUsageStatsRequest configures the Indices Field Usage Stats API request. -// type IndicesFieldUsageStatsRequest struct { Index string @@ -73,7 +70,6 @@ type IndicesFieldUsageStatsRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesFieldUsageStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -167,7 +163,6 @@ func (r IndicesFieldUsageStatsRequest) Do(ctx context.Context, transport Transpo } // WithContext sets the request context. -// func (f IndicesFieldUsageStats) WithContext(v context.Context) func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.ctx = v @@ -175,7 +170,6 @@ func (f IndicesFieldUsageStats) WithContext(v context.Context) func(*IndicesFiel } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesFieldUsageStats) WithAllowNoIndices(v bool) func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.AllowNoIndices = &v @@ -183,7 +177,6 @@ func (f IndicesFieldUsageStats) WithAllowNoIndices(v bool) func(*IndicesFieldUsa } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesFieldUsageStats) WithExpandWildcards(v string) func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.ExpandWildcards = v @@ -191,7 +184,6 @@ func (f IndicesFieldUsageStats) WithExpandWildcards(v string) func(*IndicesField } // WithFields - a list of fields to include in the stats if only a subset of fields should be returned (supports wildcards). -// func (f IndicesFieldUsageStats) WithFields(v ...string) func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.Fields = v @@ -199,7 +191,6 @@ func (f IndicesFieldUsageStats) WithFields(v ...string) func(*IndicesFieldUsageS } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesFieldUsageStats) WithIgnoreUnavailable(v bool) func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.IgnoreUnavailable = &v @@ -207,7 +198,6 @@ func (f IndicesFieldUsageStats) WithIgnoreUnavailable(v bool) func(*IndicesField } // WithPretty makes the response body pretty-printed. -// func (f IndicesFieldUsageStats) WithPretty() func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.Pretty = true @@ -215,7 +205,6 @@ func (f IndicesFieldUsageStats) WithPretty() func(*IndicesFieldUsageStatsRequest } // WithHuman makes statistical values human-readable. -// func (f IndicesFieldUsageStats) WithHuman() func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.Human = true @@ -223,7 +212,6 @@ func (f IndicesFieldUsageStats) WithHuman() func(*IndicesFieldUsageStatsRequest) } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesFieldUsageStats) WithErrorTrace() func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.ErrorTrace = true @@ -231,7 +219,6 @@ func (f IndicesFieldUsageStats) WithErrorTrace() func(*IndicesFieldUsageStatsReq } // WithFilterPath filters the properties of the response body. -// func (f IndicesFieldUsageStats) WithFilterPath(v ...string) func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { r.FilterPath = v @@ -239,7 +226,6 @@ func (f IndicesFieldUsageStats) WithFilterPath(v ...string) func(*IndicesFieldUs } // WithHeader adds the headers to the HTTP request. -// func (f IndicesFieldUsageStats) WithHeader(h map[string]string) func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { if r.Header == nil { @@ -252,7 +238,6 @@ func (f IndicesFieldUsageStats) WithHeader(h map[string]string) func(*IndicesFie } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesFieldUsageStats) WithOpaqueID(s string) func(*IndicesFieldUsageStatsRequest) { return func(r *IndicesFieldUsageStatsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.flush.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.flush.go index 347d474c9380..e088001ec226 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.flush.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.flush.go @@ -46,12 +46,9 @@ func newIndicesFlushFunc(t Transport) IndicesFlush { // ----- API Definition ------------------------------------------------------- // IndicesFlush performs the flush operation on one or more indices. -// -// type IndicesFlush func(o ...func(*IndicesFlushRequest)) (*Response, error) // IndicesFlushRequest configures the Indices Flush API request. -// type IndicesFlushRequest struct { Index []string @@ -72,7 +69,6 @@ type IndicesFlushRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesFlushRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -172,7 +168,6 @@ func (r IndicesFlushRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f IndicesFlush) WithContext(v context.Context) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.ctx = v @@ -180,7 +175,6 @@ func (f IndicesFlush) WithContext(v context.Context) func(*IndicesFlushRequest) } // WithIndex - a list of index names; use _all for all indices. -// func (f IndicesFlush) WithIndex(v ...string) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.Index = v @@ -188,7 +182,6 @@ func (f IndicesFlush) WithIndex(v ...string) func(*IndicesFlushRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesFlush) WithAllowNoIndices(v bool) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.AllowNoIndices = &v @@ -196,7 +189,6 @@ func (f IndicesFlush) WithAllowNoIndices(v bool) func(*IndicesFlushRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesFlush) WithExpandWildcards(v string) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.ExpandWildcards = v @@ -204,7 +196,6 @@ func (f IndicesFlush) WithExpandWildcards(v string) func(*IndicesFlushRequest) { } // WithForce - whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. this is useful if transaction log ids should be incremented even if no uncommitted changes are present. (this setting can be considered as internal). -// func (f IndicesFlush) WithForce(v bool) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.Force = &v @@ -212,7 +203,6 @@ func (f IndicesFlush) WithForce(v bool) func(*IndicesFlushRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesFlush) WithIgnoreUnavailable(v bool) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.IgnoreUnavailable = &v @@ -220,7 +210,6 @@ func (f IndicesFlush) WithIgnoreUnavailable(v bool) func(*IndicesFlushRequest) { } // WithWaitIfOngoing - if set to true the flush operation will block until the flush can be executed if another flush operation is already executing. the default is true. if set to false the flush will be skipped iff if another flush operation is already running.. -// func (f IndicesFlush) WithWaitIfOngoing(v bool) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.WaitIfOngoing = &v @@ -228,7 +217,6 @@ func (f IndicesFlush) WithWaitIfOngoing(v bool) func(*IndicesFlushRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesFlush) WithPretty() func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.Pretty = true @@ -236,7 +224,6 @@ func (f IndicesFlush) WithPretty() func(*IndicesFlushRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesFlush) WithHuman() func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.Human = true @@ -244,7 +231,6 @@ func (f IndicesFlush) WithHuman() func(*IndicesFlushRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesFlush) WithErrorTrace() func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.ErrorTrace = true @@ -252,7 +238,6 @@ func (f IndicesFlush) WithErrorTrace() func(*IndicesFlushRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesFlush) WithFilterPath(v ...string) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { r.FilterPath = v @@ -260,7 +245,6 @@ func (f IndicesFlush) WithFilterPath(v ...string) func(*IndicesFlushRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesFlush) WithHeader(h map[string]string) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { if r.Header == nil { @@ -273,7 +257,6 @@ func (f IndicesFlush) WithHeader(h map[string]string) func(*IndicesFlushRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesFlush) WithOpaqueID(s string) func(*IndicesFlushRequest) { return func(r *IndicesFlushRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.flush_synced.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.flush_synced.go index a1d866ace687..2b413a055ffb 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.flush_synced.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.flush_synced.go @@ -46,12 +46,9 @@ func newIndicesFlushSyncedFunc(t Transport) IndicesFlushSynced { // ----- API Definition ------------------------------------------------------- // IndicesFlushSynced performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead -// -// type IndicesFlushSynced func(o ...func(*IndicesFlushSyncedRequest)) (*Response, error) // IndicesFlushSyncedRequest configures the Indices Flush Synced API request. -// type IndicesFlushSyncedRequest struct { Index []string @@ -70,7 +67,6 @@ type IndicesFlushSyncedRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesFlushSyncedRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -164,7 +160,6 @@ func (r IndicesFlushSyncedRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IndicesFlushSynced) WithContext(v context.Context) func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { r.ctx = v @@ -172,7 +167,6 @@ func (f IndicesFlushSynced) WithContext(v context.Context) func(*IndicesFlushSyn } // WithIndex - a list of index names; use _all for all indices. -// func (f IndicesFlushSynced) WithIndex(v ...string) func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { r.Index = v @@ -180,7 +174,6 @@ func (f IndicesFlushSynced) WithIndex(v ...string) func(*IndicesFlushSyncedReque } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesFlushSynced) WithAllowNoIndices(v bool) func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { r.AllowNoIndices = &v @@ -188,7 +181,6 @@ func (f IndicesFlushSynced) WithAllowNoIndices(v bool) func(*IndicesFlushSyncedR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesFlushSynced) WithExpandWildcards(v string) func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { r.ExpandWildcards = v @@ -196,7 +188,6 @@ func (f IndicesFlushSynced) WithExpandWildcards(v string) func(*IndicesFlushSync } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesFlushSynced) WithIgnoreUnavailable(v bool) func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { r.IgnoreUnavailable = &v @@ -204,7 +195,6 @@ func (f IndicesFlushSynced) WithIgnoreUnavailable(v bool) func(*IndicesFlushSync } // WithPretty makes the response body pretty-printed. -// func (f IndicesFlushSynced) WithPretty() func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { r.Pretty = true @@ -212,7 +202,6 @@ func (f IndicesFlushSynced) WithPretty() func(*IndicesFlushSyncedRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesFlushSynced) WithHuman() func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { r.Human = true @@ -220,7 +209,6 @@ func (f IndicesFlushSynced) WithHuman() func(*IndicesFlushSyncedRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesFlushSynced) WithErrorTrace() func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { r.ErrorTrace = true @@ -228,7 +216,6 @@ func (f IndicesFlushSynced) WithErrorTrace() func(*IndicesFlushSyncedRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesFlushSynced) WithFilterPath(v ...string) func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { r.FilterPath = v @@ -236,7 +223,6 @@ func (f IndicesFlushSynced) WithFilterPath(v ...string) func(*IndicesFlushSynced } // WithHeader adds the headers to the HTTP request. -// func (f IndicesFlushSynced) WithHeader(h map[string]string) func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { if r.Header == nil { @@ -249,7 +235,6 @@ func (f IndicesFlushSynced) WithHeader(h map[string]string) func(*IndicesFlushSy } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesFlushSynced) WithOpaqueID(s string) func(*IndicesFlushSyncedRequest) { return func(r *IndicesFlushSyncedRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.forcemerge.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.forcemerge.go index 712cb6d5a1d0..f28d4ac09770 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.forcemerge.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.forcemerge.go @@ -46,12 +46,9 @@ func newIndicesForcemergeFunc(t Transport) IndicesForcemerge { // ----- API Definition ------------------------------------------------------- // IndicesForcemerge performs the force merge operation on one or more indices. -// -// type IndicesForcemerge func(o ...func(*IndicesForcemergeRequest)) (*Response, error) // IndicesForcemergeRequest configures the Indices Forcemerge API request. -// type IndicesForcemergeRequest struct { Index []string @@ -73,7 +70,6 @@ type IndicesForcemergeRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesForcemergeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -177,7 +173,6 @@ func (r IndicesForcemergeRequest) Do(ctx context.Context, transport Transport) ( } // WithContext sets the request context. -// func (f IndicesForcemerge) WithContext(v context.Context) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.ctx = v @@ -185,7 +180,6 @@ func (f IndicesForcemerge) WithContext(v context.Context) func(*IndicesForcemerg } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesForcemerge) WithIndex(v ...string) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.Index = v @@ -193,7 +187,6 @@ func (f IndicesForcemerge) WithIndex(v ...string) func(*IndicesForcemergeRequest } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesForcemerge) WithAllowNoIndices(v bool) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.AllowNoIndices = &v @@ -201,7 +194,6 @@ func (f IndicesForcemerge) WithAllowNoIndices(v bool) func(*IndicesForcemergeReq } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesForcemerge) WithExpandWildcards(v string) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.ExpandWildcards = v @@ -209,7 +201,6 @@ func (f IndicesForcemerge) WithExpandWildcards(v string) func(*IndicesForcemerge } // WithFlush - specify whether the index should be flushed after performing the operation (default: true). -// func (f IndicesForcemerge) WithFlush(v bool) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.Flush = &v @@ -217,7 +208,6 @@ func (f IndicesForcemerge) WithFlush(v bool) func(*IndicesForcemergeRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesForcemerge) WithIgnoreUnavailable(v bool) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.IgnoreUnavailable = &v @@ -225,7 +215,6 @@ func (f IndicesForcemerge) WithIgnoreUnavailable(v bool) func(*IndicesForcemerge } // WithMaxNumSegments - the number of segments the index should be merged into (default: dynamic). -// func (f IndicesForcemerge) WithMaxNumSegments(v int) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.MaxNumSegments = &v @@ -233,7 +222,6 @@ func (f IndicesForcemerge) WithMaxNumSegments(v int) func(*IndicesForcemergeRequ } // WithOnlyExpungeDeletes - specify whether the operation should only expunge deleted documents. -// func (f IndicesForcemerge) WithOnlyExpungeDeletes(v bool) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.OnlyExpungeDeletes = &v @@ -241,7 +229,6 @@ func (f IndicesForcemerge) WithOnlyExpungeDeletes(v bool) func(*IndicesForcemerg } // WithPretty makes the response body pretty-printed. -// func (f IndicesForcemerge) WithPretty() func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.Pretty = true @@ -249,7 +236,6 @@ func (f IndicesForcemerge) WithPretty() func(*IndicesForcemergeRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesForcemerge) WithHuman() func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.Human = true @@ -257,7 +243,6 @@ func (f IndicesForcemerge) WithHuman() func(*IndicesForcemergeRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesForcemerge) WithErrorTrace() func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.ErrorTrace = true @@ -265,7 +250,6 @@ func (f IndicesForcemerge) WithErrorTrace() func(*IndicesForcemergeRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesForcemerge) WithFilterPath(v ...string) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { r.FilterPath = v @@ -273,7 +257,6 @@ func (f IndicesForcemerge) WithFilterPath(v ...string) func(*IndicesForcemergeRe } // WithHeader adds the headers to the HTTP request. -// func (f IndicesForcemerge) WithHeader(h map[string]string) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { if r.Header == nil { @@ -286,7 +269,6 @@ func (f IndicesForcemerge) WithHeader(h map[string]string) func(*IndicesForcemer } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesForcemerge) WithOpaqueID(s string) func(*IndicesForcemergeRequest) { return func(r *IndicesForcemergeRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get.go index c852f7ea83c0..213006b1aae3 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get.go @@ -47,12 +47,9 @@ func newIndicesGetFunc(t Transport) IndicesGet { // ----- API Definition ------------------------------------------------------- // IndicesGet returns information about one or more indices. -// -// type IndicesGet func(index []string, o ...func(*IndicesGetRequest)) (*Response, error) // IndicesGetRequest configures the Indices Get API request. -// type IndicesGetRequest struct { Index []string @@ -76,7 +73,6 @@ type IndicesGetRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesGetRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -184,7 +180,6 @@ func (r IndicesGetRequest) Do(ctx context.Context, transport Transport) (*Respon } // WithContext sets the request context. -// func (f IndicesGet) WithContext(v context.Context) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.ctx = v @@ -192,7 +187,6 @@ func (f IndicesGet) WithContext(v context.Context) func(*IndicesGetRequest) { } // WithAllowNoIndices - ignore if a wildcard expression resolves to no concrete indices (default: false). -// func (f IndicesGet) WithAllowNoIndices(v bool) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.AllowNoIndices = &v @@ -200,7 +194,6 @@ func (f IndicesGet) WithAllowNoIndices(v bool) func(*IndicesGetRequest) { } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -// func (f IndicesGet) WithExpandWildcards(v string) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.ExpandWildcards = v @@ -208,7 +201,6 @@ func (f IndicesGet) WithExpandWildcards(v string) func(*IndicesGetRequest) { } // WithFlatSettings - return settings in flat format (default: false). -// func (f IndicesGet) WithFlatSettings(v bool) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.FlatSettings = &v @@ -216,7 +208,6 @@ func (f IndicesGet) WithFlatSettings(v bool) func(*IndicesGetRequest) { } // WithIgnoreUnavailable - ignore unavailable indexes (default: false). -// func (f IndicesGet) WithIgnoreUnavailable(v bool) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.IgnoreUnavailable = &v @@ -224,7 +215,6 @@ func (f IndicesGet) WithIgnoreUnavailable(v bool) func(*IndicesGetRequest) { } // WithIncludeDefaults - whether to return all default setting for each of the indices.. -// func (f IndicesGet) WithIncludeDefaults(v bool) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.IncludeDefaults = &v @@ -232,7 +222,6 @@ func (f IndicesGet) WithIncludeDefaults(v bool) func(*IndicesGetRequest) { } // WithIncludeTypeName - whether to add the type name to the response (default: false). -// func (f IndicesGet) WithIncludeTypeName(v bool) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.IncludeTypeName = &v @@ -240,7 +229,6 @@ func (f IndicesGet) WithIncludeTypeName(v bool) func(*IndicesGetRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesGet) WithLocal(v bool) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.Local = &v @@ -248,7 +236,6 @@ func (f IndicesGet) WithLocal(v bool) func(*IndicesGetRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesGet) WithMasterTimeout(v time.Duration) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.MasterTimeout = v @@ -256,7 +243,6 @@ func (f IndicesGet) WithMasterTimeout(v time.Duration) func(*IndicesGetRequest) } // WithPretty makes the response body pretty-printed. -// func (f IndicesGet) WithPretty() func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.Pretty = true @@ -264,7 +250,6 @@ func (f IndicesGet) WithPretty() func(*IndicesGetRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesGet) WithHuman() func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.Human = true @@ -272,7 +257,6 @@ func (f IndicesGet) WithHuman() func(*IndicesGetRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesGet) WithErrorTrace() func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.ErrorTrace = true @@ -280,7 +264,6 @@ func (f IndicesGet) WithErrorTrace() func(*IndicesGetRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesGet) WithFilterPath(v ...string) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { r.FilterPath = v @@ -288,7 +271,6 @@ func (f IndicesGet) WithFilterPath(v ...string) func(*IndicesGetRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesGet) WithHeader(h map[string]string) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { if r.Header == nil { @@ -301,7 +283,6 @@ func (f IndicesGet) WithHeader(h map[string]string) func(*IndicesGetRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesGet) WithOpaqueID(s string) func(*IndicesGetRequest) { return func(r *IndicesGetRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_alias.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_alias.go index 5c91538782fa..b0964b32b1e2 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_alias.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_alias.go @@ -46,12 +46,9 @@ func newIndicesGetAliasFunc(t Transport) IndicesGetAlias { // ----- API Definition ------------------------------------------------------- // IndicesGetAlias returns an alias. -// -// type IndicesGetAlias func(o ...func(*IndicesGetAliasRequest)) (*Response, error) // IndicesGetAliasRequest configures the Indices Get Alias API request. -// type IndicesGetAliasRequest struct { Index []string @@ -73,7 +70,6 @@ type IndicesGetAliasRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesGetAliasRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -173,7 +169,6 @@ func (r IndicesGetAliasRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f IndicesGetAlias) WithContext(v context.Context) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.ctx = v @@ -181,7 +176,6 @@ func (f IndicesGetAlias) WithContext(v context.Context) func(*IndicesGetAliasReq } // WithIndex - a list of index names to filter aliases. -// func (f IndicesGetAlias) WithIndex(v ...string) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.Index = v @@ -189,7 +183,6 @@ func (f IndicesGetAlias) WithIndex(v ...string) func(*IndicesGetAliasRequest) { } // WithName - a list of alias names to return. -// func (f IndicesGetAlias) WithName(v ...string) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.Name = v @@ -197,7 +190,6 @@ func (f IndicesGetAlias) WithName(v ...string) func(*IndicesGetAliasRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesGetAlias) WithAllowNoIndices(v bool) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.AllowNoIndices = &v @@ -205,7 +197,6 @@ func (f IndicesGetAlias) WithAllowNoIndices(v bool) func(*IndicesGetAliasRequest } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesGetAlias) WithExpandWildcards(v string) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.ExpandWildcards = v @@ -213,7 +204,6 @@ func (f IndicesGetAlias) WithExpandWildcards(v string) func(*IndicesGetAliasRequ } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesGetAlias) WithIgnoreUnavailable(v bool) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.IgnoreUnavailable = &v @@ -221,7 +211,6 @@ func (f IndicesGetAlias) WithIgnoreUnavailable(v bool) func(*IndicesGetAliasRequ } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesGetAlias) WithLocal(v bool) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.Local = &v @@ -229,7 +218,6 @@ func (f IndicesGetAlias) WithLocal(v bool) func(*IndicesGetAliasRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesGetAlias) WithPretty() func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.Pretty = true @@ -237,7 +225,6 @@ func (f IndicesGetAlias) WithPretty() func(*IndicesGetAliasRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesGetAlias) WithHuman() func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.Human = true @@ -245,7 +232,6 @@ func (f IndicesGetAlias) WithHuman() func(*IndicesGetAliasRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesGetAlias) WithErrorTrace() func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.ErrorTrace = true @@ -253,7 +239,6 @@ func (f IndicesGetAlias) WithErrorTrace() func(*IndicesGetAliasRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesGetAlias) WithFilterPath(v ...string) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { r.FilterPath = v @@ -261,7 +246,6 @@ func (f IndicesGetAlias) WithFilterPath(v ...string) func(*IndicesGetAliasReques } // WithHeader adds the headers to the HTTP request. -// func (f IndicesGetAlias) WithHeader(h map[string]string) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { if r.Header == nil { @@ -274,7 +258,6 @@ func (f IndicesGetAlias) WithHeader(h map[string]string) func(*IndicesGetAliasRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesGetAlias) WithOpaqueID(s string) func(*IndicesGetAliasRequest) { return func(r *IndicesGetAliasRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_field_mapping.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_field_mapping.go index 18db396d5f05..2827f71990de 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_field_mapping.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_field_mapping.go @@ -46,12 +46,9 @@ func newIndicesGetFieldMappingFunc(t Transport) IndicesGetFieldMapping { // ----- API Definition ------------------------------------------------------- // IndicesGetFieldMapping returns mapping for one or more fields. -// -// type IndicesGetFieldMapping func(fields []string, o ...func(*IndicesGetFieldMappingRequest)) (*Response, error) // IndicesGetFieldMappingRequest configures the Indices Get Field Mapping API request. -// type IndicesGetFieldMappingRequest struct { Index []string DocumentType []string @@ -76,7 +73,6 @@ type IndicesGetFieldMappingRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesGetFieldMappingRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -188,7 +184,6 @@ func (r IndicesGetFieldMappingRequest) Do(ctx context.Context, transport Transpo } // WithContext sets the request context. -// func (f IndicesGetFieldMapping) WithContext(v context.Context) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.ctx = v @@ -196,7 +191,6 @@ func (f IndicesGetFieldMapping) WithContext(v context.Context) func(*IndicesGetF } // WithIndex - a list of index names. -// func (f IndicesGetFieldMapping) WithIndex(v ...string) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.Index = v @@ -204,7 +198,6 @@ func (f IndicesGetFieldMapping) WithIndex(v ...string) func(*IndicesGetFieldMapp } // WithDocumentType - a list of document types. -// func (f IndicesGetFieldMapping) WithDocumentType(v ...string) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.DocumentType = v @@ -212,7 +205,6 @@ func (f IndicesGetFieldMapping) WithDocumentType(v ...string) func(*IndicesGetFi } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesGetFieldMapping) WithAllowNoIndices(v bool) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.AllowNoIndices = &v @@ -220,7 +212,6 @@ func (f IndicesGetFieldMapping) WithAllowNoIndices(v bool) func(*IndicesGetField } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesGetFieldMapping) WithExpandWildcards(v string) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.ExpandWildcards = v @@ -228,7 +219,6 @@ func (f IndicesGetFieldMapping) WithExpandWildcards(v string) func(*IndicesGetFi } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesGetFieldMapping) WithIgnoreUnavailable(v bool) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.IgnoreUnavailable = &v @@ -236,7 +226,6 @@ func (f IndicesGetFieldMapping) WithIgnoreUnavailable(v bool) func(*IndicesGetFi } // WithIncludeDefaults - whether the default mapping values should be returned as well. -// func (f IndicesGetFieldMapping) WithIncludeDefaults(v bool) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.IncludeDefaults = &v @@ -244,7 +233,6 @@ func (f IndicesGetFieldMapping) WithIncludeDefaults(v bool) func(*IndicesGetFiel } // WithIncludeTypeName - whether a type should be returned in the body of the mappings.. -// func (f IndicesGetFieldMapping) WithIncludeTypeName(v bool) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.IncludeTypeName = &v @@ -252,7 +240,6 @@ func (f IndicesGetFieldMapping) WithIncludeTypeName(v bool) func(*IndicesGetFiel } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesGetFieldMapping) WithLocal(v bool) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.Local = &v @@ -260,7 +247,6 @@ func (f IndicesGetFieldMapping) WithLocal(v bool) func(*IndicesGetFieldMappingRe } // WithPretty makes the response body pretty-printed. -// func (f IndicesGetFieldMapping) WithPretty() func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.Pretty = true @@ -268,7 +254,6 @@ func (f IndicesGetFieldMapping) WithPretty() func(*IndicesGetFieldMappingRequest } // WithHuman makes statistical values human-readable. -// func (f IndicesGetFieldMapping) WithHuman() func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.Human = true @@ -276,7 +261,6 @@ func (f IndicesGetFieldMapping) WithHuman() func(*IndicesGetFieldMappingRequest) } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesGetFieldMapping) WithErrorTrace() func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.ErrorTrace = true @@ -284,7 +268,6 @@ func (f IndicesGetFieldMapping) WithErrorTrace() func(*IndicesGetFieldMappingReq } // WithFilterPath filters the properties of the response body. -// func (f IndicesGetFieldMapping) WithFilterPath(v ...string) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { r.FilterPath = v @@ -292,7 +275,6 @@ func (f IndicesGetFieldMapping) WithFilterPath(v ...string) func(*IndicesGetFiel } // WithHeader adds the headers to the HTTP request. -// func (f IndicesGetFieldMapping) WithHeader(h map[string]string) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { if r.Header == nil { @@ -305,7 +287,6 @@ func (f IndicesGetFieldMapping) WithHeader(h map[string]string) func(*IndicesGet } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesGetFieldMapping) WithOpaqueID(s string) func(*IndicesGetFieldMappingRequest) { return func(r *IndicesGetFieldMappingRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_index_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_index_template.go index e5bb78409b32..ab008198d639 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_index_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_index_template.go @@ -47,12 +47,9 @@ func newIndicesGetIndexTemplateFunc(t Transport) IndicesGetIndexTemplate { // ----- API Definition ------------------------------------------------------- // IndicesGetIndexTemplate returns an index template. -// -// type IndicesGetIndexTemplate func(o ...func(*IndicesGetIndexTemplateRequest)) (*Response, error) // IndicesGetIndexTemplateRequest configures the Indices Get Index Template API request. -// type IndicesGetIndexTemplateRequest struct { Name []string @@ -71,7 +68,6 @@ type IndicesGetIndexTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesGetIndexTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -163,7 +159,6 @@ func (r IndicesGetIndexTemplateRequest) Do(ctx context.Context, transport Transp } // WithContext sets the request context. -// func (f IndicesGetIndexTemplate) WithContext(v context.Context) func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.ctx = v @@ -171,7 +166,6 @@ func (f IndicesGetIndexTemplate) WithContext(v context.Context) func(*IndicesGet } // WithName - the comma separated names of the index templates. -// func (f IndicesGetIndexTemplate) WithName(v ...string) func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.Name = v @@ -179,7 +173,6 @@ func (f IndicesGetIndexTemplate) WithName(v ...string) func(*IndicesGetIndexTemp } // WithFlatSettings - return settings in flat format (default: false). -// func (f IndicesGetIndexTemplate) WithFlatSettings(v bool) func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.FlatSettings = &v @@ -187,7 +180,6 @@ func (f IndicesGetIndexTemplate) WithFlatSettings(v bool) func(*IndicesGetIndexT } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesGetIndexTemplate) WithLocal(v bool) func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.Local = &v @@ -195,7 +187,6 @@ func (f IndicesGetIndexTemplate) WithLocal(v bool) func(*IndicesGetIndexTemplate } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f IndicesGetIndexTemplate) WithMasterTimeout(v time.Duration) func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.MasterTimeout = v @@ -203,7 +194,6 @@ func (f IndicesGetIndexTemplate) WithMasterTimeout(v time.Duration) func(*Indice } // WithPretty makes the response body pretty-printed. -// func (f IndicesGetIndexTemplate) WithPretty() func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.Pretty = true @@ -211,7 +201,6 @@ func (f IndicesGetIndexTemplate) WithPretty() func(*IndicesGetIndexTemplateReque } // WithHuman makes statistical values human-readable. -// func (f IndicesGetIndexTemplate) WithHuman() func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.Human = true @@ -219,7 +208,6 @@ func (f IndicesGetIndexTemplate) WithHuman() func(*IndicesGetIndexTemplateReques } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesGetIndexTemplate) WithErrorTrace() func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.ErrorTrace = true @@ -227,7 +215,6 @@ func (f IndicesGetIndexTemplate) WithErrorTrace() func(*IndicesGetIndexTemplateR } // WithFilterPath filters the properties of the response body. -// func (f IndicesGetIndexTemplate) WithFilterPath(v ...string) func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { r.FilterPath = v @@ -235,7 +222,6 @@ func (f IndicesGetIndexTemplate) WithFilterPath(v ...string) func(*IndicesGetInd } // WithHeader adds the headers to the HTTP request. -// func (f IndicesGetIndexTemplate) WithHeader(h map[string]string) func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { if r.Header == nil { @@ -248,7 +234,6 @@ func (f IndicesGetIndexTemplate) WithHeader(h map[string]string) func(*IndicesGe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesGetIndexTemplate) WithOpaqueID(s string) func(*IndicesGetIndexTemplateRequest) { return func(r *IndicesGetIndexTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_mapping.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_mapping.go index f91f6921dc74..4ec4f34ddf19 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_mapping.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_mapping.go @@ -47,12 +47,9 @@ func newIndicesGetMappingFunc(t Transport) IndicesGetMapping { // ----- API Definition ------------------------------------------------------- // IndicesGetMapping returns mappings for one or more indices. -// -// type IndicesGetMapping func(o ...func(*IndicesGetMappingRequest)) (*Response, error) // IndicesGetMappingRequest configures the Indices Get Mapping API request. -// type IndicesGetMappingRequest struct { Index []string DocumentType []string @@ -75,7 +72,6 @@ type IndicesGetMappingRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesGetMappingRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -183,7 +179,6 @@ func (r IndicesGetMappingRequest) Do(ctx context.Context, transport Transport) ( } // WithContext sets the request context. -// func (f IndicesGetMapping) WithContext(v context.Context) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.ctx = v @@ -191,7 +186,6 @@ func (f IndicesGetMapping) WithContext(v context.Context) func(*IndicesGetMappin } // WithIndex - a list of index names. -// func (f IndicesGetMapping) WithIndex(v ...string) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.Index = v @@ -199,7 +193,6 @@ func (f IndicesGetMapping) WithIndex(v ...string) func(*IndicesGetMappingRequest } // WithDocumentType - a list of document types. -// func (f IndicesGetMapping) WithDocumentType(v ...string) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.DocumentType = v @@ -207,7 +200,6 @@ func (f IndicesGetMapping) WithDocumentType(v ...string) func(*IndicesGetMapping } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesGetMapping) WithAllowNoIndices(v bool) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.AllowNoIndices = &v @@ -215,7 +207,6 @@ func (f IndicesGetMapping) WithAllowNoIndices(v bool) func(*IndicesGetMappingReq } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesGetMapping) WithExpandWildcards(v string) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.ExpandWildcards = v @@ -223,7 +214,6 @@ func (f IndicesGetMapping) WithExpandWildcards(v string) func(*IndicesGetMapping } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesGetMapping) WithIgnoreUnavailable(v bool) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.IgnoreUnavailable = &v @@ -231,7 +221,6 @@ func (f IndicesGetMapping) WithIgnoreUnavailable(v bool) func(*IndicesGetMapping } // WithIncludeTypeName - whether to add the type name to the response (default: false). -// func (f IndicesGetMapping) WithIncludeTypeName(v bool) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.IncludeTypeName = &v @@ -239,7 +228,6 @@ func (f IndicesGetMapping) WithIncludeTypeName(v bool) func(*IndicesGetMappingRe } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesGetMapping) WithLocal(v bool) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.Local = &v @@ -247,7 +235,6 @@ func (f IndicesGetMapping) WithLocal(v bool) func(*IndicesGetMappingRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesGetMapping) WithMasterTimeout(v time.Duration) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.MasterTimeout = v @@ -255,7 +242,6 @@ func (f IndicesGetMapping) WithMasterTimeout(v time.Duration) func(*IndicesGetMa } // WithPretty makes the response body pretty-printed. -// func (f IndicesGetMapping) WithPretty() func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.Pretty = true @@ -263,7 +249,6 @@ func (f IndicesGetMapping) WithPretty() func(*IndicesGetMappingRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesGetMapping) WithHuman() func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.Human = true @@ -271,7 +256,6 @@ func (f IndicesGetMapping) WithHuman() func(*IndicesGetMappingRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesGetMapping) WithErrorTrace() func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.ErrorTrace = true @@ -279,7 +263,6 @@ func (f IndicesGetMapping) WithErrorTrace() func(*IndicesGetMappingRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesGetMapping) WithFilterPath(v ...string) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { r.FilterPath = v @@ -287,7 +270,6 @@ func (f IndicesGetMapping) WithFilterPath(v ...string) func(*IndicesGetMappingRe } // WithHeader adds the headers to the HTTP request. -// func (f IndicesGetMapping) WithHeader(h map[string]string) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { if r.Header == nil { @@ -300,7 +282,6 @@ func (f IndicesGetMapping) WithHeader(h map[string]string) func(*IndicesGetMappi } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesGetMapping) WithOpaqueID(s string) func(*IndicesGetMappingRequest) { return func(r *IndicesGetMappingRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_settings.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_settings.go index f16ecdffdbc8..6ab313f02b81 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_settings.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_settings.go @@ -47,12 +47,9 @@ func newIndicesGetSettingsFunc(t Transport) IndicesGetSettings { // ----- API Definition ------------------------------------------------------- // IndicesGetSettings returns settings for one or more indices. -// -// type IndicesGetSettings func(o ...func(*IndicesGetSettingsRequest)) (*Response, error) // IndicesGetSettingsRequest configures the Indices Get Settings API request. -// type IndicesGetSettingsRequest struct { Index []string @@ -77,7 +74,6 @@ type IndicesGetSettingsRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesGetSettingsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -189,7 +185,6 @@ func (r IndicesGetSettingsRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IndicesGetSettings) WithContext(v context.Context) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.ctx = v @@ -197,7 +192,6 @@ func (f IndicesGetSettings) WithContext(v context.Context) func(*IndicesGetSetti } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesGetSettings) WithIndex(v ...string) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.Index = v @@ -205,7 +199,6 @@ func (f IndicesGetSettings) WithIndex(v ...string) func(*IndicesGetSettingsReque } // WithName - the name of the settings that should be included. -// func (f IndicesGetSettings) WithName(v ...string) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.Name = v @@ -213,7 +206,6 @@ func (f IndicesGetSettings) WithName(v ...string) func(*IndicesGetSettingsReques } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesGetSettings) WithAllowNoIndices(v bool) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.AllowNoIndices = &v @@ -221,7 +213,6 @@ func (f IndicesGetSettings) WithAllowNoIndices(v bool) func(*IndicesGetSettingsR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesGetSettings) WithExpandWildcards(v string) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.ExpandWildcards = v @@ -229,7 +220,6 @@ func (f IndicesGetSettings) WithExpandWildcards(v string) func(*IndicesGetSettin } // WithFlatSettings - return settings in flat format (default: false). -// func (f IndicesGetSettings) WithFlatSettings(v bool) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.FlatSettings = &v @@ -237,7 +227,6 @@ func (f IndicesGetSettings) WithFlatSettings(v bool) func(*IndicesGetSettingsReq } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesGetSettings) WithIgnoreUnavailable(v bool) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.IgnoreUnavailable = &v @@ -245,7 +234,6 @@ func (f IndicesGetSettings) WithIgnoreUnavailable(v bool) func(*IndicesGetSettin } // WithIncludeDefaults - whether to return all default setting for each of the indices.. -// func (f IndicesGetSettings) WithIncludeDefaults(v bool) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.IncludeDefaults = &v @@ -253,7 +241,6 @@ func (f IndicesGetSettings) WithIncludeDefaults(v bool) func(*IndicesGetSettings } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesGetSettings) WithLocal(v bool) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.Local = &v @@ -261,7 +248,6 @@ func (f IndicesGetSettings) WithLocal(v bool) func(*IndicesGetSettingsRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesGetSettings) WithMasterTimeout(v time.Duration) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.MasterTimeout = v @@ -269,7 +255,6 @@ func (f IndicesGetSettings) WithMasterTimeout(v time.Duration) func(*IndicesGetS } // WithPretty makes the response body pretty-printed. -// func (f IndicesGetSettings) WithPretty() func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.Pretty = true @@ -277,7 +262,6 @@ func (f IndicesGetSettings) WithPretty() func(*IndicesGetSettingsRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesGetSettings) WithHuman() func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.Human = true @@ -285,7 +269,6 @@ func (f IndicesGetSettings) WithHuman() func(*IndicesGetSettingsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesGetSettings) WithErrorTrace() func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.ErrorTrace = true @@ -293,7 +276,6 @@ func (f IndicesGetSettings) WithErrorTrace() func(*IndicesGetSettingsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesGetSettings) WithFilterPath(v ...string) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { r.FilterPath = v @@ -301,7 +283,6 @@ func (f IndicesGetSettings) WithFilterPath(v ...string) func(*IndicesGetSettings } // WithHeader adds the headers to the HTTP request. -// func (f IndicesGetSettings) WithHeader(h map[string]string) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { if r.Header == nil { @@ -314,7 +295,6 @@ func (f IndicesGetSettings) WithHeader(h map[string]string) func(*IndicesGetSett } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesGetSettings) WithOpaqueID(s string) func(*IndicesGetSettingsRequest) { return func(r *IndicesGetSettingsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_template.go index 96cfcea55360..ed9538213cd9 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_template.go @@ -47,12 +47,9 @@ func newIndicesGetTemplateFunc(t Transport) IndicesGetTemplate { // ----- API Definition ------------------------------------------------------- // IndicesGetTemplate returns an index template. -// -// type IndicesGetTemplate func(o ...func(*IndicesGetTemplateRequest)) (*Response, error) // IndicesGetTemplateRequest configures the Indices Get Template API request. -// type IndicesGetTemplateRequest struct { Name []string @@ -72,7 +69,6 @@ type IndicesGetTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesGetTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -168,7 +164,6 @@ func (r IndicesGetTemplateRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IndicesGetTemplate) WithContext(v context.Context) func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.ctx = v @@ -176,7 +171,6 @@ func (f IndicesGetTemplate) WithContext(v context.Context) func(*IndicesGetTempl } // WithName - the comma separated names of the index templates. -// func (f IndicesGetTemplate) WithName(v ...string) func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.Name = v @@ -184,7 +178,6 @@ func (f IndicesGetTemplate) WithName(v ...string) func(*IndicesGetTemplateReques } // WithFlatSettings - return settings in flat format (default: false). -// func (f IndicesGetTemplate) WithFlatSettings(v bool) func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.FlatSettings = &v @@ -192,7 +185,6 @@ func (f IndicesGetTemplate) WithFlatSettings(v bool) func(*IndicesGetTemplateReq } // WithIncludeTypeName - whether a type should be returned in the body of the mappings.. -// func (f IndicesGetTemplate) WithIncludeTypeName(v bool) func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.IncludeTypeName = &v @@ -200,7 +192,6 @@ func (f IndicesGetTemplate) WithIncludeTypeName(v bool) func(*IndicesGetTemplate } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f IndicesGetTemplate) WithLocal(v bool) func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.Local = &v @@ -208,7 +199,6 @@ func (f IndicesGetTemplate) WithLocal(v bool) func(*IndicesGetTemplateRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f IndicesGetTemplate) WithMasterTimeout(v time.Duration) func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.MasterTimeout = v @@ -216,7 +206,6 @@ func (f IndicesGetTemplate) WithMasterTimeout(v time.Duration) func(*IndicesGetT } // WithPretty makes the response body pretty-printed. -// func (f IndicesGetTemplate) WithPretty() func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.Pretty = true @@ -224,7 +213,6 @@ func (f IndicesGetTemplate) WithPretty() func(*IndicesGetTemplateRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesGetTemplate) WithHuman() func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.Human = true @@ -232,7 +220,6 @@ func (f IndicesGetTemplate) WithHuman() func(*IndicesGetTemplateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesGetTemplate) WithErrorTrace() func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.ErrorTrace = true @@ -240,7 +227,6 @@ func (f IndicesGetTemplate) WithErrorTrace() func(*IndicesGetTemplateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesGetTemplate) WithFilterPath(v ...string) func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { r.FilterPath = v @@ -248,7 +234,6 @@ func (f IndicesGetTemplate) WithFilterPath(v ...string) func(*IndicesGetTemplate } // WithHeader adds the headers to the HTTP request. -// func (f IndicesGetTemplate) WithHeader(h map[string]string) func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { if r.Header == nil { @@ -261,7 +246,6 @@ func (f IndicesGetTemplate) WithHeader(h map[string]string) func(*IndicesGetTemp } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesGetTemplate) WithOpaqueID(s string) func(*IndicesGetTemplateRequest) { return func(r *IndicesGetTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_upgrade.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_upgrade.go index b18843dc85a7..ed3edde663fc 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_upgrade.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.get_upgrade.go @@ -46,12 +46,9 @@ func newIndicesGetUpgradeFunc(t Transport) IndicesGetUpgrade { // ----- API Definition ------------------------------------------------------- // IndicesGetUpgrade deprecated Returns a progress status of current upgrade. -// -// type IndicesGetUpgrade func(o ...func(*IndicesGetUpgradeRequest)) (*Response, error) // IndicesGetUpgradeRequest configures the Indices Get Upgrade API request. -// type IndicesGetUpgradeRequest struct { Index []string @@ -70,7 +67,6 @@ type IndicesGetUpgradeRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesGetUpgradeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -162,7 +158,6 @@ func (r IndicesGetUpgradeRequest) Do(ctx context.Context, transport Transport) ( } // WithContext sets the request context. -// func (f IndicesGetUpgrade) WithContext(v context.Context) func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { r.ctx = v @@ -170,7 +165,6 @@ func (f IndicesGetUpgrade) WithContext(v context.Context) func(*IndicesGetUpgrad } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesGetUpgrade) WithIndex(v ...string) func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { r.Index = v @@ -178,7 +172,6 @@ func (f IndicesGetUpgrade) WithIndex(v ...string) func(*IndicesGetUpgradeRequest } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesGetUpgrade) WithAllowNoIndices(v bool) func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { r.AllowNoIndices = &v @@ -186,7 +179,6 @@ func (f IndicesGetUpgrade) WithAllowNoIndices(v bool) func(*IndicesGetUpgradeReq } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesGetUpgrade) WithExpandWildcards(v string) func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { r.ExpandWildcards = v @@ -194,7 +186,6 @@ func (f IndicesGetUpgrade) WithExpandWildcards(v string) func(*IndicesGetUpgrade } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesGetUpgrade) WithIgnoreUnavailable(v bool) func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { r.IgnoreUnavailable = &v @@ -202,7 +193,6 @@ func (f IndicesGetUpgrade) WithIgnoreUnavailable(v bool) func(*IndicesGetUpgrade } // WithPretty makes the response body pretty-printed. -// func (f IndicesGetUpgrade) WithPretty() func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { r.Pretty = true @@ -210,7 +200,6 @@ func (f IndicesGetUpgrade) WithPretty() func(*IndicesGetUpgradeRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesGetUpgrade) WithHuman() func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { r.Human = true @@ -218,7 +207,6 @@ func (f IndicesGetUpgrade) WithHuman() func(*IndicesGetUpgradeRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesGetUpgrade) WithErrorTrace() func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { r.ErrorTrace = true @@ -226,7 +214,6 @@ func (f IndicesGetUpgrade) WithErrorTrace() func(*IndicesGetUpgradeRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesGetUpgrade) WithFilterPath(v ...string) func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { r.FilterPath = v @@ -234,7 +221,6 @@ func (f IndicesGetUpgrade) WithFilterPath(v ...string) func(*IndicesGetUpgradeRe } // WithHeader adds the headers to the HTTP request. -// func (f IndicesGetUpgrade) WithHeader(h map[string]string) func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { if r.Header == nil { @@ -247,7 +233,6 @@ func (f IndicesGetUpgrade) WithHeader(h map[string]string) func(*IndicesGetUpgra } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesGetUpgrade) WithOpaqueID(s string) func(*IndicesGetUpgradeRequest) { return func(r *IndicesGetUpgradeRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.open.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.open.go index 8e760700523f..2166f5daa17e 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.open.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.open.go @@ -47,12 +47,9 @@ func newIndicesOpenFunc(t Transport) IndicesOpen { // ----- API Definition ------------------------------------------------------- // IndicesOpen opens an index. -// -// type IndicesOpen func(index []string, o ...func(*IndicesOpenRequest)) (*Response, error) // IndicesOpenRequest configures the Indices Open API request. -// type IndicesOpenRequest struct { Index []string @@ -74,7 +71,6 @@ type IndicesOpenRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesOpenRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -176,7 +172,6 @@ func (r IndicesOpenRequest) Do(ctx context.Context, transport Transport) (*Respo } // WithContext sets the request context. -// func (f IndicesOpen) WithContext(v context.Context) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.ctx = v @@ -184,7 +179,6 @@ func (f IndicesOpen) WithContext(v context.Context) func(*IndicesOpenRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesOpen) WithAllowNoIndices(v bool) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.AllowNoIndices = &v @@ -192,7 +186,6 @@ func (f IndicesOpen) WithAllowNoIndices(v bool) func(*IndicesOpenRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesOpen) WithExpandWildcards(v string) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.ExpandWildcards = v @@ -200,7 +193,6 @@ func (f IndicesOpen) WithExpandWildcards(v string) func(*IndicesOpenRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesOpen) WithIgnoreUnavailable(v bool) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.IgnoreUnavailable = &v @@ -208,7 +200,6 @@ func (f IndicesOpen) WithIgnoreUnavailable(v bool) func(*IndicesOpenRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesOpen) WithMasterTimeout(v time.Duration) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.MasterTimeout = v @@ -216,7 +207,6 @@ func (f IndicesOpen) WithMasterTimeout(v time.Duration) func(*IndicesOpenRequest } // WithTimeout - explicit operation timeout. -// func (f IndicesOpen) WithTimeout(v time.Duration) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.Timeout = v @@ -224,7 +214,6 @@ func (f IndicesOpen) WithTimeout(v time.Duration) func(*IndicesOpenRequest) { } // WithWaitForActiveShards - sets the number of active shards to wait for before the operation returns.. -// func (f IndicesOpen) WithWaitForActiveShards(v string) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.WaitForActiveShards = v @@ -232,7 +221,6 @@ func (f IndicesOpen) WithWaitForActiveShards(v string) func(*IndicesOpenRequest) } // WithPretty makes the response body pretty-printed. -// func (f IndicesOpen) WithPretty() func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.Pretty = true @@ -240,7 +228,6 @@ func (f IndicesOpen) WithPretty() func(*IndicesOpenRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesOpen) WithHuman() func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.Human = true @@ -248,7 +235,6 @@ func (f IndicesOpen) WithHuman() func(*IndicesOpenRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesOpen) WithErrorTrace() func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.ErrorTrace = true @@ -256,7 +242,6 @@ func (f IndicesOpen) WithErrorTrace() func(*IndicesOpenRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesOpen) WithFilterPath(v ...string) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { r.FilterPath = v @@ -264,7 +249,6 @@ func (f IndicesOpen) WithFilterPath(v ...string) func(*IndicesOpenRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesOpen) WithHeader(h map[string]string) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { if r.Header == nil { @@ -277,7 +261,6 @@ func (f IndicesOpen) WithHeader(h map[string]string) func(*IndicesOpenRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesOpen) WithOpaqueID(s string) func(*IndicesOpenRequest) { return func(r *IndicesOpenRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_alias.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_alias.go index 64bf6ffe4fd2..142abe64014e 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_alias.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_alias.go @@ -47,12 +47,9 @@ func newIndicesPutAliasFunc(t Transport) IndicesPutAlias { // ----- API Definition ------------------------------------------------------- // IndicesPutAlias creates or updates an alias. -// -// type IndicesPutAlias func(index []string, name string, o ...func(*IndicesPutAliasRequest)) (*Response, error) // IndicesPutAliasRequest configures the Indices Put Alias API request. -// type IndicesPutAliasRequest struct { Index []string @@ -74,7 +71,6 @@ type IndicesPutAliasRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesPutAliasRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -166,7 +162,6 @@ func (r IndicesPutAliasRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f IndicesPutAlias) WithContext(v context.Context) func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { r.ctx = v @@ -174,7 +169,6 @@ func (f IndicesPutAlias) WithContext(v context.Context) func(*IndicesPutAliasReq } // WithBody - The settings for the alias, such as `routing` or `filter`. -// func (f IndicesPutAlias) WithBody(v io.Reader) func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { r.Body = v @@ -182,7 +176,6 @@ func (f IndicesPutAlias) WithBody(v io.Reader) func(*IndicesPutAliasRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesPutAlias) WithMasterTimeout(v time.Duration) func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { r.MasterTimeout = v @@ -190,7 +183,6 @@ func (f IndicesPutAlias) WithMasterTimeout(v time.Duration) func(*IndicesPutAlia } // WithTimeout - explicit timestamp for the document. -// func (f IndicesPutAlias) WithTimeout(v time.Duration) func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { r.Timeout = v @@ -198,7 +190,6 @@ func (f IndicesPutAlias) WithTimeout(v time.Duration) func(*IndicesPutAliasReque } // WithPretty makes the response body pretty-printed. -// func (f IndicesPutAlias) WithPretty() func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { r.Pretty = true @@ -206,7 +197,6 @@ func (f IndicesPutAlias) WithPretty() func(*IndicesPutAliasRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesPutAlias) WithHuman() func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { r.Human = true @@ -214,7 +204,6 @@ func (f IndicesPutAlias) WithHuman() func(*IndicesPutAliasRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesPutAlias) WithErrorTrace() func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { r.ErrorTrace = true @@ -222,7 +211,6 @@ func (f IndicesPutAlias) WithErrorTrace() func(*IndicesPutAliasRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesPutAlias) WithFilterPath(v ...string) func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { r.FilterPath = v @@ -230,7 +218,6 @@ func (f IndicesPutAlias) WithFilterPath(v ...string) func(*IndicesPutAliasReques } // WithHeader adds the headers to the HTTP request. -// func (f IndicesPutAlias) WithHeader(h map[string]string) func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { if r.Header == nil { @@ -243,7 +230,6 @@ func (f IndicesPutAlias) WithHeader(h map[string]string) func(*IndicesPutAliasRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesPutAlias) WithOpaqueID(s string) func(*IndicesPutAliasRequest) { return func(r *IndicesPutAliasRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_index_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_index_template.go index 05e85b133625..03808e53a4aa 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_index_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_index_template.go @@ -48,12 +48,9 @@ func newIndicesPutIndexTemplateFunc(t Transport) IndicesPutIndexTemplate { // ----- API Definition ------------------------------------------------------- // IndicesPutIndexTemplate creates or updates an index template. -// -// type IndicesPutIndexTemplate func(name string, body io.Reader, o ...func(*IndicesPutIndexTemplateRequest)) (*Response, error) // IndicesPutIndexTemplateRequest configures the Indices Put Index Template API request. -// type IndicesPutIndexTemplateRequest struct { Body io.Reader @@ -74,7 +71,6 @@ type IndicesPutIndexTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesPutIndexTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -168,7 +164,6 @@ func (r IndicesPutIndexTemplateRequest) Do(ctx context.Context, transport Transp } // WithContext sets the request context. -// func (f IndicesPutIndexTemplate) WithContext(v context.Context) func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { r.ctx = v @@ -176,7 +171,6 @@ func (f IndicesPutIndexTemplate) WithContext(v context.Context) func(*IndicesPut } // WithCause - user defined reason for creating/updating the index template. -// func (f IndicesPutIndexTemplate) WithCause(v string) func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { r.Cause = v @@ -184,7 +178,6 @@ func (f IndicesPutIndexTemplate) WithCause(v string) func(*IndicesPutIndexTempla } // WithCreate - whether the index template should only be added if new or can also replace an existing one. -// func (f IndicesPutIndexTemplate) WithCreate(v bool) func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { r.Create = &v @@ -192,7 +185,6 @@ func (f IndicesPutIndexTemplate) WithCreate(v bool) func(*IndicesPutIndexTemplat } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesPutIndexTemplate) WithMasterTimeout(v time.Duration) func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { r.MasterTimeout = v @@ -200,7 +192,6 @@ func (f IndicesPutIndexTemplate) WithMasterTimeout(v time.Duration) func(*Indice } // WithPretty makes the response body pretty-printed. -// func (f IndicesPutIndexTemplate) WithPretty() func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { r.Pretty = true @@ -208,7 +199,6 @@ func (f IndicesPutIndexTemplate) WithPretty() func(*IndicesPutIndexTemplateReque } // WithHuman makes statistical values human-readable. -// func (f IndicesPutIndexTemplate) WithHuman() func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { r.Human = true @@ -216,7 +206,6 @@ func (f IndicesPutIndexTemplate) WithHuman() func(*IndicesPutIndexTemplateReques } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesPutIndexTemplate) WithErrorTrace() func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { r.ErrorTrace = true @@ -224,7 +213,6 @@ func (f IndicesPutIndexTemplate) WithErrorTrace() func(*IndicesPutIndexTemplateR } // WithFilterPath filters the properties of the response body. -// func (f IndicesPutIndexTemplate) WithFilterPath(v ...string) func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { r.FilterPath = v @@ -232,7 +220,6 @@ func (f IndicesPutIndexTemplate) WithFilterPath(v ...string) func(*IndicesPutInd } // WithHeader adds the headers to the HTTP request. -// func (f IndicesPutIndexTemplate) WithHeader(h map[string]string) func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { if r.Header == nil { @@ -245,7 +232,6 @@ func (f IndicesPutIndexTemplate) WithHeader(h map[string]string) func(*IndicesPu } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesPutIndexTemplate) WithOpaqueID(s string) func(*IndicesPutIndexTemplateRequest) { return func(r *IndicesPutIndexTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_mapping.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_mapping.go index 254b48375dbe..3b9d561feffa 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_mapping.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_mapping.go @@ -48,12 +48,9 @@ func newIndicesPutMappingFunc(t Transport) IndicesPutMapping { // ----- API Definition ------------------------------------------------------- // IndicesPutMapping updates the index mappings. -// -// type IndicesPutMapping func(body io.Reader, o ...func(*IndicesPutMappingRequest)) (*Response, error) // IndicesPutMappingRequest configures the Indices Put Mapping API request. -// type IndicesPutMappingRequest struct { Index []string DocumentType string @@ -79,7 +76,6 @@ type IndicesPutMappingRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesPutMappingRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -195,7 +191,6 @@ func (r IndicesPutMappingRequest) Do(ctx context.Context, transport Transport) ( } // WithContext sets the request context. -// func (f IndicesPutMapping) WithContext(v context.Context) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.ctx = v @@ -203,7 +198,6 @@ func (f IndicesPutMapping) WithContext(v context.Context) func(*IndicesPutMappin } // WithIndex - a list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.. -// func (f IndicesPutMapping) WithIndex(v ...string) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.Index = v @@ -211,7 +205,6 @@ func (f IndicesPutMapping) WithIndex(v ...string) func(*IndicesPutMappingRequest } // WithDocumentType - the name of the document type. -// func (f IndicesPutMapping) WithDocumentType(v string) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.DocumentType = v @@ -219,7 +212,6 @@ func (f IndicesPutMapping) WithDocumentType(v string) func(*IndicesPutMappingReq } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesPutMapping) WithAllowNoIndices(v bool) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.AllowNoIndices = &v @@ -227,7 +219,6 @@ func (f IndicesPutMapping) WithAllowNoIndices(v bool) func(*IndicesPutMappingReq } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesPutMapping) WithExpandWildcards(v string) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.ExpandWildcards = v @@ -235,7 +226,6 @@ func (f IndicesPutMapping) WithExpandWildcards(v string) func(*IndicesPutMapping } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesPutMapping) WithIgnoreUnavailable(v bool) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.IgnoreUnavailable = &v @@ -243,7 +233,6 @@ func (f IndicesPutMapping) WithIgnoreUnavailable(v bool) func(*IndicesPutMapping } // WithIncludeTypeName - whether a type should be expected in the body of the mappings.. -// func (f IndicesPutMapping) WithIncludeTypeName(v bool) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.IncludeTypeName = &v @@ -251,7 +240,6 @@ func (f IndicesPutMapping) WithIncludeTypeName(v bool) func(*IndicesPutMappingRe } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesPutMapping) WithMasterTimeout(v time.Duration) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.MasterTimeout = v @@ -259,7 +247,6 @@ func (f IndicesPutMapping) WithMasterTimeout(v time.Duration) func(*IndicesPutMa } // WithTimeout - explicit operation timeout. -// func (f IndicesPutMapping) WithTimeout(v time.Duration) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.Timeout = v @@ -267,7 +254,6 @@ func (f IndicesPutMapping) WithTimeout(v time.Duration) func(*IndicesPutMappingR } // WithWriteIndexOnly - when true, applies mappings only to the write index of an alias or data stream. -// func (f IndicesPutMapping) WithWriteIndexOnly(v bool) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.WriteIndexOnly = &v @@ -275,7 +261,6 @@ func (f IndicesPutMapping) WithWriteIndexOnly(v bool) func(*IndicesPutMappingReq } // WithPretty makes the response body pretty-printed. -// func (f IndicesPutMapping) WithPretty() func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.Pretty = true @@ -283,7 +268,6 @@ func (f IndicesPutMapping) WithPretty() func(*IndicesPutMappingRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesPutMapping) WithHuman() func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.Human = true @@ -291,7 +275,6 @@ func (f IndicesPutMapping) WithHuman() func(*IndicesPutMappingRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesPutMapping) WithErrorTrace() func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.ErrorTrace = true @@ -299,7 +282,6 @@ func (f IndicesPutMapping) WithErrorTrace() func(*IndicesPutMappingRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesPutMapping) WithFilterPath(v ...string) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { r.FilterPath = v @@ -307,7 +289,6 @@ func (f IndicesPutMapping) WithFilterPath(v ...string) func(*IndicesPutMappingRe } // WithHeader adds the headers to the HTTP request. -// func (f IndicesPutMapping) WithHeader(h map[string]string) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { if r.Header == nil { @@ -320,7 +301,6 @@ func (f IndicesPutMapping) WithHeader(h map[string]string) func(*IndicesPutMappi } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesPutMapping) WithOpaqueID(s string) func(*IndicesPutMappingRequest) { return func(r *IndicesPutMappingRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_settings.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_settings.go index ea484805668b..bc356fc3092f 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_settings.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_settings.go @@ -48,12 +48,9 @@ func newIndicesPutSettingsFunc(t Transport) IndicesPutSettings { // ----- API Definition ------------------------------------------------------- // IndicesPutSettings updates the index settings. -// -// type IndicesPutSettings func(body io.Reader, o ...func(*IndicesPutSettingsRequest)) (*Response, error) // IndicesPutSettingsRequest configures the Indices Put Settings API request. -// type IndicesPutSettingsRequest struct { Index []string @@ -78,7 +75,6 @@ type IndicesPutSettingsRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesPutSettingsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -190,7 +186,6 @@ func (r IndicesPutSettingsRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IndicesPutSettings) WithContext(v context.Context) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.ctx = v @@ -198,7 +193,6 @@ func (f IndicesPutSettings) WithContext(v context.Context) func(*IndicesPutSetti } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesPutSettings) WithIndex(v ...string) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.Index = v @@ -206,7 +200,6 @@ func (f IndicesPutSettings) WithIndex(v ...string) func(*IndicesPutSettingsReque } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesPutSettings) WithAllowNoIndices(v bool) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.AllowNoIndices = &v @@ -214,7 +207,6 @@ func (f IndicesPutSettings) WithAllowNoIndices(v bool) func(*IndicesPutSettingsR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesPutSettings) WithExpandWildcards(v string) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.ExpandWildcards = v @@ -222,7 +214,6 @@ func (f IndicesPutSettings) WithExpandWildcards(v string) func(*IndicesPutSettin } // WithFlatSettings - return settings in flat format (default: false). -// func (f IndicesPutSettings) WithFlatSettings(v bool) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.FlatSettings = &v @@ -230,7 +221,6 @@ func (f IndicesPutSettings) WithFlatSettings(v bool) func(*IndicesPutSettingsReq } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesPutSettings) WithIgnoreUnavailable(v bool) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.IgnoreUnavailable = &v @@ -238,7 +228,6 @@ func (f IndicesPutSettings) WithIgnoreUnavailable(v bool) func(*IndicesPutSettin } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesPutSettings) WithMasterTimeout(v time.Duration) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.MasterTimeout = v @@ -246,7 +235,6 @@ func (f IndicesPutSettings) WithMasterTimeout(v time.Duration) func(*IndicesPutS } // WithPreserveExisting - whether to update existing settings. if set to `true` existing settings on an index remain unchanged, the default is `false`. -// func (f IndicesPutSettings) WithPreserveExisting(v bool) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.PreserveExisting = &v @@ -254,7 +242,6 @@ func (f IndicesPutSettings) WithPreserveExisting(v bool) func(*IndicesPutSetting } // WithTimeout - explicit operation timeout. -// func (f IndicesPutSettings) WithTimeout(v time.Duration) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.Timeout = v @@ -262,7 +249,6 @@ func (f IndicesPutSettings) WithTimeout(v time.Duration) func(*IndicesPutSetting } // WithPretty makes the response body pretty-printed. -// func (f IndicesPutSettings) WithPretty() func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.Pretty = true @@ -270,7 +256,6 @@ func (f IndicesPutSettings) WithPretty() func(*IndicesPutSettingsRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesPutSettings) WithHuman() func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.Human = true @@ -278,7 +263,6 @@ func (f IndicesPutSettings) WithHuman() func(*IndicesPutSettingsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesPutSettings) WithErrorTrace() func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.ErrorTrace = true @@ -286,7 +270,6 @@ func (f IndicesPutSettings) WithErrorTrace() func(*IndicesPutSettingsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesPutSettings) WithFilterPath(v ...string) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { r.FilterPath = v @@ -294,7 +277,6 @@ func (f IndicesPutSettings) WithFilterPath(v ...string) func(*IndicesPutSettings } // WithHeader adds the headers to the HTTP request. -// func (f IndicesPutSettings) WithHeader(h map[string]string) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { if r.Header == nil { @@ -307,7 +289,6 @@ func (f IndicesPutSettings) WithHeader(h map[string]string) func(*IndicesPutSett } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesPutSettings) WithOpaqueID(s string) func(*IndicesPutSettingsRequest) { return func(r *IndicesPutSettingsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_template.go index c6468bb0f97e..727c2c411e99 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.put_template.go @@ -48,12 +48,9 @@ func newIndicesPutTemplateFunc(t Transport) IndicesPutTemplate { // ----- API Definition ------------------------------------------------------- // IndicesPutTemplate creates or updates an index template. -// -// type IndicesPutTemplate func(name string, body io.Reader, o ...func(*IndicesPutTemplateRequest)) (*Response, error) // IndicesPutTemplateRequest configures the Indices Put Template API request. -// type IndicesPutTemplateRequest struct { Body io.Reader @@ -75,7 +72,6 @@ type IndicesPutTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesPutTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -173,7 +169,6 @@ func (r IndicesPutTemplateRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IndicesPutTemplate) WithContext(v context.Context) func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { r.ctx = v @@ -181,7 +176,6 @@ func (f IndicesPutTemplate) WithContext(v context.Context) func(*IndicesPutTempl } // WithCreate - whether the index template should only be added if new or can also replace an existing one. -// func (f IndicesPutTemplate) WithCreate(v bool) func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { r.Create = &v @@ -189,7 +183,6 @@ func (f IndicesPutTemplate) WithCreate(v bool) func(*IndicesPutTemplateRequest) } // WithIncludeTypeName - whether a type should be returned in the body of the mappings.. -// func (f IndicesPutTemplate) WithIncludeTypeName(v bool) func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { r.IncludeTypeName = &v @@ -197,7 +190,6 @@ func (f IndicesPutTemplate) WithIncludeTypeName(v bool) func(*IndicesPutTemplate } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesPutTemplate) WithMasterTimeout(v time.Duration) func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { r.MasterTimeout = v @@ -205,7 +197,6 @@ func (f IndicesPutTemplate) WithMasterTimeout(v time.Duration) func(*IndicesPutT } // WithOrder - the order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers). -// func (f IndicesPutTemplate) WithOrder(v int) func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { r.Order = &v @@ -213,7 +204,6 @@ func (f IndicesPutTemplate) WithOrder(v int) func(*IndicesPutTemplateRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesPutTemplate) WithPretty() func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { r.Pretty = true @@ -221,7 +211,6 @@ func (f IndicesPutTemplate) WithPretty() func(*IndicesPutTemplateRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesPutTemplate) WithHuman() func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { r.Human = true @@ -229,7 +218,6 @@ func (f IndicesPutTemplate) WithHuman() func(*IndicesPutTemplateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesPutTemplate) WithErrorTrace() func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { r.ErrorTrace = true @@ -237,7 +225,6 @@ func (f IndicesPutTemplate) WithErrorTrace() func(*IndicesPutTemplateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesPutTemplate) WithFilterPath(v ...string) func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { r.FilterPath = v @@ -245,7 +232,6 @@ func (f IndicesPutTemplate) WithFilterPath(v ...string) func(*IndicesPutTemplate } // WithHeader adds the headers to the HTTP request. -// func (f IndicesPutTemplate) WithHeader(h map[string]string) func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { if r.Header == nil { @@ -258,7 +244,6 @@ func (f IndicesPutTemplate) WithHeader(h map[string]string) func(*IndicesPutTemp } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesPutTemplate) WithOpaqueID(s string) func(*IndicesPutTemplateRequest) { return func(r *IndicesPutTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.recovery.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.recovery.go index af634d6bf32b..166641c13bc8 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.recovery.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.recovery.go @@ -46,12 +46,9 @@ func newIndicesRecoveryFunc(t Transport) IndicesRecovery { // ----- API Definition ------------------------------------------------------- // IndicesRecovery returns information about ongoing index shard recoveries. -// -// type IndicesRecovery func(o ...func(*IndicesRecoveryRequest)) (*Response, error) // IndicesRecoveryRequest configures the Indices Recovery API request. -// type IndicesRecoveryRequest struct { Index []string @@ -69,7 +66,6 @@ type IndicesRecoveryRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesRecoveryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -157,7 +153,6 @@ func (r IndicesRecoveryRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f IndicesRecovery) WithContext(v context.Context) func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { r.ctx = v @@ -165,7 +160,6 @@ func (f IndicesRecovery) WithContext(v context.Context) func(*IndicesRecoveryReq } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesRecovery) WithIndex(v ...string) func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { r.Index = v @@ -173,7 +167,6 @@ func (f IndicesRecovery) WithIndex(v ...string) func(*IndicesRecoveryRequest) { } // WithActiveOnly - display only those recoveries that are currently on-going. -// func (f IndicesRecovery) WithActiveOnly(v bool) func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { r.ActiveOnly = &v @@ -181,7 +174,6 @@ func (f IndicesRecovery) WithActiveOnly(v bool) func(*IndicesRecoveryRequest) { } // WithDetailed - whether to display detailed information about shard recovery. -// func (f IndicesRecovery) WithDetailed(v bool) func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { r.Detailed = &v @@ -189,7 +181,6 @@ func (f IndicesRecovery) WithDetailed(v bool) func(*IndicesRecoveryRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesRecovery) WithPretty() func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { r.Pretty = true @@ -197,7 +188,6 @@ func (f IndicesRecovery) WithPretty() func(*IndicesRecoveryRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesRecovery) WithHuman() func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { r.Human = true @@ -205,7 +195,6 @@ func (f IndicesRecovery) WithHuman() func(*IndicesRecoveryRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesRecovery) WithErrorTrace() func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { r.ErrorTrace = true @@ -213,7 +202,6 @@ func (f IndicesRecovery) WithErrorTrace() func(*IndicesRecoveryRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesRecovery) WithFilterPath(v ...string) func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { r.FilterPath = v @@ -221,7 +209,6 @@ func (f IndicesRecovery) WithFilterPath(v ...string) func(*IndicesRecoveryReques } // WithHeader adds the headers to the HTTP request. -// func (f IndicesRecovery) WithHeader(h map[string]string) func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { if r.Header == nil { @@ -234,7 +221,6 @@ func (f IndicesRecovery) WithHeader(h map[string]string) func(*IndicesRecoveryRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesRecovery) WithOpaqueID(s string) func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.refresh.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.refresh.go index f666309a903d..f6089263b2ae 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.refresh.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.refresh.go @@ -46,12 +46,9 @@ func newIndicesRefreshFunc(t Transport) IndicesRefresh { // ----- API Definition ------------------------------------------------------- // IndicesRefresh performs the refresh operation in one or more indices. -// -// type IndicesRefresh func(o ...func(*IndicesRefreshRequest)) (*Response, error) // IndicesRefreshRequest configures the Indices Refresh API request. -// type IndicesRefreshRequest struct { Index []string @@ -70,7 +67,6 @@ type IndicesRefreshRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesRefreshRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -162,7 +158,6 @@ func (r IndicesRefreshRequest) Do(ctx context.Context, transport Transport) (*Re } // WithContext sets the request context. -// func (f IndicesRefresh) WithContext(v context.Context) func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.ctx = v @@ -170,7 +165,6 @@ func (f IndicesRefresh) WithContext(v context.Context) func(*IndicesRefreshReque } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesRefresh) WithIndex(v ...string) func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.Index = v @@ -178,7 +172,6 @@ func (f IndicesRefresh) WithIndex(v ...string) func(*IndicesRefreshRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesRefresh) WithAllowNoIndices(v bool) func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.AllowNoIndices = &v @@ -186,7 +179,6 @@ func (f IndicesRefresh) WithAllowNoIndices(v bool) func(*IndicesRefreshRequest) } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesRefresh) WithExpandWildcards(v string) func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.ExpandWildcards = v @@ -194,7 +186,6 @@ func (f IndicesRefresh) WithExpandWildcards(v string) func(*IndicesRefreshReques } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesRefresh) WithIgnoreUnavailable(v bool) func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.IgnoreUnavailable = &v @@ -202,7 +193,6 @@ func (f IndicesRefresh) WithIgnoreUnavailable(v bool) func(*IndicesRefreshReques } // WithPretty makes the response body pretty-printed. -// func (f IndicesRefresh) WithPretty() func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.Pretty = true @@ -210,7 +200,6 @@ func (f IndicesRefresh) WithPretty() func(*IndicesRefreshRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesRefresh) WithHuman() func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.Human = true @@ -218,7 +207,6 @@ func (f IndicesRefresh) WithHuman() func(*IndicesRefreshRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesRefresh) WithErrorTrace() func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.ErrorTrace = true @@ -226,7 +214,6 @@ func (f IndicesRefresh) WithErrorTrace() func(*IndicesRefreshRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesRefresh) WithFilterPath(v ...string) func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { r.FilterPath = v @@ -234,7 +221,6 @@ func (f IndicesRefresh) WithFilterPath(v ...string) func(*IndicesRefreshRequest) } // WithHeader adds the headers to the HTTP request. -// func (f IndicesRefresh) WithHeader(h map[string]string) func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { if r.Header == nil { @@ -247,7 +233,6 @@ func (f IndicesRefresh) WithHeader(h map[string]string) func(*IndicesRefreshRequ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesRefresh) WithOpaqueID(s string) func(*IndicesRefreshRequest) { return func(r *IndicesRefreshRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.resolve_index.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.resolve_index.go index 1411d980e793..0d5fccfad6f2 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.resolve_index.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.resolve_index.go @@ -47,12 +47,9 @@ func newIndicesResolveIndexFunc(t Transport) IndicesResolveIndex { // IndicesResolveIndex returns information about any matching indices, aliases, and data streams // // This API is experimental. -// -// type IndicesResolveIndex func(name []string, o ...func(*IndicesResolveIndexRequest)) (*Response, error) // IndicesResolveIndexRequest configures the Indices Resolve Index API request. -// type IndicesResolveIndexRequest struct { Name []string @@ -69,7 +66,6 @@ type IndicesResolveIndexRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesResolveIndexRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -153,7 +149,6 @@ func (r IndicesResolveIndexRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IndicesResolveIndex) WithContext(v context.Context) func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { r.ctx = v @@ -161,7 +156,6 @@ func (f IndicesResolveIndex) WithContext(v context.Context) func(*IndicesResolve } // WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). -// func (f IndicesResolveIndex) WithExpandWildcards(v string) func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { r.ExpandWildcards = v @@ -169,7 +163,6 @@ func (f IndicesResolveIndex) WithExpandWildcards(v string) func(*IndicesResolveI } // WithPretty makes the response body pretty-printed. -// func (f IndicesResolveIndex) WithPretty() func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { r.Pretty = true @@ -177,7 +170,6 @@ func (f IndicesResolveIndex) WithPretty() func(*IndicesResolveIndexRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesResolveIndex) WithHuman() func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { r.Human = true @@ -185,7 +177,6 @@ func (f IndicesResolveIndex) WithHuman() func(*IndicesResolveIndexRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesResolveIndex) WithErrorTrace() func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { r.ErrorTrace = true @@ -193,7 +184,6 @@ func (f IndicesResolveIndex) WithErrorTrace() func(*IndicesResolveIndexRequest) } // WithFilterPath filters the properties of the response body. -// func (f IndicesResolveIndex) WithFilterPath(v ...string) func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { r.FilterPath = v @@ -201,7 +191,6 @@ func (f IndicesResolveIndex) WithFilterPath(v ...string) func(*IndicesResolveInd } // WithHeader adds the headers to the HTTP request. -// func (f IndicesResolveIndex) WithHeader(h map[string]string) func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { if r.Header == nil { @@ -214,7 +203,6 @@ func (f IndicesResolveIndex) WithHeader(h map[string]string) func(*IndicesResolv } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesResolveIndex) WithOpaqueID(s string) func(*IndicesResolveIndexRequest) { return func(r *IndicesResolveIndexRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.rollover.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.rollover.go index ffd5fa93e96c..e32736846bd1 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.rollover.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.rollover.go @@ -49,12 +49,9 @@ func newIndicesRolloverFunc(t Transport) IndicesRollover { // IndicesRollover updates an alias to point to a new index when the existing index // is considered to be too large or too old. -// -// type IndicesRollover func(alias string, o ...func(*IndicesRolloverRequest)) (*Response, error) // IndicesRolloverRequest configures the Indices Rollover API request. -// type IndicesRolloverRequest struct { Body io.Reader @@ -78,7 +75,6 @@ type IndicesRolloverRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesRolloverRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -184,7 +180,6 @@ func (r IndicesRolloverRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f IndicesRollover) WithContext(v context.Context) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.ctx = v @@ -192,7 +187,6 @@ func (f IndicesRollover) WithContext(v context.Context) func(*IndicesRolloverReq } // WithBody - The conditions that needs to be met for executing rollover. -// func (f IndicesRollover) WithBody(v io.Reader) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.Body = v @@ -200,7 +194,6 @@ func (f IndicesRollover) WithBody(v io.Reader) func(*IndicesRolloverRequest) { } // WithNewIndex - the name of the rollover index. -// func (f IndicesRollover) WithNewIndex(v string) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.NewIndex = v @@ -208,7 +201,6 @@ func (f IndicesRollover) WithNewIndex(v string) func(*IndicesRolloverRequest) { } // WithDryRun - if set to true the rollover action will only be validated but not actually performed even if a condition matches. the default is false. -// func (f IndicesRollover) WithDryRun(v bool) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.DryRun = &v @@ -216,7 +208,6 @@ func (f IndicesRollover) WithDryRun(v bool) func(*IndicesRolloverRequest) { } // WithIncludeTypeName - whether a type should be included in the body of the mappings.. -// func (f IndicesRollover) WithIncludeTypeName(v bool) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.IncludeTypeName = &v @@ -224,7 +215,6 @@ func (f IndicesRollover) WithIncludeTypeName(v bool) func(*IndicesRolloverReques } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesRollover) WithMasterTimeout(v time.Duration) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.MasterTimeout = v @@ -232,7 +222,6 @@ func (f IndicesRollover) WithMasterTimeout(v time.Duration) func(*IndicesRollove } // WithTimeout - explicit operation timeout. -// func (f IndicesRollover) WithTimeout(v time.Duration) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.Timeout = v @@ -240,7 +229,6 @@ func (f IndicesRollover) WithTimeout(v time.Duration) func(*IndicesRolloverReque } // WithWaitForActiveShards - set the number of active shards to wait for on the newly created rollover index before the operation returns.. -// func (f IndicesRollover) WithWaitForActiveShards(v string) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.WaitForActiveShards = v @@ -248,7 +236,6 @@ func (f IndicesRollover) WithWaitForActiveShards(v string) func(*IndicesRollover } // WithPretty makes the response body pretty-printed. -// func (f IndicesRollover) WithPretty() func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.Pretty = true @@ -256,7 +243,6 @@ func (f IndicesRollover) WithPretty() func(*IndicesRolloverRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesRollover) WithHuman() func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.Human = true @@ -264,7 +250,6 @@ func (f IndicesRollover) WithHuman() func(*IndicesRolloverRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesRollover) WithErrorTrace() func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.ErrorTrace = true @@ -272,7 +257,6 @@ func (f IndicesRollover) WithErrorTrace() func(*IndicesRolloverRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesRollover) WithFilterPath(v ...string) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { r.FilterPath = v @@ -280,7 +264,6 @@ func (f IndicesRollover) WithFilterPath(v ...string) func(*IndicesRolloverReques } // WithHeader adds the headers to the HTTP request. -// func (f IndicesRollover) WithHeader(h map[string]string) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { if r.Header == nil { @@ -293,7 +276,6 @@ func (f IndicesRollover) WithHeader(h map[string]string) func(*IndicesRolloverRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesRollover) WithOpaqueID(s string) func(*IndicesRolloverRequest) { return func(r *IndicesRolloverRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.segments.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.segments.go index 60367e39e6de..ff7814c8ca2e 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.segments.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.segments.go @@ -46,12 +46,9 @@ func newIndicesSegmentsFunc(t Transport) IndicesSegments { // ----- API Definition ------------------------------------------------------- // IndicesSegments provides low-level information about segments in a Lucene index. -// -// type IndicesSegments func(o ...func(*IndicesSegmentsRequest)) (*Response, error) // IndicesSegmentsRequest configures the Indices Segments API request. -// type IndicesSegmentsRequest struct { Index []string @@ -71,7 +68,6 @@ type IndicesSegmentsRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesSegmentsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -167,7 +163,6 @@ func (r IndicesSegmentsRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f IndicesSegments) WithContext(v context.Context) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.ctx = v @@ -175,7 +170,6 @@ func (f IndicesSegments) WithContext(v context.Context) func(*IndicesSegmentsReq } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesSegments) WithIndex(v ...string) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.Index = v @@ -183,7 +177,6 @@ func (f IndicesSegments) WithIndex(v ...string) func(*IndicesSegmentsRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesSegments) WithAllowNoIndices(v bool) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.AllowNoIndices = &v @@ -191,7 +184,6 @@ func (f IndicesSegments) WithAllowNoIndices(v bool) func(*IndicesSegmentsRequest } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesSegments) WithExpandWildcards(v string) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.ExpandWildcards = v @@ -199,7 +191,6 @@ func (f IndicesSegments) WithExpandWildcards(v string) func(*IndicesSegmentsRequ } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesSegments) WithIgnoreUnavailable(v bool) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.IgnoreUnavailable = &v @@ -207,7 +198,6 @@ func (f IndicesSegments) WithIgnoreUnavailable(v bool) func(*IndicesSegmentsRequ } // WithVerbose - includes detailed memory usage by lucene.. -// func (f IndicesSegments) WithVerbose(v bool) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.Verbose = &v @@ -215,7 +205,6 @@ func (f IndicesSegments) WithVerbose(v bool) func(*IndicesSegmentsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesSegments) WithPretty() func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.Pretty = true @@ -223,7 +212,6 @@ func (f IndicesSegments) WithPretty() func(*IndicesSegmentsRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesSegments) WithHuman() func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.Human = true @@ -231,7 +219,6 @@ func (f IndicesSegments) WithHuman() func(*IndicesSegmentsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesSegments) WithErrorTrace() func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.ErrorTrace = true @@ -239,7 +226,6 @@ func (f IndicesSegments) WithErrorTrace() func(*IndicesSegmentsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesSegments) WithFilterPath(v ...string) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { r.FilterPath = v @@ -247,7 +233,6 @@ func (f IndicesSegments) WithFilterPath(v ...string) func(*IndicesSegmentsReques } // WithHeader adds the headers to the HTTP request. -// func (f IndicesSegments) WithHeader(h map[string]string) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { if r.Header == nil { @@ -260,7 +245,6 @@ func (f IndicesSegments) WithHeader(h map[string]string) func(*IndicesSegmentsRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesSegments) WithOpaqueID(s string) func(*IndicesSegmentsRequest) { return func(r *IndicesSegmentsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.shard_stores.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.shard_stores.go index 181c0bcf8934..b718f60d1232 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.shard_stores.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.shard_stores.go @@ -46,12 +46,9 @@ func newIndicesShardStoresFunc(t Transport) IndicesShardStores { // ----- API Definition ------------------------------------------------------- // IndicesShardStores provides store information for shard copies of indices. -// -// type IndicesShardStores func(o ...func(*IndicesShardStoresRequest)) (*Response, error) // IndicesShardStoresRequest configures the Indices Shard Stores API request. -// type IndicesShardStoresRequest struct { Index []string @@ -71,7 +68,6 @@ type IndicesShardStoresRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesShardStoresRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -167,7 +163,6 @@ func (r IndicesShardStoresRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IndicesShardStores) WithContext(v context.Context) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.ctx = v @@ -175,7 +170,6 @@ func (f IndicesShardStores) WithContext(v context.Context) func(*IndicesShardSto } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesShardStores) WithIndex(v ...string) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.Index = v @@ -183,7 +177,6 @@ func (f IndicesShardStores) WithIndex(v ...string) func(*IndicesShardStoresReque } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesShardStores) WithAllowNoIndices(v bool) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.AllowNoIndices = &v @@ -191,7 +184,6 @@ func (f IndicesShardStores) WithAllowNoIndices(v bool) func(*IndicesShardStoresR } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesShardStores) WithExpandWildcards(v string) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.ExpandWildcards = v @@ -199,7 +191,6 @@ func (f IndicesShardStores) WithExpandWildcards(v string) func(*IndicesShardStor } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesShardStores) WithIgnoreUnavailable(v bool) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.IgnoreUnavailable = &v @@ -207,7 +198,6 @@ func (f IndicesShardStores) WithIgnoreUnavailable(v bool) func(*IndicesShardStor } // WithStatus - a list of statuses used to filter on shards to get store information for. -// func (f IndicesShardStores) WithStatus(v ...string) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.Status = v @@ -215,7 +205,6 @@ func (f IndicesShardStores) WithStatus(v ...string) func(*IndicesShardStoresRequ } // WithPretty makes the response body pretty-printed. -// func (f IndicesShardStores) WithPretty() func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.Pretty = true @@ -223,7 +212,6 @@ func (f IndicesShardStores) WithPretty() func(*IndicesShardStoresRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesShardStores) WithHuman() func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.Human = true @@ -231,7 +219,6 @@ func (f IndicesShardStores) WithHuman() func(*IndicesShardStoresRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesShardStores) WithErrorTrace() func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.ErrorTrace = true @@ -239,7 +226,6 @@ func (f IndicesShardStores) WithErrorTrace() func(*IndicesShardStoresRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesShardStores) WithFilterPath(v ...string) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { r.FilterPath = v @@ -247,7 +233,6 @@ func (f IndicesShardStores) WithFilterPath(v ...string) func(*IndicesShardStores } // WithHeader adds the headers to the HTTP request. -// func (f IndicesShardStores) WithHeader(h map[string]string) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { if r.Header == nil { @@ -260,7 +245,6 @@ func (f IndicesShardStores) WithHeader(h map[string]string) func(*IndicesShardSt } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesShardStores) WithOpaqueID(s string) func(*IndicesShardStoresRequest) { return func(r *IndicesShardStoresRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.shrink.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.shrink.go index d37b4bbfd264..0a8b63c73ce1 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.shrink.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.shrink.go @@ -48,12 +48,9 @@ func newIndicesShrinkFunc(t Transport) IndicesShrink { // ----- API Definition ------------------------------------------------------- // IndicesShrink allow to shrink an existing index into a new index with fewer primary shards. -// -// type IndicesShrink func(index string, target string, o ...func(*IndicesShrinkRequest)) (*Response, error) // IndicesShrinkRequest configures the Indices Shrink API request. -// type IndicesShrinkRequest struct { Index string @@ -77,7 +74,6 @@ type IndicesShrinkRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesShrinkRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -177,7 +173,6 @@ func (r IndicesShrinkRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f IndicesShrink) WithContext(v context.Context) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.ctx = v @@ -185,7 +180,6 @@ func (f IndicesShrink) WithContext(v context.Context) func(*IndicesShrinkRequest } // WithBody - The configuration for the target index (`settings` and `aliases`). -// func (f IndicesShrink) WithBody(v io.Reader) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.Body = v @@ -193,7 +187,6 @@ func (f IndicesShrink) WithBody(v io.Reader) func(*IndicesShrinkRequest) { } // WithCopySettings - whether or not to copy settings from the source index (defaults to false). -// func (f IndicesShrink) WithCopySettings(v bool) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.CopySettings = &v @@ -201,7 +194,6 @@ func (f IndicesShrink) WithCopySettings(v bool) func(*IndicesShrinkRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesShrink) WithMasterTimeout(v time.Duration) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.MasterTimeout = v @@ -209,7 +201,6 @@ func (f IndicesShrink) WithMasterTimeout(v time.Duration) func(*IndicesShrinkReq } // WithTimeout - explicit operation timeout. -// func (f IndicesShrink) WithTimeout(v time.Duration) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.Timeout = v @@ -217,7 +208,6 @@ func (f IndicesShrink) WithTimeout(v time.Duration) func(*IndicesShrinkRequest) } // WithWaitForActiveShards - set the number of active shards to wait for on the shrunken index before the operation returns.. -// func (f IndicesShrink) WithWaitForActiveShards(v string) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.WaitForActiveShards = v @@ -225,7 +215,6 @@ func (f IndicesShrink) WithWaitForActiveShards(v string) func(*IndicesShrinkRequ } // WithPretty makes the response body pretty-printed. -// func (f IndicesShrink) WithPretty() func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.Pretty = true @@ -233,7 +222,6 @@ func (f IndicesShrink) WithPretty() func(*IndicesShrinkRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesShrink) WithHuman() func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.Human = true @@ -241,7 +229,6 @@ func (f IndicesShrink) WithHuman() func(*IndicesShrinkRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesShrink) WithErrorTrace() func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.ErrorTrace = true @@ -249,7 +236,6 @@ func (f IndicesShrink) WithErrorTrace() func(*IndicesShrinkRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesShrink) WithFilterPath(v ...string) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { r.FilterPath = v @@ -257,7 +243,6 @@ func (f IndicesShrink) WithFilterPath(v ...string) func(*IndicesShrinkRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesShrink) WithHeader(h map[string]string) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { if r.Header == nil { @@ -270,7 +255,6 @@ func (f IndicesShrink) WithHeader(h map[string]string) func(*IndicesShrinkReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesShrink) WithOpaqueID(s string) func(*IndicesShrinkRequest) { return func(r *IndicesShrinkRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.simulate_index_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.simulate_index_template.go index 87951d3dcb84..df672abb3d88 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.simulate_index_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.simulate_index_template.go @@ -48,12 +48,9 @@ func newIndicesSimulateIndexTemplateFunc(t Transport) IndicesSimulateIndexTempla // ----- API Definition ------------------------------------------------------- // IndicesSimulateIndexTemplate simulate matching the given index name against the index templates in the system -// -// type IndicesSimulateIndexTemplate func(name string, o ...func(*IndicesSimulateIndexTemplateRequest)) (*Response, error) // IndicesSimulateIndexTemplateRequest configures the Indices Simulate Index Template API request. -// type IndicesSimulateIndexTemplateRequest struct { Body io.Reader @@ -74,7 +71,6 @@ type IndicesSimulateIndexTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesSimulateIndexTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -170,7 +166,6 @@ func (r IndicesSimulateIndexTemplateRequest) Do(ctx context.Context, transport T } // WithContext sets the request context. -// func (f IndicesSimulateIndexTemplate) WithContext(v context.Context) func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { r.ctx = v @@ -178,7 +173,6 @@ func (f IndicesSimulateIndexTemplate) WithContext(v context.Context) func(*Indic } // WithBody - New index template definition, which will be included in the simulation, as if it already exists in the system. -// func (f IndicesSimulateIndexTemplate) WithBody(v io.Reader) func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { r.Body = v @@ -186,7 +180,6 @@ func (f IndicesSimulateIndexTemplate) WithBody(v io.Reader) func(*IndicesSimulat } // WithCause - user defined reason for dry-run creating the new template for simulation purposes. -// func (f IndicesSimulateIndexTemplate) WithCause(v string) func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { r.Cause = v @@ -194,7 +187,6 @@ func (f IndicesSimulateIndexTemplate) WithCause(v string) func(*IndicesSimulateI } // WithCreate - whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one. -// func (f IndicesSimulateIndexTemplate) WithCreate(v bool) func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { r.Create = &v @@ -202,7 +194,6 @@ func (f IndicesSimulateIndexTemplate) WithCreate(v bool) func(*IndicesSimulateIn } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesSimulateIndexTemplate) WithMasterTimeout(v time.Duration) func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { r.MasterTimeout = v @@ -210,7 +201,6 @@ func (f IndicesSimulateIndexTemplate) WithMasterTimeout(v time.Duration) func(*I } // WithPretty makes the response body pretty-printed. -// func (f IndicesSimulateIndexTemplate) WithPretty() func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { r.Pretty = true @@ -218,7 +208,6 @@ func (f IndicesSimulateIndexTemplate) WithPretty() func(*IndicesSimulateIndexTem } // WithHuman makes statistical values human-readable. -// func (f IndicesSimulateIndexTemplate) WithHuman() func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { r.Human = true @@ -226,7 +215,6 @@ func (f IndicesSimulateIndexTemplate) WithHuman() func(*IndicesSimulateIndexTemp } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesSimulateIndexTemplate) WithErrorTrace() func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { r.ErrorTrace = true @@ -234,7 +222,6 @@ func (f IndicesSimulateIndexTemplate) WithErrorTrace() func(*IndicesSimulateInde } // WithFilterPath filters the properties of the response body. -// func (f IndicesSimulateIndexTemplate) WithFilterPath(v ...string) func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { r.FilterPath = v @@ -242,7 +229,6 @@ func (f IndicesSimulateIndexTemplate) WithFilterPath(v ...string) func(*IndicesS } // WithHeader adds the headers to the HTTP request. -// func (f IndicesSimulateIndexTemplate) WithHeader(h map[string]string) func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { if r.Header == nil { @@ -255,7 +241,6 @@ func (f IndicesSimulateIndexTemplate) WithHeader(h map[string]string) func(*Indi } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesSimulateIndexTemplate) WithOpaqueID(s string) func(*IndicesSimulateIndexTemplateRequest) { return func(r *IndicesSimulateIndexTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.simulate_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.simulate_template.go index 12ce8e9a76ab..f44f7477f707 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.simulate_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.simulate_template.go @@ -48,12 +48,9 @@ func newIndicesSimulateTemplateFunc(t Transport) IndicesSimulateTemplate { // ----- API Definition ------------------------------------------------------- // IndicesSimulateTemplate simulate resolving the given template name or body -// -// type IndicesSimulateTemplate func(o ...func(*IndicesSimulateTemplateRequest)) (*Response, error) // IndicesSimulateTemplateRequest configures the Indices Simulate Template API request. -// type IndicesSimulateTemplateRequest struct { Body io.Reader @@ -74,7 +71,6 @@ type IndicesSimulateTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesSimulateTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -172,7 +168,6 @@ func (r IndicesSimulateTemplateRequest) Do(ctx context.Context, transport Transp } // WithContext sets the request context. -// func (f IndicesSimulateTemplate) WithContext(v context.Context) func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.ctx = v @@ -180,7 +175,6 @@ func (f IndicesSimulateTemplate) WithContext(v context.Context) func(*IndicesSim } // WithBody - New index template definition to be simulated, if no index template name is specified. -// func (f IndicesSimulateTemplate) WithBody(v io.Reader) func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.Body = v @@ -188,7 +182,6 @@ func (f IndicesSimulateTemplate) WithBody(v io.Reader) func(*IndicesSimulateTemp } // WithName - the name of the index template. -// func (f IndicesSimulateTemplate) WithName(v string) func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.Name = v @@ -196,7 +189,6 @@ func (f IndicesSimulateTemplate) WithName(v string) func(*IndicesSimulateTemplat } // WithCause - user defined reason for dry-run creating the new template for simulation purposes. -// func (f IndicesSimulateTemplate) WithCause(v string) func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.Cause = v @@ -204,7 +196,6 @@ func (f IndicesSimulateTemplate) WithCause(v string) func(*IndicesSimulateTempla } // WithCreate - whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one. -// func (f IndicesSimulateTemplate) WithCreate(v bool) func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.Create = &v @@ -212,7 +203,6 @@ func (f IndicesSimulateTemplate) WithCreate(v bool) func(*IndicesSimulateTemplat } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesSimulateTemplate) WithMasterTimeout(v time.Duration) func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.MasterTimeout = v @@ -220,7 +210,6 @@ func (f IndicesSimulateTemplate) WithMasterTimeout(v time.Duration) func(*Indice } // WithPretty makes the response body pretty-printed. -// func (f IndicesSimulateTemplate) WithPretty() func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.Pretty = true @@ -228,7 +217,6 @@ func (f IndicesSimulateTemplate) WithPretty() func(*IndicesSimulateTemplateReque } // WithHuman makes statistical values human-readable. -// func (f IndicesSimulateTemplate) WithHuman() func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.Human = true @@ -236,7 +224,6 @@ func (f IndicesSimulateTemplate) WithHuman() func(*IndicesSimulateTemplateReques } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesSimulateTemplate) WithErrorTrace() func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.ErrorTrace = true @@ -244,7 +231,6 @@ func (f IndicesSimulateTemplate) WithErrorTrace() func(*IndicesSimulateTemplateR } // WithFilterPath filters the properties of the response body. -// func (f IndicesSimulateTemplate) WithFilterPath(v ...string) func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { r.FilterPath = v @@ -252,7 +238,6 @@ func (f IndicesSimulateTemplate) WithFilterPath(v ...string) func(*IndicesSimula } // WithHeader adds the headers to the HTTP request. -// func (f IndicesSimulateTemplate) WithHeader(h map[string]string) func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { if r.Header == nil { @@ -265,7 +250,6 @@ func (f IndicesSimulateTemplate) WithHeader(h map[string]string) func(*IndicesSi } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesSimulateTemplate) WithOpaqueID(s string) func(*IndicesSimulateTemplateRequest) { return func(r *IndicesSimulateTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.split.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.split.go index de2c9bacf9a9..63fd900ff653 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.split.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.split.go @@ -48,12 +48,9 @@ func newIndicesSplitFunc(t Transport) IndicesSplit { // ----- API Definition ------------------------------------------------------- // IndicesSplit allows you to split an existing index into a new index with more primary shards. -// -// type IndicesSplit func(index string, target string, o ...func(*IndicesSplitRequest)) (*Response, error) // IndicesSplitRequest configures the Indices Split API request. -// type IndicesSplitRequest struct { Index string @@ -77,7 +74,6 @@ type IndicesSplitRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesSplitRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -177,7 +173,6 @@ func (r IndicesSplitRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f IndicesSplit) WithContext(v context.Context) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.ctx = v @@ -185,7 +180,6 @@ func (f IndicesSplit) WithContext(v context.Context) func(*IndicesSplitRequest) } // WithBody - The configuration for the target index (`settings` and `aliases`). -// func (f IndicesSplit) WithBody(v io.Reader) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.Body = v @@ -193,7 +187,6 @@ func (f IndicesSplit) WithBody(v io.Reader) func(*IndicesSplitRequest) { } // WithCopySettings - whether or not to copy settings from the source index (defaults to false). -// func (f IndicesSplit) WithCopySettings(v bool) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.CopySettings = &v @@ -201,7 +194,6 @@ func (f IndicesSplit) WithCopySettings(v bool) func(*IndicesSplitRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesSplit) WithMasterTimeout(v time.Duration) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.MasterTimeout = v @@ -209,7 +201,6 @@ func (f IndicesSplit) WithMasterTimeout(v time.Duration) func(*IndicesSplitReque } // WithTimeout - explicit operation timeout. -// func (f IndicesSplit) WithTimeout(v time.Duration) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.Timeout = v @@ -217,7 +208,6 @@ func (f IndicesSplit) WithTimeout(v time.Duration) func(*IndicesSplitRequest) { } // WithWaitForActiveShards - set the number of active shards to wait for on the shrunken index before the operation returns.. -// func (f IndicesSplit) WithWaitForActiveShards(v string) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.WaitForActiveShards = v @@ -225,7 +215,6 @@ func (f IndicesSplit) WithWaitForActiveShards(v string) func(*IndicesSplitReques } // WithPretty makes the response body pretty-printed. -// func (f IndicesSplit) WithPretty() func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.Pretty = true @@ -233,7 +222,6 @@ func (f IndicesSplit) WithPretty() func(*IndicesSplitRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesSplit) WithHuman() func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.Human = true @@ -241,7 +229,6 @@ func (f IndicesSplit) WithHuman() func(*IndicesSplitRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesSplit) WithErrorTrace() func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.ErrorTrace = true @@ -249,7 +236,6 @@ func (f IndicesSplit) WithErrorTrace() func(*IndicesSplitRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesSplit) WithFilterPath(v ...string) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { r.FilterPath = v @@ -257,7 +243,6 @@ func (f IndicesSplit) WithFilterPath(v ...string) func(*IndicesSplitRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesSplit) WithHeader(h map[string]string) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { if r.Header == nil { @@ -270,7 +255,6 @@ func (f IndicesSplit) WithHeader(h map[string]string) func(*IndicesSplitRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesSplit) WithOpaqueID(s string) func(*IndicesSplitRequest) { return func(r *IndicesSplitRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.stats.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.stats.go index 38065bd7c59f..fe59587bd8db 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.stats.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.stats.go @@ -46,12 +46,9 @@ func newIndicesStatsFunc(t Transport) IndicesStats { // ----- API Definition ------------------------------------------------------- // IndicesStats provides statistics on operations happening in an index. -// -// type IndicesStats func(o ...func(*IndicesStatsRequest)) (*Response, error) // IndicesStatsRequest configures the Indices Stats API request. -// type IndicesStatsRequest struct { Index []string @@ -79,7 +76,6 @@ type IndicesStatsRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -203,7 +199,6 @@ func (r IndicesStatsRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f IndicesStats) WithContext(v context.Context) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.ctx = v @@ -211,7 +206,6 @@ func (f IndicesStats) WithContext(v context.Context) func(*IndicesStatsRequest) } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesStats) WithIndex(v ...string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.Index = v @@ -219,7 +213,6 @@ func (f IndicesStats) WithIndex(v ...string) func(*IndicesStatsRequest) { } // WithMetric - limit the information returned the specific metrics.. -// func (f IndicesStats) WithMetric(v ...string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.Metric = v @@ -227,7 +220,6 @@ func (f IndicesStats) WithMetric(v ...string) func(*IndicesStatsRequest) { } // WithCompletionFields - a list of fields for `fielddata` and `suggest` index metric (supports wildcards). -// func (f IndicesStats) WithCompletionFields(v ...string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.CompletionFields = v @@ -235,7 +227,6 @@ func (f IndicesStats) WithCompletionFields(v ...string) func(*IndicesStatsReques } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesStats) WithExpandWildcards(v string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.ExpandWildcards = v @@ -243,7 +234,6 @@ func (f IndicesStats) WithExpandWildcards(v string) func(*IndicesStatsRequest) { } // WithFielddataFields - a list of fields for `fielddata` index metric (supports wildcards). -// func (f IndicesStats) WithFielddataFields(v ...string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.FielddataFields = v @@ -251,7 +241,6 @@ func (f IndicesStats) WithFielddataFields(v ...string) func(*IndicesStatsRequest } // WithFields - a list of fields for `fielddata` and `completion` index metric (supports wildcards). -// func (f IndicesStats) WithFields(v ...string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.Fields = v @@ -259,7 +248,6 @@ func (f IndicesStats) WithFields(v ...string) func(*IndicesStatsRequest) { } // WithForbidClosedIndices - if set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices. -// func (f IndicesStats) WithForbidClosedIndices(v bool) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.ForbidClosedIndices = &v @@ -267,7 +255,6 @@ func (f IndicesStats) WithForbidClosedIndices(v bool) func(*IndicesStatsRequest) } // WithGroups - a list of search groups for `search` index metric. -// func (f IndicesStats) WithGroups(v ...string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.Groups = v @@ -275,7 +262,6 @@ func (f IndicesStats) WithGroups(v ...string) func(*IndicesStatsRequest) { } // WithIncludeSegmentFileSizes - whether to report the aggregated disk usage of each one of the lucene index files (only applies if segment stats are requested). -// func (f IndicesStats) WithIncludeSegmentFileSizes(v bool) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.IncludeSegmentFileSizes = &v @@ -283,7 +269,6 @@ func (f IndicesStats) WithIncludeSegmentFileSizes(v bool) func(*IndicesStatsRequ } // WithIncludeUnloadedSegments - if set to true segment stats will include stats for segments that are not currently loaded into memory. -// func (f IndicesStats) WithIncludeUnloadedSegments(v bool) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.IncludeUnloadedSegments = &v @@ -291,7 +276,6 @@ func (f IndicesStats) WithIncludeUnloadedSegments(v bool) func(*IndicesStatsRequ } // WithLevel - return stats aggregated at cluster, index or shard level. -// func (f IndicesStats) WithLevel(v string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.Level = v @@ -299,7 +283,6 @@ func (f IndicesStats) WithLevel(v string) func(*IndicesStatsRequest) { } // WithTypes - a list of document types for the `indexing` index metric. -// func (f IndicesStats) WithTypes(v ...string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.Types = v @@ -307,7 +290,6 @@ func (f IndicesStats) WithTypes(v ...string) func(*IndicesStatsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IndicesStats) WithPretty() func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.Pretty = true @@ -315,7 +297,6 @@ func (f IndicesStats) WithPretty() func(*IndicesStatsRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesStats) WithHuman() func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.Human = true @@ -323,7 +304,6 @@ func (f IndicesStats) WithHuman() func(*IndicesStatsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesStats) WithErrorTrace() func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.ErrorTrace = true @@ -331,7 +311,6 @@ func (f IndicesStats) WithErrorTrace() func(*IndicesStatsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesStats) WithFilterPath(v ...string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { r.FilterPath = v @@ -339,7 +318,6 @@ func (f IndicesStats) WithFilterPath(v ...string) func(*IndicesStatsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f IndicesStats) WithHeader(h map[string]string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { if r.Header == nil { @@ -352,7 +330,6 @@ func (f IndicesStats) WithHeader(h map[string]string) func(*IndicesStatsRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesStats) WithOpaqueID(s string) func(*IndicesStatsRequest) { return func(r *IndicesStatsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.update_aliases.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.update_aliases.go index 49f0bc9980c2..202c3375e90f 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.update_aliases.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.update_aliases.go @@ -47,12 +47,9 @@ func newIndicesUpdateAliasesFunc(t Transport) IndicesUpdateAliases { // ----- API Definition ------------------------------------------------------- // IndicesUpdateAliases updates index aliases. -// -// type IndicesUpdateAliases func(body io.Reader, o ...func(*IndicesUpdateAliasesRequest)) (*Response, error) // IndicesUpdateAliasesRequest configures the Indices Update Aliases API request. -// type IndicesUpdateAliasesRequest struct { Body io.Reader @@ -70,7 +67,6 @@ type IndicesUpdateAliasesRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesUpdateAliasesRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -157,7 +153,6 @@ func (r IndicesUpdateAliasesRequest) Do(ctx context.Context, transport Transport } // WithContext sets the request context. -// func (f IndicesUpdateAliases) WithContext(v context.Context) func(*IndicesUpdateAliasesRequest) { return func(r *IndicesUpdateAliasesRequest) { r.ctx = v @@ -165,7 +160,6 @@ func (f IndicesUpdateAliases) WithContext(v context.Context) func(*IndicesUpdate } // WithMasterTimeout - specify timeout for connection to master. -// func (f IndicesUpdateAliases) WithMasterTimeout(v time.Duration) func(*IndicesUpdateAliasesRequest) { return func(r *IndicesUpdateAliasesRequest) { r.MasterTimeout = v @@ -173,7 +167,6 @@ func (f IndicesUpdateAliases) WithMasterTimeout(v time.Duration) func(*IndicesUp } // WithTimeout - request timeout. -// func (f IndicesUpdateAliases) WithTimeout(v time.Duration) func(*IndicesUpdateAliasesRequest) { return func(r *IndicesUpdateAliasesRequest) { r.Timeout = v @@ -181,7 +174,6 @@ func (f IndicesUpdateAliases) WithTimeout(v time.Duration) func(*IndicesUpdateAl } // WithPretty makes the response body pretty-printed. -// func (f IndicesUpdateAliases) WithPretty() func(*IndicesUpdateAliasesRequest) { return func(r *IndicesUpdateAliasesRequest) { r.Pretty = true @@ -189,7 +181,6 @@ func (f IndicesUpdateAliases) WithPretty() func(*IndicesUpdateAliasesRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesUpdateAliases) WithHuman() func(*IndicesUpdateAliasesRequest) { return func(r *IndicesUpdateAliasesRequest) { r.Human = true @@ -197,7 +188,6 @@ func (f IndicesUpdateAliases) WithHuman() func(*IndicesUpdateAliasesRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesUpdateAliases) WithErrorTrace() func(*IndicesUpdateAliasesRequest) { return func(r *IndicesUpdateAliasesRequest) { r.ErrorTrace = true @@ -205,7 +195,6 @@ func (f IndicesUpdateAliases) WithErrorTrace() func(*IndicesUpdateAliasesRequest } // WithFilterPath filters the properties of the response body. -// func (f IndicesUpdateAliases) WithFilterPath(v ...string) func(*IndicesUpdateAliasesRequest) { return func(r *IndicesUpdateAliasesRequest) { r.FilterPath = v @@ -213,7 +202,6 @@ func (f IndicesUpdateAliases) WithFilterPath(v ...string) func(*IndicesUpdateAli } // WithHeader adds the headers to the HTTP request. -// func (f IndicesUpdateAliases) WithHeader(h map[string]string) func(*IndicesUpdateAliasesRequest) { return func(r *IndicesUpdateAliasesRequest) { if r.Header == nil { @@ -226,7 +214,6 @@ func (f IndicesUpdateAliases) WithHeader(h map[string]string) func(*IndicesUpdat } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesUpdateAliases) WithOpaqueID(s string) func(*IndicesUpdateAliasesRequest) { return func(r *IndicesUpdateAliasesRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.upgrade.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.upgrade.go index bf8550a47f6c..65296d735657 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.upgrade.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.upgrade.go @@ -46,12 +46,9 @@ func newIndicesUpgradeFunc(t Transport) IndicesUpgrade { // ----- API Definition ------------------------------------------------------- // IndicesUpgrade deprecated Upgrades to the current version of Lucene. -// -// type IndicesUpgrade func(o ...func(*IndicesUpgradeRequest)) (*Response, error) // IndicesUpgradeRequest configures the Indices Upgrade API request. -// type IndicesUpgradeRequest struct { Index []string @@ -72,7 +69,6 @@ type IndicesUpgradeRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesUpgradeRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -172,7 +168,6 @@ func (r IndicesUpgradeRequest) Do(ctx context.Context, transport Transport) (*Re } // WithContext sets the request context. -// func (f IndicesUpgrade) WithContext(v context.Context) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.ctx = v @@ -180,7 +175,6 @@ func (f IndicesUpgrade) WithContext(v context.Context) func(*IndicesUpgradeReque } // WithIndex - a list of index names; use _all to perform the operation on all indices. -// func (f IndicesUpgrade) WithIndex(v ...string) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.Index = v @@ -188,7 +182,6 @@ func (f IndicesUpgrade) WithIndex(v ...string) func(*IndicesUpgradeRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesUpgrade) WithAllowNoIndices(v bool) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.AllowNoIndices = &v @@ -196,7 +189,6 @@ func (f IndicesUpgrade) WithAllowNoIndices(v bool) func(*IndicesUpgradeRequest) } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesUpgrade) WithExpandWildcards(v string) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.ExpandWildcards = v @@ -204,7 +196,6 @@ func (f IndicesUpgrade) WithExpandWildcards(v string) func(*IndicesUpgradeReques } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesUpgrade) WithIgnoreUnavailable(v bool) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.IgnoreUnavailable = &v @@ -212,7 +203,6 @@ func (f IndicesUpgrade) WithIgnoreUnavailable(v bool) func(*IndicesUpgradeReques } // WithOnlyAncientSegments - if true, only ancient (an older lucene major release) segments will be upgraded. -// func (f IndicesUpgrade) WithOnlyAncientSegments(v bool) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.OnlyAncientSegments = &v @@ -220,7 +210,6 @@ func (f IndicesUpgrade) WithOnlyAncientSegments(v bool) func(*IndicesUpgradeRequ } // WithWaitForCompletion - specify whether the request should block until the all segments are upgraded (default: false). -// func (f IndicesUpgrade) WithWaitForCompletion(v bool) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.WaitForCompletion = &v @@ -228,7 +217,6 @@ func (f IndicesUpgrade) WithWaitForCompletion(v bool) func(*IndicesUpgradeReques } // WithPretty makes the response body pretty-printed. -// func (f IndicesUpgrade) WithPretty() func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.Pretty = true @@ -236,7 +224,6 @@ func (f IndicesUpgrade) WithPretty() func(*IndicesUpgradeRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesUpgrade) WithHuman() func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.Human = true @@ -244,7 +231,6 @@ func (f IndicesUpgrade) WithHuman() func(*IndicesUpgradeRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesUpgrade) WithErrorTrace() func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.ErrorTrace = true @@ -252,7 +238,6 @@ func (f IndicesUpgrade) WithErrorTrace() func(*IndicesUpgradeRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IndicesUpgrade) WithFilterPath(v ...string) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { r.FilterPath = v @@ -260,7 +245,6 @@ func (f IndicesUpgrade) WithFilterPath(v ...string) func(*IndicesUpgradeRequest) } // WithHeader adds the headers to the HTTP request. -// func (f IndicesUpgrade) WithHeader(h map[string]string) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { if r.Header == nil { @@ -273,7 +257,6 @@ func (f IndicesUpgrade) WithHeader(h map[string]string) func(*IndicesUpgradeRequ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesUpgrade) WithOpaqueID(s string) func(*IndicesUpgradeRequest) { return func(r *IndicesUpgradeRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.validate_query.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.validate_query.go index 2fe444726e6f..4d087bf6bb16 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.validate_query.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.indices.validate_query.go @@ -47,12 +47,9 @@ func newIndicesValidateQueryFunc(t Transport) IndicesValidateQuery { // ----- API Definition ------------------------------------------------------- // IndicesValidateQuery allows a user to validate a potentially expensive query without executing it. -// -// type IndicesValidateQuery func(o ...func(*IndicesValidateQueryRequest)) (*Response, error) // IndicesValidateQueryRequest configures the Indices Validate Query API request. -// type IndicesValidateQueryRequest struct { Index []string DocumentType []string @@ -83,7 +80,6 @@ type IndicesValidateQueryRequest struct { } // Do executes the request and returns response or error. -// func (r IndicesValidateQueryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -221,7 +217,6 @@ func (r IndicesValidateQueryRequest) Do(ctx context.Context, transport Transport } // WithContext sets the request context. -// func (f IndicesValidateQuery) WithContext(v context.Context) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.ctx = v @@ -229,7 +224,6 @@ func (f IndicesValidateQuery) WithContext(v context.Context) func(*IndicesValida } // WithBody - The query definition specified with the Query DSL. -// func (f IndicesValidateQuery) WithBody(v io.Reader) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Body = v @@ -237,7 +231,6 @@ func (f IndicesValidateQuery) WithBody(v io.Reader) func(*IndicesValidateQueryRe } // WithIndex - a list of index names to restrict the operation; use _all to perform the operation on all indices. -// func (f IndicesValidateQuery) WithIndex(v ...string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Index = v @@ -245,7 +238,6 @@ func (f IndicesValidateQuery) WithIndex(v ...string) func(*IndicesValidateQueryR } // WithDocumentType - a list of document types to restrict the operation; leave empty to perform the operation on all types. -// func (f IndicesValidateQuery) WithDocumentType(v ...string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.DocumentType = v @@ -253,7 +245,6 @@ func (f IndicesValidateQuery) WithDocumentType(v ...string) func(*IndicesValidat } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f IndicesValidateQuery) WithAllowNoIndices(v bool) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.AllowNoIndices = &v @@ -261,7 +252,6 @@ func (f IndicesValidateQuery) WithAllowNoIndices(v bool) func(*IndicesValidateQu } // WithAllShards - execute validation on all shards instead of one random shard per index. -// func (f IndicesValidateQuery) WithAllShards(v bool) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.AllShards = &v @@ -269,7 +259,6 @@ func (f IndicesValidateQuery) WithAllShards(v bool) func(*IndicesValidateQueryRe } // WithAnalyzer - the analyzer to use for the query string. -// func (f IndicesValidateQuery) WithAnalyzer(v string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Analyzer = v @@ -277,7 +266,6 @@ func (f IndicesValidateQuery) WithAnalyzer(v string) func(*IndicesValidateQueryR } // WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false). -// func (f IndicesValidateQuery) WithAnalyzeWildcard(v bool) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.AnalyzeWildcard = &v @@ -285,7 +273,6 @@ func (f IndicesValidateQuery) WithAnalyzeWildcard(v bool) func(*IndicesValidateQ } // WithDefaultOperator - the default operator for query string query (and or or). -// func (f IndicesValidateQuery) WithDefaultOperator(v string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.DefaultOperator = v @@ -293,7 +280,6 @@ func (f IndicesValidateQuery) WithDefaultOperator(v string) func(*IndicesValidat } // WithDf - the field to use as default where no field prefix is given in the query string. -// func (f IndicesValidateQuery) WithDf(v string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Df = v @@ -301,7 +287,6 @@ func (f IndicesValidateQuery) WithDf(v string) func(*IndicesValidateQueryRequest } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f IndicesValidateQuery) WithExpandWildcards(v string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.ExpandWildcards = v @@ -309,7 +294,6 @@ func (f IndicesValidateQuery) WithExpandWildcards(v string) func(*IndicesValidat } // WithExplain - return detailed information about the error. -// func (f IndicesValidateQuery) WithExplain(v bool) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Explain = &v @@ -317,7 +301,6 @@ func (f IndicesValidateQuery) WithExplain(v bool) func(*IndicesValidateQueryRequ } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f IndicesValidateQuery) WithIgnoreUnavailable(v bool) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.IgnoreUnavailable = &v @@ -325,7 +308,6 @@ func (f IndicesValidateQuery) WithIgnoreUnavailable(v bool) func(*IndicesValidat } // WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored. -// func (f IndicesValidateQuery) WithLenient(v bool) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Lenient = &v @@ -333,7 +315,6 @@ func (f IndicesValidateQuery) WithLenient(v bool) func(*IndicesValidateQueryRequ } // WithQuery - query in the lucene query string syntax. -// func (f IndicesValidateQuery) WithQuery(v string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Query = v @@ -341,7 +322,6 @@ func (f IndicesValidateQuery) WithQuery(v string) func(*IndicesValidateQueryRequ } // WithRewrite - provide a more detailed explanation showing the actual lucene query that will be executed.. -// func (f IndicesValidateQuery) WithRewrite(v bool) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Rewrite = &v @@ -349,7 +329,6 @@ func (f IndicesValidateQuery) WithRewrite(v bool) func(*IndicesValidateQueryRequ } // WithPretty makes the response body pretty-printed. -// func (f IndicesValidateQuery) WithPretty() func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Pretty = true @@ -357,7 +336,6 @@ func (f IndicesValidateQuery) WithPretty() func(*IndicesValidateQueryRequest) { } // WithHuman makes statistical values human-readable. -// func (f IndicesValidateQuery) WithHuman() func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.Human = true @@ -365,7 +343,6 @@ func (f IndicesValidateQuery) WithHuman() func(*IndicesValidateQueryRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IndicesValidateQuery) WithErrorTrace() func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.ErrorTrace = true @@ -373,7 +350,6 @@ func (f IndicesValidateQuery) WithErrorTrace() func(*IndicesValidateQueryRequest } // WithFilterPath filters the properties of the response body. -// func (f IndicesValidateQuery) WithFilterPath(v ...string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { r.FilterPath = v @@ -381,7 +357,6 @@ func (f IndicesValidateQuery) WithFilterPath(v ...string) func(*IndicesValidateQ } // WithHeader adds the headers to the HTTP request. -// func (f IndicesValidateQuery) WithHeader(h map[string]string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { if r.Header == nil { @@ -394,7 +369,6 @@ func (f IndicesValidateQuery) WithHeader(h map[string]string) func(*IndicesValid } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IndicesValidateQuery) WithOpaqueID(s string) func(*IndicesValidateQueryRequest) { return func(r *IndicesValidateQueryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.info.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.info.go index c506a52fa72c..a1c7732ada64 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.info.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.info.go @@ -45,12 +45,9 @@ func newInfoFunc(t Transport) Info { // ----- API Definition ------------------------------------------------------- // Info returns basic information about the cluster. -// -// type Info func(o ...func(*InfoRequest)) (*Response, error) // InfoRequest configures the Info API request. -// type InfoRequest struct { Pretty bool Human bool @@ -63,7 +60,6 @@ type InfoRequest struct { } // Do executes the request and returns response or error. -// func (r InfoRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -138,7 +134,6 @@ func (r InfoRequest) Do(ctx context.Context, transport Transport) (*Response, er } // WithContext sets the request context. -// func (f Info) WithContext(v context.Context) func(*InfoRequest) { return func(r *InfoRequest) { r.ctx = v @@ -146,7 +141,6 @@ func (f Info) WithContext(v context.Context) func(*InfoRequest) { } // WithHuman makes statistical values human-readable. -// func (f Info) WithHuman() func(*InfoRequest) { return func(r *InfoRequest) { r.Human = true @@ -154,7 +148,6 @@ func (f Info) WithHuman() func(*InfoRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Info) WithErrorTrace() func(*InfoRequest) { return func(r *InfoRequest) { r.ErrorTrace = true @@ -162,7 +155,6 @@ func (f Info) WithErrorTrace() func(*InfoRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Info) WithFilterPath(v ...string) func(*InfoRequest) { return func(r *InfoRequest) { r.FilterPath = v @@ -170,7 +162,6 @@ func (f Info) WithFilterPath(v ...string) func(*InfoRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Info) WithHeader(h map[string]string) func(*InfoRequest) { return func(r *InfoRequest) { if r.Header == nil { @@ -183,7 +174,6 @@ func (f Info) WithHeader(h map[string]string) func(*InfoRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Info) WithOpaqueID(s string) func(*InfoRequest) { return func(r *InfoRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.delete_pipeline.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.delete_pipeline.go index a88d8dd797d1..823b28e5f699 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.delete_pipeline.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.delete_pipeline.go @@ -46,12 +46,9 @@ func newIngestDeletePipelineFunc(t Transport) IngestDeletePipeline { // ----- API Definition ------------------------------------------------------- // IngestDeletePipeline deletes a pipeline. -// -// type IngestDeletePipeline func(id string, o ...func(*IngestDeletePipelineRequest)) (*Response, error) // IngestDeletePipelineRequest configures the Ingest Delete Pipeline API request. -// type IngestDeletePipelineRequest struct { PipelineID string @@ -69,7 +66,6 @@ type IngestDeletePipelineRequest struct { } // Do executes the request and returns response or error. -// func (r IngestDeletePipelineRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -157,7 +153,6 @@ func (r IngestDeletePipelineRequest) Do(ctx context.Context, transport Transport } // WithContext sets the request context. -// func (f IngestDeletePipeline) WithContext(v context.Context) func(*IngestDeletePipelineRequest) { return func(r *IngestDeletePipelineRequest) { r.ctx = v @@ -165,7 +160,6 @@ func (f IngestDeletePipeline) WithContext(v context.Context) func(*IngestDeleteP } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f IngestDeletePipeline) WithMasterTimeout(v time.Duration) func(*IngestDeletePipelineRequest) { return func(r *IngestDeletePipelineRequest) { r.MasterTimeout = v @@ -173,7 +167,6 @@ func (f IngestDeletePipeline) WithMasterTimeout(v time.Duration) func(*IngestDel } // WithTimeout - explicit operation timeout. -// func (f IngestDeletePipeline) WithTimeout(v time.Duration) func(*IngestDeletePipelineRequest) { return func(r *IngestDeletePipelineRequest) { r.Timeout = v @@ -181,7 +174,6 @@ func (f IngestDeletePipeline) WithTimeout(v time.Duration) func(*IngestDeletePip } // WithPretty makes the response body pretty-printed. -// func (f IngestDeletePipeline) WithPretty() func(*IngestDeletePipelineRequest) { return func(r *IngestDeletePipelineRequest) { r.Pretty = true @@ -189,7 +181,6 @@ func (f IngestDeletePipeline) WithPretty() func(*IngestDeletePipelineRequest) { } // WithHuman makes statistical values human-readable. -// func (f IngestDeletePipeline) WithHuman() func(*IngestDeletePipelineRequest) { return func(r *IngestDeletePipelineRequest) { r.Human = true @@ -197,7 +188,6 @@ func (f IngestDeletePipeline) WithHuman() func(*IngestDeletePipelineRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IngestDeletePipeline) WithErrorTrace() func(*IngestDeletePipelineRequest) { return func(r *IngestDeletePipelineRequest) { r.ErrorTrace = true @@ -205,7 +195,6 @@ func (f IngestDeletePipeline) WithErrorTrace() func(*IngestDeletePipelineRequest } // WithFilterPath filters the properties of the response body. -// func (f IngestDeletePipeline) WithFilterPath(v ...string) func(*IngestDeletePipelineRequest) { return func(r *IngestDeletePipelineRequest) { r.FilterPath = v @@ -213,7 +202,6 @@ func (f IngestDeletePipeline) WithFilterPath(v ...string) func(*IngestDeletePipe } // WithHeader adds the headers to the HTTP request. -// func (f IngestDeletePipeline) WithHeader(h map[string]string) func(*IngestDeletePipelineRequest) { return func(r *IngestDeletePipelineRequest) { if r.Header == nil { @@ -226,7 +214,6 @@ func (f IngestDeletePipeline) WithHeader(h map[string]string) func(*IngestDelete } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IngestDeletePipeline) WithOpaqueID(s string) func(*IngestDeletePipelineRequest) { return func(r *IngestDeletePipelineRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.get_pipeline.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.get_pipeline.go index 57038bbc48d0..271f6eb4aa8e 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.get_pipeline.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.get_pipeline.go @@ -47,12 +47,9 @@ func newIngestGetPipelineFunc(t Transport) IngestGetPipeline { // ----- API Definition ------------------------------------------------------- // IngestGetPipeline returns a pipeline. -// -// type IngestGetPipeline func(o ...func(*IngestGetPipelineRequest)) (*Response, error) // IngestGetPipelineRequest configures the Ingest Get Pipeline API request. -// type IngestGetPipelineRequest struct { PipelineID string @@ -70,7 +67,6 @@ type IngestGetPipelineRequest struct { } // Do executes the request and returns response or error. -// func (r IngestGetPipelineRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -160,7 +156,6 @@ func (r IngestGetPipelineRequest) Do(ctx context.Context, transport Transport) ( } // WithContext sets the request context. -// func (f IngestGetPipeline) WithContext(v context.Context) func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { r.ctx = v @@ -168,7 +163,6 @@ func (f IngestGetPipeline) WithContext(v context.Context) func(*IngestGetPipelin } // WithPipelineID - comma separated list of pipeline ids. wildcards supported. -// func (f IngestGetPipeline) WithPipelineID(v string) func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { r.PipelineID = v @@ -176,7 +170,6 @@ func (f IngestGetPipeline) WithPipelineID(v string) func(*IngestGetPipelineReque } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f IngestGetPipeline) WithMasterTimeout(v time.Duration) func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { r.MasterTimeout = v @@ -184,7 +177,6 @@ func (f IngestGetPipeline) WithMasterTimeout(v time.Duration) func(*IngestGetPip } // WithSummary - return pipelines without their definitions (default: false). -// func (f IngestGetPipeline) WithSummary(v bool) func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { r.Summary = &v @@ -192,7 +184,6 @@ func (f IngestGetPipeline) WithSummary(v bool) func(*IngestGetPipelineRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IngestGetPipeline) WithPretty() func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { r.Pretty = true @@ -200,7 +191,6 @@ func (f IngestGetPipeline) WithPretty() func(*IngestGetPipelineRequest) { } // WithHuman makes statistical values human-readable. -// func (f IngestGetPipeline) WithHuman() func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { r.Human = true @@ -208,7 +198,6 @@ func (f IngestGetPipeline) WithHuman() func(*IngestGetPipelineRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IngestGetPipeline) WithErrorTrace() func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { r.ErrorTrace = true @@ -216,7 +205,6 @@ func (f IngestGetPipeline) WithErrorTrace() func(*IngestGetPipelineRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IngestGetPipeline) WithFilterPath(v ...string) func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { r.FilterPath = v @@ -224,7 +212,6 @@ func (f IngestGetPipeline) WithFilterPath(v ...string) func(*IngestGetPipelineRe } // WithHeader adds the headers to the HTTP request. -// func (f IngestGetPipeline) WithHeader(h map[string]string) func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { if r.Header == nil { @@ -237,7 +224,6 @@ func (f IngestGetPipeline) WithHeader(h map[string]string) func(*IngestGetPipeli } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IngestGetPipeline) WithOpaqueID(s string) func(*IngestGetPipelineRequest) { return func(r *IngestGetPipelineRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.processor_grok.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.processor_grok.go index 978dbeece898..ff6dd3e186dc 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.processor_grok.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.processor_grok.go @@ -45,12 +45,9 @@ func newIngestProcessorGrokFunc(t Transport) IngestProcessorGrok { // ----- API Definition ------------------------------------------------------- // IngestProcessorGrok returns a list of the built-in patterns. -// -// type IngestProcessorGrok func(o ...func(*IngestProcessorGrokRequest)) (*Response, error) // IngestProcessorGrokRequest configures the Ingest Processor Grok API request. -// type IngestProcessorGrokRequest struct { Pretty bool Human bool @@ -63,7 +60,6 @@ type IngestProcessorGrokRequest struct { } // Do executes the request and returns response or error. -// func (r IngestProcessorGrokRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -138,7 +134,6 @@ func (r IngestProcessorGrokRequest) Do(ctx context.Context, transport Transport) } // WithContext sets the request context. -// func (f IngestProcessorGrok) WithContext(v context.Context) func(*IngestProcessorGrokRequest) { return func(r *IngestProcessorGrokRequest) { r.ctx = v @@ -146,7 +141,6 @@ func (f IngestProcessorGrok) WithContext(v context.Context) func(*IngestProcesso } // WithPretty makes the response body pretty-printed. -// func (f IngestProcessorGrok) WithPretty() func(*IngestProcessorGrokRequest) { return func(r *IngestProcessorGrokRequest) { r.Pretty = true @@ -154,7 +148,6 @@ func (f IngestProcessorGrok) WithPretty() func(*IngestProcessorGrokRequest) { } // WithHuman makes statistical values human-readable. -// func (f IngestProcessorGrok) WithHuman() func(*IngestProcessorGrokRequest) { return func(r *IngestProcessorGrokRequest) { r.Human = true @@ -162,7 +155,6 @@ func (f IngestProcessorGrok) WithHuman() func(*IngestProcessorGrokRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IngestProcessorGrok) WithErrorTrace() func(*IngestProcessorGrokRequest) { return func(r *IngestProcessorGrokRequest) { r.ErrorTrace = true @@ -170,7 +162,6 @@ func (f IngestProcessorGrok) WithErrorTrace() func(*IngestProcessorGrokRequest) } // WithFilterPath filters the properties of the response body. -// func (f IngestProcessorGrok) WithFilterPath(v ...string) func(*IngestProcessorGrokRequest) { return func(r *IngestProcessorGrokRequest) { r.FilterPath = v @@ -178,7 +169,6 @@ func (f IngestProcessorGrok) WithFilterPath(v ...string) func(*IngestProcessorGr } // WithHeader adds the headers to the HTTP request. -// func (f IngestProcessorGrok) WithHeader(h map[string]string) func(*IngestProcessorGrokRequest) { return func(r *IngestProcessorGrokRequest) { if r.Header == nil { @@ -191,7 +181,6 @@ func (f IngestProcessorGrok) WithHeader(h map[string]string) func(*IngestProcess } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IngestProcessorGrok) WithOpaqueID(s string) func(*IngestProcessorGrokRequest) { return func(r *IngestProcessorGrokRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.put_pipeline.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.put_pipeline.go index 228832b2bf7a..faabc86235c9 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.put_pipeline.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.put_pipeline.go @@ -47,12 +47,9 @@ func newIngestPutPipelineFunc(t Transport) IngestPutPipeline { // ----- API Definition ------------------------------------------------------- // IngestPutPipeline creates or updates a pipeline. -// -// type IngestPutPipeline func(id string, body io.Reader, o ...func(*IngestPutPipelineRequest)) (*Response, error) // IngestPutPipelineRequest configures the Ingest Put Pipeline API request. -// type IngestPutPipelineRequest struct { PipelineID string @@ -72,7 +69,6 @@ type IngestPutPipelineRequest struct { } // Do executes the request and returns response or error. -// func (r IngestPutPipelineRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -164,7 +160,6 @@ func (r IngestPutPipelineRequest) Do(ctx context.Context, transport Transport) ( } // WithContext sets the request context. -// func (f IngestPutPipeline) WithContext(v context.Context) func(*IngestPutPipelineRequest) { return func(r *IngestPutPipelineRequest) { r.ctx = v @@ -172,7 +167,6 @@ func (f IngestPutPipeline) WithContext(v context.Context) func(*IngestPutPipelin } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f IngestPutPipeline) WithMasterTimeout(v time.Duration) func(*IngestPutPipelineRequest) { return func(r *IngestPutPipelineRequest) { r.MasterTimeout = v @@ -180,7 +174,6 @@ func (f IngestPutPipeline) WithMasterTimeout(v time.Duration) func(*IngestPutPip } // WithTimeout - explicit operation timeout. -// func (f IngestPutPipeline) WithTimeout(v time.Duration) func(*IngestPutPipelineRequest) { return func(r *IngestPutPipelineRequest) { r.Timeout = v @@ -188,7 +181,6 @@ func (f IngestPutPipeline) WithTimeout(v time.Duration) func(*IngestPutPipelineR } // WithPretty makes the response body pretty-printed. -// func (f IngestPutPipeline) WithPretty() func(*IngestPutPipelineRequest) { return func(r *IngestPutPipelineRequest) { r.Pretty = true @@ -196,7 +188,6 @@ func (f IngestPutPipeline) WithPretty() func(*IngestPutPipelineRequest) { } // WithHuman makes statistical values human-readable. -// func (f IngestPutPipeline) WithHuman() func(*IngestPutPipelineRequest) { return func(r *IngestPutPipelineRequest) { r.Human = true @@ -204,7 +195,6 @@ func (f IngestPutPipeline) WithHuman() func(*IngestPutPipelineRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IngestPutPipeline) WithErrorTrace() func(*IngestPutPipelineRequest) { return func(r *IngestPutPipelineRequest) { r.ErrorTrace = true @@ -212,7 +202,6 @@ func (f IngestPutPipeline) WithErrorTrace() func(*IngestPutPipelineRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IngestPutPipeline) WithFilterPath(v ...string) func(*IngestPutPipelineRequest) { return func(r *IngestPutPipelineRequest) { r.FilterPath = v @@ -220,7 +209,6 @@ func (f IngestPutPipeline) WithFilterPath(v ...string) func(*IngestPutPipelineRe } // WithHeader adds the headers to the HTTP request. -// func (f IngestPutPipeline) WithHeader(h map[string]string) func(*IngestPutPipelineRequest) { return func(r *IngestPutPipelineRequest) { if r.Header == nil { @@ -233,7 +221,6 @@ func (f IngestPutPipeline) WithHeader(h map[string]string) func(*IngestPutPipeli } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IngestPutPipeline) WithOpaqueID(s string) func(*IngestPutPipelineRequest) { return func(r *IngestPutPipelineRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.simulate.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.simulate.go index 682b8d30b313..d3633b9704d8 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.simulate.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ingest.simulate.go @@ -47,12 +47,9 @@ func newIngestSimulateFunc(t Transport) IngestSimulate { // ----- API Definition ------------------------------------------------------- // IngestSimulate allows to simulate a pipeline with example documents. -// -// type IngestSimulate func(body io.Reader, o ...func(*IngestSimulateRequest)) (*Response, error) // IngestSimulateRequest configures the Ingest Simulate API request. -// type IngestSimulateRequest struct { PipelineID string @@ -71,7 +68,6 @@ type IngestSimulateRequest struct { } // Do executes the request and returns response or error. -// func (r IngestSimulateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -163,7 +159,6 @@ func (r IngestSimulateRequest) Do(ctx context.Context, transport Transport) (*Re } // WithContext sets the request context. -// func (f IngestSimulate) WithContext(v context.Context) func(*IngestSimulateRequest) { return func(r *IngestSimulateRequest) { r.ctx = v @@ -171,7 +166,6 @@ func (f IngestSimulate) WithContext(v context.Context) func(*IngestSimulateReque } // WithPipelineID - pipeline ID. -// func (f IngestSimulate) WithPipelineID(v string) func(*IngestSimulateRequest) { return func(r *IngestSimulateRequest) { r.PipelineID = v @@ -179,7 +173,6 @@ func (f IngestSimulate) WithPipelineID(v string) func(*IngestSimulateRequest) { } // WithVerbose - verbose mode. display data output for each processor in executed pipeline. -// func (f IngestSimulate) WithVerbose(v bool) func(*IngestSimulateRequest) { return func(r *IngestSimulateRequest) { r.Verbose = &v @@ -187,7 +180,6 @@ func (f IngestSimulate) WithVerbose(v bool) func(*IngestSimulateRequest) { } // WithPretty makes the response body pretty-printed. -// func (f IngestSimulate) WithPretty() func(*IngestSimulateRequest) { return func(r *IngestSimulateRequest) { r.Pretty = true @@ -195,7 +187,6 @@ func (f IngestSimulate) WithPretty() func(*IngestSimulateRequest) { } // WithHuman makes statistical values human-readable. -// func (f IngestSimulate) WithHuman() func(*IngestSimulateRequest) { return func(r *IngestSimulateRequest) { r.Human = true @@ -203,7 +194,6 @@ func (f IngestSimulate) WithHuman() func(*IngestSimulateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f IngestSimulate) WithErrorTrace() func(*IngestSimulateRequest) { return func(r *IngestSimulateRequest) { r.ErrorTrace = true @@ -211,7 +201,6 @@ func (f IngestSimulate) WithErrorTrace() func(*IngestSimulateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f IngestSimulate) WithFilterPath(v ...string) func(*IngestSimulateRequest) { return func(r *IngestSimulateRequest) { r.FilterPath = v @@ -219,7 +208,6 @@ func (f IngestSimulate) WithFilterPath(v ...string) func(*IngestSimulateRequest) } // WithHeader adds the headers to the HTTP request. -// func (f IngestSimulate) WithHeader(h map[string]string) func(*IngestSimulateRequest) { return func(r *IngestSimulateRequest) { if r.Header == nil { @@ -232,7 +220,6 @@ func (f IngestSimulate) WithHeader(h map[string]string) func(*IngestSimulateRequ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f IngestSimulate) WithOpaqueID(s string) func(*IngestSimulateRequest) { return func(r *IngestSimulateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.mget.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.mget.go index cd0daa5198c3..0c7774e4ef4e 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.mget.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.mget.go @@ -47,12 +47,9 @@ func newMgetFunc(t Transport) Mget { // ----- API Definition ------------------------------------------------------- // Mget allows to get multiple documents in one request. -// -// type Mget func(body io.Reader, o ...func(*MgetRequest)) (*Response, error) // MgetRequest configures the Mget API request. -// type MgetRequest struct { Index string DocumentType string @@ -79,7 +76,6 @@ type MgetRequest struct { } // Do executes the request and returns response or error. -// func (r MgetRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -199,7 +195,6 @@ func (r MgetRequest) Do(ctx context.Context, transport Transport) (*Response, er } // WithContext sets the request context. -// func (f Mget) WithContext(v context.Context) func(*MgetRequest) { return func(r *MgetRequest) { r.ctx = v @@ -207,7 +202,6 @@ func (f Mget) WithContext(v context.Context) func(*MgetRequest) { } // WithIndex - the name of the index. -// func (f Mget) WithIndex(v string) func(*MgetRequest) { return func(r *MgetRequest) { r.Index = v @@ -215,7 +209,6 @@ func (f Mget) WithIndex(v string) func(*MgetRequest) { } // WithDocumentType - the type of the document. -// func (f Mget) WithDocumentType(v string) func(*MgetRequest) { return func(r *MgetRequest) { r.DocumentType = v @@ -223,7 +216,6 @@ func (f Mget) WithDocumentType(v string) func(*MgetRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f Mget) WithPreference(v string) func(*MgetRequest) { return func(r *MgetRequest) { r.Preference = v @@ -231,7 +223,6 @@ func (f Mget) WithPreference(v string) func(*MgetRequest) { } // WithRealtime - specify whether to perform the operation in realtime or search mode. -// func (f Mget) WithRealtime(v bool) func(*MgetRequest) { return func(r *MgetRequest) { r.Realtime = &v @@ -239,7 +230,6 @@ func (f Mget) WithRealtime(v bool) func(*MgetRequest) { } // WithRefresh - refresh the shard containing the document before performing the operation. -// func (f Mget) WithRefresh(v bool) func(*MgetRequest) { return func(r *MgetRequest) { r.Refresh = &v @@ -247,7 +237,6 @@ func (f Mget) WithRefresh(v bool) func(*MgetRequest) { } // WithRouting - specific routing value. -// func (f Mget) WithRouting(v string) func(*MgetRequest) { return func(r *MgetRequest) { r.Routing = v @@ -255,7 +244,6 @@ func (f Mget) WithRouting(v string) func(*MgetRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f Mget) WithSource(v ...string) func(*MgetRequest) { return func(r *MgetRequest) { r.Source = v @@ -263,7 +251,6 @@ func (f Mget) WithSource(v ...string) func(*MgetRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f Mget) WithSourceExcludes(v ...string) func(*MgetRequest) { return func(r *MgetRequest) { r.SourceExcludes = v @@ -271,7 +258,6 @@ func (f Mget) WithSourceExcludes(v ...string) func(*MgetRequest) { } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f Mget) WithSourceIncludes(v ...string) func(*MgetRequest) { return func(r *MgetRequest) { r.SourceIncludes = v @@ -279,7 +265,6 @@ func (f Mget) WithSourceIncludes(v ...string) func(*MgetRequest) { } // WithStoredFields - a list of stored fields to return in the response. -// func (f Mget) WithStoredFields(v ...string) func(*MgetRequest) { return func(r *MgetRequest) { r.StoredFields = v @@ -287,7 +272,6 @@ func (f Mget) WithStoredFields(v ...string) func(*MgetRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Mget) WithPretty() func(*MgetRequest) { return func(r *MgetRequest) { r.Pretty = true @@ -295,7 +279,6 @@ func (f Mget) WithPretty() func(*MgetRequest) { } // WithHuman makes statistical values human-readable. -// func (f Mget) WithHuman() func(*MgetRequest) { return func(r *MgetRequest) { r.Human = true @@ -303,7 +286,6 @@ func (f Mget) WithHuman() func(*MgetRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Mget) WithErrorTrace() func(*MgetRequest) { return func(r *MgetRequest) { r.ErrorTrace = true @@ -311,7 +293,6 @@ func (f Mget) WithErrorTrace() func(*MgetRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Mget) WithFilterPath(v ...string) func(*MgetRequest) { return func(r *MgetRequest) { r.FilterPath = v @@ -319,7 +300,6 @@ func (f Mget) WithFilterPath(v ...string) func(*MgetRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Mget) WithHeader(h map[string]string) func(*MgetRequest) { return func(r *MgetRequest) { if r.Header == nil { @@ -332,7 +312,6 @@ func (f Mget) WithHeader(h map[string]string) func(*MgetRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Mget) WithOpaqueID(s string) func(*MgetRequest) { return func(r *MgetRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.msearch.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.msearch.go index bd6ef8922000..5c26cb2c61bd 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.msearch.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.msearch.go @@ -47,12 +47,9 @@ func newMsearchFunc(t Transport) Msearch { // ----- API Definition ------------------------------------------------------- // Msearch allows to execute several search operations in one request. -// -// type Msearch func(body io.Reader, o ...func(*MsearchRequest)) (*Response, error) // MsearchRequest configures the Msearch API request. -// type MsearchRequest struct { Index []string DocumentType []string @@ -78,7 +75,6 @@ type MsearchRequest struct { } // Do executes the request and returns response or error. -// func (r MsearchRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -194,7 +190,6 @@ func (r MsearchRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f Msearch) WithContext(v context.Context) func(*MsearchRequest) { return func(r *MsearchRequest) { r.ctx = v @@ -202,7 +197,6 @@ func (f Msearch) WithContext(v context.Context) func(*MsearchRequest) { } // WithIndex - a list of index names to use as default. -// func (f Msearch) WithIndex(v ...string) func(*MsearchRequest) { return func(r *MsearchRequest) { r.Index = v @@ -210,7 +204,6 @@ func (f Msearch) WithIndex(v ...string) func(*MsearchRequest) { } // WithDocumentType - a list of document types to use as default. -// func (f Msearch) WithDocumentType(v ...string) func(*MsearchRequest) { return func(r *MsearchRequest) { r.DocumentType = v @@ -218,7 +211,6 @@ func (f Msearch) WithDocumentType(v ...string) func(*MsearchRequest) { } // WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. -// func (f Msearch) WithCcsMinimizeRoundtrips(v bool) func(*MsearchRequest) { return func(r *MsearchRequest) { r.CcsMinimizeRoundtrips = &v @@ -226,7 +218,6 @@ func (f Msearch) WithCcsMinimizeRoundtrips(v bool) func(*MsearchRequest) { } // WithMaxConcurrentSearches - controls the maximum number of concurrent searches the multi search api will execute. -// func (f Msearch) WithMaxConcurrentSearches(v int) func(*MsearchRequest) { return func(r *MsearchRequest) { r.MaxConcurrentSearches = &v @@ -234,7 +225,6 @@ func (f Msearch) WithMaxConcurrentSearches(v int) func(*MsearchRequest) { } // WithMaxConcurrentShardRequests - the number of concurrent shard requests each sub search executes concurrently per node. this value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. -// func (f Msearch) WithMaxConcurrentShardRequests(v int) func(*MsearchRequest) { return func(r *MsearchRequest) { r.MaxConcurrentShardRequests = &v @@ -242,7 +232,6 @@ func (f Msearch) WithMaxConcurrentShardRequests(v int) func(*MsearchRequest) { } // WithPreFilterShardSize - a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.. -// func (f Msearch) WithPreFilterShardSize(v int) func(*MsearchRequest) { return func(r *MsearchRequest) { r.PreFilterShardSize = &v @@ -250,7 +239,6 @@ func (f Msearch) WithPreFilterShardSize(v int) func(*MsearchRequest) { } // WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response. -// func (f Msearch) WithRestTotalHitsAsInt(v bool) func(*MsearchRequest) { return func(r *MsearchRequest) { r.RestTotalHitsAsInt = &v @@ -258,7 +246,6 @@ func (f Msearch) WithRestTotalHitsAsInt(v bool) func(*MsearchRequest) { } // WithSearchType - search operation type. -// func (f Msearch) WithSearchType(v string) func(*MsearchRequest) { return func(r *MsearchRequest) { r.SearchType = v @@ -266,7 +253,6 @@ func (f Msearch) WithSearchType(v string) func(*MsearchRequest) { } // WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response. -// func (f Msearch) WithTypedKeys(v bool) func(*MsearchRequest) { return func(r *MsearchRequest) { r.TypedKeys = &v @@ -274,7 +260,6 @@ func (f Msearch) WithTypedKeys(v bool) func(*MsearchRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Msearch) WithPretty() func(*MsearchRequest) { return func(r *MsearchRequest) { r.Pretty = true @@ -282,7 +267,6 @@ func (f Msearch) WithPretty() func(*MsearchRequest) { } // WithHuman makes statistical values human-readable. -// func (f Msearch) WithHuman() func(*MsearchRequest) { return func(r *MsearchRequest) { r.Human = true @@ -290,7 +274,6 @@ func (f Msearch) WithHuman() func(*MsearchRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Msearch) WithErrorTrace() func(*MsearchRequest) { return func(r *MsearchRequest) { r.ErrorTrace = true @@ -298,7 +281,6 @@ func (f Msearch) WithErrorTrace() func(*MsearchRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Msearch) WithFilterPath(v ...string) func(*MsearchRequest) { return func(r *MsearchRequest) { r.FilterPath = v @@ -306,7 +288,6 @@ func (f Msearch) WithFilterPath(v ...string) func(*MsearchRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Msearch) WithHeader(h map[string]string) func(*MsearchRequest) { return func(r *MsearchRequest) { if r.Header == nil { @@ -319,7 +300,6 @@ func (f Msearch) WithHeader(h map[string]string) func(*MsearchRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Msearch) WithOpaqueID(s string) func(*MsearchRequest) { return func(r *MsearchRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.msearch_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.msearch_template.go index e9dfcda48444..02c1036828aa 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.msearch_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.msearch_template.go @@ -47,12 +47,9 @@ func newMsearchTemplateFunc(t Transport) MsearchTemplate { // ----- API Definition ------------------------------------------------------- // MsearchTemplate allows to execute several search template operations in one request. -// -// type MsearchTemplate func(body io.Reader, o ...func(*MsearchTemplateRequest)) (*Response, error) // MsearchTemplateRequest configures the Msearch Template API request. -// type MsearchTemplateRequest struct { Index []string DocumentType []string @@ -76,7 +73,6 @@ type MsearchTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r MsearchTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -186,7 +182,6 @@ func (r MsearchTemplateRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f MsearchTemplate) WithContext(v context.Context) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.ctx = v @@ -194,7 +189,6 @@ func (f MsearchTemplate) WithContext(v context.Context) func(*MsearchTemplateReq } // WithIndex - a list of index names to use as default. -// func (f MsearchTemplate) WithIndex(v ...string) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.Index = v @@ -202,7 +196,6 @@ func (f MsearchTemplate) WithIndex(v ...string) func(*MsearchTemplateRequest) { } // WithDocumentType - a list of document types to use as default. -// func (f MsearchTemplate) WithDocumentType(v ...string) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.DocumentType = v @@ -210,7 +203,6 @@ func (f MsearchTemplate) WithDocumentType(v ...string) func(*MsearchTemplateRequ } // WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. -// func (f MsearchTemplate) WithCcsMinimizeRoundtrips(v bool) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.CcsMinimizeRoundtrips = &v @@ -218,7 +210,6 @@ func (f MsearchTemplate) WithCcsMinimizeRoundtrips(v bool) func(*MsearchTemplate } // WithMaxConcurrentSearches - controls the maximum number of concurrent searches the multi search api will execute. -// func (f MsearchTemplate) WithMaxConcurrentSearches(v int) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.MaxConcurrentSearches = &v @@ -226,7 +217,6 @@ func (f MsearchTemplate) WithMaxConcurrentSearches(v int) func(*MsearchTemplateR } // WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response. -// func (f MsearchTemplate) WithRestTotalHitsAsInt(v bool) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.RestTotalHitsAsInt = &v @@ -234,7 +224,6 @@ func (f MsearchTemplate) WithRestTotalHitsAsInt(v bool) func(*MsearchTemplateReq } // WithSearchType - search operation type. -// func (f MsearchTemplate) WithSearchType(v string) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.SearchType = v @@ -242,7 +231,6 @@ func (f MsearchTemplate) WithSearchType(v string) func(*MsearchTemplateRequest) } // WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response. -// func (f MsearchTemplate) WithTypedKeys(v bool) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.TypedKeys = &v @@ -250,7 +238,6 @@ func (f MsearchTemplate) WithTypedKeys(v bool) func(*MsearchTemplateRequest) { } // WithPretty makes the response body pretty-printed. -// func (f MsearchTemplate) WithPretty() func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.Pretty = true @@ -258,7 +245,6 @@ func (f MsearchTemplate) WithPretty() func(*MsearchTemplateRequest) { } // WithHuman makes statistical values human-readable. -// func (f MsearchTemplate) WithHuman() func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.Human = true @@ -266,7 +252,6 @@ func (f MsearchTemplate) WithHuman() func(*MsearchTemplateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f MsearchTemplate) WithErrorTrace() func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.ErrorTrace = true @@ -274,7 +259,6 @@ func (f MsearchTemplate) WithErrorTrace() func(*MsearchTemplateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f MsearchTemplate) WithFilterPath(v ...string) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { r.FilterPath = v @@ -282,7 +266,6 @@ func (f MsearchTemplate) WithFilterPath(v ...string) func(*MsearchTemplateReques } // WithHeader adds the headers to the HTTP request. -// func (f MsearchTemplate) WithHeader(h map[string]string) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { if r.Header == nil { @@ -295,7 +278,6 @@ func (f MsearchTemplate) WithHeader(h map[string]string) func(*MsearchTemplateRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f MsearchTemplate) WithOpaqueID(s string) func(*MsearchTemplateRequest) { return func(r *MsearchTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.mtermvectors.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.mtermvectors.go index 22d00e6a59aa..81f4b3742421 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.mtermvectors.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.mtermvectors.go @@ -47,12 +47,9 @@ func newMtermvectorsFunc(t Transport) Mtermvectors { // ----- API Definition ------------------------------------------------------- // Mtermvectors returns multiple termvectors in one request. -// -// type Mtermvectors func(o ...func(*MtermvectorsRequest)) (*Response, error) // MtermvectorsRequest configures the Mtermvectors API request. -// type MtermvectorsRequest struct { Index string DocumentType string @@ -83,7 +80,6 @@ type MtermvectorsRequest struct { } // Do executes the request and returns response or error. -// func (r MtermvectorsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -219,7 +215,6 @@ func (r MtermvectorsRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f Mtermvectors) WithContext(v context.Context) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.ctx = v @@ -227,7 +222,6 @@ func (f Mtermvectors) WithContext(v context.Context) func(*MtermvectorsRequest) } // WithBody - Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.. -// func (f Mtermvectors) WithBody(v io.Reader) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Body = v @@ -235,7 +229,6 @@ func (f Mtermvectors) WithBody(v io.Reader) func(*MtermvectorsRequest) { } // WithIndex - the index in which the document resides.. -// func (f Mtermvectors) WithIndex(v string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Index = v @@ -243,7 +236,6 @@ func (f Mtermvectors) WithIndex(v string) func(*MtermvectorsRequest) { } // WithDocumentType - the type of the document.. -// func (f Mtermvectors) WithDocumentType(v string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.DocumentType = v @@ -251,7 +243,6 @@ func (f Mtermvectors) WithDocumentType(v string) func(*MtermvectorsRequest) { } // WithFields - a list of fields to return. applies to all returned documents unless otherwise specified in body "params" or "docs".. -// func (f Mtermvectors) WithFields(v ...string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Fields = v @@ -259,7 +250,6 @@ func (f Mtermvectors) WithFields(v ...string) func(*MtermvectorsRequest) { } // WithFieldStatistics - specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs".. -// func (f Mtermvectors) WithFieldStatistics(v bool) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.FieldStatistics = &v @@ -267,7 +257,6 @@ func (f Mtermvectors) WithFieldStatistics(v bool) func(*MtermvectorsRequest) { } // WithIds - a list of documents ids. you must define ids as parameter or set "ids" or "docs" in the request body. -// func (f Mtermvectors) WithIds(v ...string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Ids = v @@ -275,7 +264,6 @@ func (f Mtermvectors) WithIds(v ...string) func(*MtermvectorsRequest) { } // WithOffsets - specifies if term offsets should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs".. -// func (f Mtermvectors) WithOffsets(v bool) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Offsets = &v @@ -283,7 +271,6 @@ func (f Mtermvectors) WithOffsets(v bool) func(*MtermvectorsRequest) { } // WithPayloads - specifies if term payloads should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs".. -// func (f Mtermvectors) WithPayloads(v bool) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Payloads = &v @@ -291,7 +278,6 @@ func (f Mtermvectors) WithPayloads(v bool) func(*MtermvectorsRequest) { } // WithPositions - specifies if term positions should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs".. -// func (f Mtermvectors) WithPositions(v bool) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Positions = &v @@ -299,7 +285,6 @@ func (f Mtermvectors) WithPositions(v bool) func(*MtermvectorsRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random) .applies to all returned documents unless otherwise specified in body "params" or "docs".. -// func (f Mtermvectors) WithPreference(v string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Preference = v @@ -307,7 +292,6 @@ func (f Mtermvectors) WithPreference(v string) func(*MtermvectorsRequest) { } // WithRealtime - specifies if requests are real-time as opposed to near-real-time (default: true).. -// func (f Mtermvectors) WithRealtime(v bool) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Realtime = &v @@ -315,7 +299,6 @@ func (f Mtermvectors) WithRealtime(v bool) func(*MtermvectorsRequest) { } // WithRouting - specific routing value. applies to all returned documents unless otherwise specified in body "params" or "docs".. -// func (f Mtermvectors) WithRouting(v string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Routing = v @@ -323,7 +306,6 @@ func (f Mtermvectors) WithRouting(v string) func(*MtermvectorsRequest) { } // WithTermStatistics - specifies if total term frequency and document frequency should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs".. -// func (f Mtermvectors) WithTermStatistics(v bool) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.TermStatistics = &v @@ -331,7 +313,6 @@ func (f Mtermvectors) WithTermStatistics(v bool) func(*MtermvectorsRequest) { } // WithVersion - explicit version number for concurrency control. -// func (f Mtermvectors) WithVersion(v int) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Version = &v @@ -339,7 +320,6 @@ func (f Mtermvectors) WithVersion(v int) func(*MtermvectorsRequest) { } // WithVersionType - specific version type. -// func (f Mtermvectors) WithVersionType(v string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.VersionType = v @@ -347,7 +327,6 @@ func (f Mtermvectors) WithVersionType(v string) func(*MtermvectorsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Mtermvectors) WithPretty() func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Pretty = true @@ -355,7 +334,6 @@ func (f Mtermvectors) WithPretty() func(*MtermvectorsRequest) { } // WithHuman makes statistical values human-readable. -// func (f Mtermvectors) WithHuman() func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.Human = true @@ -363,7 +341,6 @@ func (f Mtermvectors) WithHuman() func(*MtermvectorsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Mtermvectors) WithErrorTrace() func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.ErrorTrace = true @@ -371,7 +348,6 @@ func (f Mtermvectors) WithErrorTrace() func(*MtermvectorsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Mtermvectors) WithFilterPath(v ...string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { r.FilterPath = v @@ -379,7 +355,6 @@ func (f Mtermvectors) WithFilterPath(v ...string) func(*MtermvectorsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Mtermvectors) WithHeader(h map[string]string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { if r.Header == nil { @@ -392,7 +367,6 @@ func (f Mtermvectors) WithHeader(h map[string]string) func(*MtermvectorsRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Mtermvectors) WithOpaqueID(s string) func(*MtermvectorsRequest) { return func(r *MtermvectorsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.hot_threads.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.hot_threads.go index aff3ec8333ad..5bfcd6c09542 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.hot_threads.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.hot_threads.go @@ -47,12 +47,9 @@ func newNodesHotThreadsFunc(t Transport) NodesHotThreads { // ----- API Definition ------------------------------------------------------- // NodesHotThreads returns information about hot threads on each node in the cluster. -// -// type NodesHotThreads func(o ...func(*NodesHotThreadsRequest)) (*Response, error) // NodesHotThreadsRequest configures the Nodes Hot Threads API request. -// type NodesHotThreadsRequest struct { NodeID []string @@ -74,7 +71,6 @@ type NodesHotThreadsRequest struct { } // Do executes the request and returns response or error. -// func (r NodesHotThreadsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -182,7 +178,6 @@ func (r NodesHotThreadsRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f NodesHotThreads) WithContext(v context.Context) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.ctx = v @@ -190,7 +185,6 @@ func (f NodesHotThreads) WithContext(v context.Context) func(*NodesHotThreadsReq } // WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. -// func (f NodesHotThreads) WithNodeID(v ...string) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.NodeID = v @@ -198,7 +192,6 @@ func (f NodesHotThreads) WithNodeID(v ...string) func(*NodesHotThreadsRequest) { } // WithIgnoreIdleThreads - don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true). -// func (f NodesHotThreads) WithIgnoreIdleThreads(v bool) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.IgnoreIdleThreads = &v @@ -206,7 +199,6 @@ func (f NodesHotThreads) WithIgnoreIdleThreads(v bool) func(*NodesHotThreadsRequ } // WithInterval - the interval for the second sampling of threads. -// func (f NodesHotThreads) WithInterval(v time.Duration) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.Interval = v @@ -214,7 +206,6 @@ func (f NodesHotThreads) WithInterval(v time.Duration) func(*NodesHotThreadsRequ } // WithSnapshots - number of samples of thread stacktrace (default: 10). -// func (f NodesHotThreads) WithSnapshots(v int) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.Snapshots = &v @@ -222,7 +213,6 @@ func (f NodesHotThreads) WithSnapshots(v int) func(*NodesHotThreadsRequest) { } // WithThreads - specify the number of threads to provide information for (default: 3). -// func (f NodesHotThreads) WithThreads(v int) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.Threads = &v @@ -230,7 +220,6 @@ func (f NodesHotThreads) WithThreads(v int) func(*NodesHotThreadsRequest) { } // WithTimeout - explicit operation timeout. -// func (f NodesHotThreads) WithTimeout(v time.Duration) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.Timeout = v @@ -238,7 +227,6 @@ func (f NodesHotThreads) WithTimeout(v time.Duration) func(*NodesHotThreadsReque } // WithDocumentType - the type to sample (default: cpu). -// func (f NodesHotThreads) WithDocumentType(v string) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.DocumentType = v @@ -246,7 +234,6 @@ func (f NodesHotThreads) WithDocumentType(v string) func(*NodesHotThreadsRequest } // WithPretty makes the response body pretty-printed. -// func (f NodesHotThreads) WithPretty() func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.Pretty = true @@ -254,7 +241,6 @@ func (f NodesHotThreads) WithPretty() func(*NodesHotThreadsRequest) { } // WithHuman makes statistical values human-readable. -// func (f NodesHotThreads) WithHuman() func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.Human = true @@ -262,7 +248,6 @@ func (f NodesHotThreads) WithHuman() func(*NodesHotThreadsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f NodesHotThreads) WithErrorTrace() func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.ErrorTrace = true @@ -270,7 +255,6 @@ func (f NodesHotThreads) WithErrorTrace() func(*NodesHotThreadsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f NodesHotThreads) WithFilterPath(v ...string) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { r.FilterPath = v @@ -278,7 +262,6 @@ func (f NodesHotThreads) WithFilterPath(v ...string) func(*NodesHotThreadsReques } // WithHeader adds the headers to the HTTP request. -// func (f NodesHotThreads) WithHeader(h map[string]string) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { if r.Header == nil { @@ -291,7 +274,6 @@ func (f NodesHotThreads) WithHeader(h map[string]string) func(*NodesHotThreadsRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f NodesHotThreads) WithOpaqueID(s string) func(*NodesHotThreadsRequest) { return func(r *NodesHotThreadsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.info.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.info.go index 39b92976f5a8..8dc6fdc4eaf9 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.info.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.info.go @@ -47,12 +47,9 @@ func newNodesInfoFunc(t Transport) NodesInfo { // ----- API Definition ------------------------------------------------------- // NodesInfo returns information about nodes in the cluster. -// -// type NodesInfo func(o ...func(*NodesInfoRequest)) (*Response, error) // NodesInfoRequest configures the Nodes Info API request. -// type NodesInfoRequest struct { Metric []string NodeID []string @@ -71,7 +68,6 @@ type NodesInfoRequest struct { } // Do executes the request and returns response or error. -// func (r NodesInfoRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -163,7 +159,6 @@ func (r NodesInfoRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f NodesInfo) WithContext(v context.Context) func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { r.ctx = v @@ -171,7 +166,6 @@ func (f NodesInfo) WithContext(v context.Context) func(*NodesInfoRequest) { } // WithMetric - a list of metrics you wish returned. leave empty to return all.. -// func (f NodesInfo) WithMetric(v ...string) func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { r.Metric = v @@ -179,7 +173,6 @@ func (f NodesInfo) WithMetric(v ...string) func(*NodesInfoRequest) { } // WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. -// func (f NodesInfo) WithNodeID(v ...string) func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { r.NodeID = v @@ -187,7 +180,6 @@ func (f NodesInfo) WithNodeID(v ...string) func(*NodesInfoRequest) { } // WithFlatSettings - return settings in flat format (default: false). -// func (f NodesInfo) WithFlatSettings(v bool) func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { r.FlatSettings = &v @@ -195,7 +187,6 @@ func (f NodesInfo) WithFlatSettings(v bool) func(*NodesInfoRequest) { } // WithTimeout - explicit operation timeout. -// func (f NodesInfo) WithTimeout(v time.Duration) func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { r.Timeout = v @@ -203,7 +194,6 @@ func (f NodesInfo) WithTimeout(v time.Duration) func(*NodesInfoRequest) { } // WithPretty makes the response body pretty-printed. -// func (f NodesInfo) WithPretty() func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { r.Pretty = true @@ -211,7 +201,6 @@ func (f NodesInfo) WithPretty() func(*NodesInfoRequest) { } // WithHuman makes statistical values human-readable. -// func (f NodesInfo) WithHuman() func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { r.Human = true @@ -219,7 +208,6 @@ func (f NodesInfo) WithHuman() func(*NodesInfoRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f NodesInfo) WithErrorTrace() func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { r.ErrorTrace = true @@ -227,7 +215,6 @@ func (f NodesInfo) WithErrorTrace() func(*NodesInfoRequest) { } // WithFilterPath filters the properties of the response body. -// func (f NodesInfo) WithFilterPath(v ...string) func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { r.FilterPath = v @@ -235,7 +222,6 @@ func (f NodesInfo) WithFilterPath(v ...string) func(*NodesInfoRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f NodesInfo) WithHeader(h map[string]string) func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { if r.Header == nil { @@ -248,7 +234,6 @@ func (f NodesInfo) WithHeader(h map[string]string) func(*NodesInfoRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f NodesInfo) WithOpaqueID(s string) func(*NodesInfoRequest) { return func(r *NodesInfoRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.reload_secure_settings.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.reload_secure_settings.go index 9030f02734e5..3e364ad06c70 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.reload_secure_settings.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.reload_secure_settings.go @@ -47,12 +47,9 @@ func newNodesReloadSecureSettingsFunc(t Transport) NodesReloadSecureSettings { // ----- API Definition ------------------------------------------------------- // NodesReloadSecureSettings reloads secure settings. -// -// type NodesReloadSecureSettings func(o ...func(*NodesReloadSecureSettingsRequest)) (*Response, error) // NodesReloadSecureSettingsRequest configures the Nodes Reload Secure Settings API request. -// type NodesReloadSecureSettingsRequest struct { Body io.Reader @@ -71,7 +68,6 @@ type NodesReloadSecureSettingsRequest struct { } // Do executes the request and returns response or error. -// func (r NodesReloadSecureSettingsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -161,7 +157,6 @@ func (r NodesReloadSecureSettingsRequest) Do(ctx context.Context, transport Tran } // WithContext sets the request context. -// func (f NodesReloadSecureSettings) WithContext(v context.Context) func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { r.ctx = v @@ -169,7 +164,6 @@ func (f NodesReloadSecureSettings) WithContext(v context.Context) func(*NodesRel } // WithBody - An object containing the password for the opensearch keystore. -// func (f NodesReloadSecureSettings) WithBody(v io.Reader) func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { r.Body = v @@ -177,7 +171,6 @@ func (f NodesReloadSecureSettings) WithBody(v io.Reader) func(*NodesReloadSecure } // WithNodeID - a list of node ids to span the reload/reinit call. should stay empty because reloading usually involves all cluster nodes.. -// func (f NodesReloadSecureSettings) WithNodeID(v ...string) func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { r.NodeID = v @@ -185,7 +178,6 @@ func (f NodesReloadSecureSettings) WithNodeID(v ...string) func(*NodesReloadSecu } // WithTimeout - explicit operation timeout. -// func (f NodesReloadSecureSettings) WithTimeout(v time.Duration) func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { r.Timeout = v @@ -193,7 +185,6 @@ func (f NodesReloadSecureSettings) WithTimeout(v time.Duration) func(*NodesReloa } // WithPretty makes the response body pretty-printed. -// func (f NodesReloadSecureSettings) WithPretty() func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { r.Pretty = true @@ -201,7 +192,6 @@ func (f NodesReloadSecureSettings) WithPretty() func(*NodesReloadSecureSettingsR } // WithHuman makes statistical values human-readable. -// func (f NodesReloadSecureSettings) WithHuman() func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { r.Human = true @@ -209,7 +199,6 @@ func (f NodesReloadSecureSettings) WithHuman() func(*NodesReloadSecureSettingsRe } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f NodesReloadSecureSettings) WithErrorTrace() func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { r.ErrorTrace = true @@ -217,7 +206,6 @@ func (f NodesReloadSecureSettings) WithErrorTrace() func(*NodesReloadSecureSetti } // WithFilterPath filters the properties of the response body. -// func (f NodesReloadSecureSettings) WithFilterPath(v ...string) func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { r.FilterPath = v @@ -225,7 +213,6 @@ func (f NodesReloadSecureSettings) WithFilterPath(v ...string) func(*NodesReload } // WithHeader adds the headers to the HTTP request. -// func (f NodesReloadSecureSettings) WithHeader(h map[string]string) func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { if r.Header == nil { @@ -238,7 +225,6 @@ func (f NodesReloadSecureSettings) WithHeader(h map[string]string) func(*NodesRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f NodesReloadSecureSettings) WithOpaqueID(s string) func(*NodesReloadSecureSettingsRequest) { return func(r *NodesReloadSecureSettingsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.stats.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.stats.go index 6021814fba64..f13a8e6649c7 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.stats.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.stats.go @@ -47,12 +47,9 @@ func newNodesStatsFunc(t Transport) NodesStats { // ----- API Definition ------------------------------------------------------- // NodesStats returns statistical information about nodes in the cluster. -// -// type NodesStats func(o ...func(*NodesStatsRequest)) (*Response, error) // NodesStatsRequest configures the Nodes Stats API request. -// type NodesStatsRequest struct { IndexMetric []string Metric []string @@ -79,7 +76,6 @@ type NodesStatsRequest struct { } // Do executes the request and returns response or error. -// func (r NodesStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -205,7 +201,6 @@ func (r NodesStatsRequest) Do(ctx context.Context, transport Transport) (*Respon } // WithContext sets the request context. -// func (f NodesStats) WithContext(v context.Context) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.ctx = v @@ -213,7 +208,6 @@ func (f NodesStats) WithContext(v context.Context) func(*NodesStatsRequest) { } // WithIndexMetric - limit the information returned for `indices` metric to the specific index metrics. isn't used if `indices` (or `all`) metric isn't specified.. -// func (f NodesStats) WithIndexMetric(v ...string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.IndexMetric = v @@ -221,7 +215,6 @@ func (f NodesStats) WithIndexMetric(v ...string) func(*NodesStatsRequest) { } // WithMetric - limit the information returned to the specified metrics. -// func (f NodesStats) WithMetric(v ...string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.Metric = v @@ -229,7 +222,6 @@ func (f NodesStats) WithMetric(v ...string) func(*NodesStatsRequest) { } // WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. -// func (f NodesStats) WithNodeID(v ...string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.NodeID = v @@ -237,7 +229,6 @@ func (f NodesStats) WithNodeID(v ...string) func(*NodesStatsRequest) { } // WithCompletionFields - a list of fields for `fielddata` and `suggest` index metric (supports wildcards). -// func (f NodesStats) WithCompletionFields(v ...string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.CompletionFields = v @@ -245,7 +236,6 @@ func (f NodesStats) WithCompletionFields(v ...string) func(*NodesStatsRequest) { } // WithFielddataFields - a list of fields for `fielddata` index metric (supports wildcards). -// func (f NodesStats) WithFielddataFields(v ...string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.FielddataFields = v @@ -253,7 +243,6 @@ func (f NodesStats) WithFielddataFields(v ...string) func(*NodesStatsRequest) { } // WithFields - a list of fields for `fielddata` and `completion` index metric (supports wildcards). -// func (f NodesStats) WithFields(v ...string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.Fields = v @@ -261,7 +250,6 @@ func (f NodesStats) WithFields(v ...string) func(*NodesStatsRequest) { } // WithGroups - a list of search groups for `search` index metric. -// func (f NodesStats) WithGroups(v bool) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.Groups = &v @@ -269,7 +257,6 @@ func (f NodesStats) WithGroups(v bool) func(*NodesStatsRequest) { } // WithIncludeSegmentFileSizes - whether to report the aggregated disk usage of each one of the lucene index files (only applies if segment stats are requested). -// func (f NodesStats) WithIncludeSegmentFileSizes(v bool) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.IncludeSegmentFileSizes = &v @@ -277,7 +264,6 @@ func (f NodesStats) WithIncludeSegmentFileSizes(v bool) func(*NodesStatsRequest) } // WithIncludeUnloadedSegments - if set to true segment stats will include stats for segments that are not currently loaded into memory. -// func (f NodesStats) WithIncludeUnloadedSegments(v bool) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.IncludeUnloadedSegments = &v @@ -285,7 +271,6 @@ func (f NodesStats) WithIncludeUnloadedSegments(v bool) func(*NodesStatsRequest) } // WithLevel - return indices stats aggregated at index, node or shard level. -// func (f NodesStats) WithLevel(v string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.Level = v @@ -293,7 +278,6 @@ func (f NodesStats) WithLevel(v string) func(*NodesStatsRequest) { } // WithTimeout - explicit operation timeout. -// func (f NodesStats) WithTimeout(v time.Duration) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.Timeout = v @@ -301,7 +285,6 @@ func (f NodesStats) WithTimeout(v time.Duration) func(*NodesStatsRequest) { } // WithTypes - a list of document types for the `indexing` index metric. -// func (f NodesStats) WithTypes(v ...string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.Types = v @@ -309,7 +292,6 @@ func (f NodesStats) WithTypes(v ...string) func(*NodesStatsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f NodesStats) WithPretty() func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.Pretty = true @@ -317,7 +299,6 @@ func (f NodesStats) WithPretty() func(*NodesStatsRequest) { } // WithHuman makes statistical values human-readable. -// func (f NodesStats) WithHuman() func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.Human = true @@ -325,7 +306,6 @@ func (f NodesStats) WithHuman() func(*NodesStatsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f NodesStats) WithErrorTrace() func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.ErrorTrace = true @@ -333,7 +313,6 @@ func (f NodesStats) WithErrorTrace() func(*NodesStatsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f NodesStats) WithFilterPath(v ...string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { r.FilterPath = v @@ -341,7 +320,6 @@ func (f NodesStats) WithFilterPath(v ...string) func(*NodesStatsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f NodesStats) WithHeader(h map[string]string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { if r.Header == nil { @@ -354,7 +332,6 @@ func (f NodesStats) WithHeader(h map[string]string) func(*NodesStatsRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f NodesStats) WithOpaqueID(s string) func(*NodesStatsRequest) { return func(r *NodesStatsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.usage.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.usage.go index 25db9326fbe8..60595c359a7a 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.usage.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.nodes.usage.go @@ -46,12 +46,9 @@ func newNodesUsageFunc(t Transport) NodesUsage { // ----- API Definition ------------------------------------------------------- // NodesUsage returns low-level information about REST actions usage on nodes. -// -// type NodesUsage func(o ...func(*NodesUsageRequest)) (*Response, error) // NodesUsageRequest configures the Nodes Usage API request. -// type NodesUsageRequest struct { Metric []string NodeID []string @@ -69,7 +66,6 @@ type NodesUsageRequest struct { } // Do executes the request and returns response or error. -// func (r NodesUsageRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -159,7 +155,6 @@ func (r NodesUsageRequest) Do(ctx context.Context, transport Transport) (*Respon } // WithContext sets the request context. -// func (f NodesUsage) WithContext(v context.Context) func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { r.ctx = v @@ -167,7 +162,6 @@ func (f NodesUsage) WithContext(v context.Context) func(*NodesUsageRequest) { } // WithMetric - limit the information returned to the specified metrics. -// func (f NodesUsage) WithMetric(v ...string) func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { r.Metric = v @@ -175,7 +169,6 @@ func (f NodesUsage) WithMetric(v ...string) func(*NodesUsageRequest) { } // WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. -// func (f NodesUsage) WithNodeID(v ...string) func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { r.NodeID = v @@ -183,7 +176,6 @@ func (f NodesUsage) WithNodeID(v ...string) func(*NodesUsageRequest) { } // WithTimeout - explicit operation timeout. -// func (f NodesUsage) WithTimeout(v time.Duration) func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { r.Timeout = v @@ -191,7 +183,6 @@ func (f NodesUsage) WithTimeout(v time.Duration) func(*NodesUsageRequest) { } // WithPretty makes the response body pretty-printed. -// func (f NodesUsage) WithPretty() func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { r.Pretty = true @@ -199,7 +190,6 @@ func (f NodesUsage) WithPretty() func(*NodesUsageRequest) { } // WithHuman makes statistical values human-readable. -// func (f NodesUsage) WithHuman() func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { r.Human = true @@ -207,7 +197,6 @@ func (f NodesUsage) WithHuman() func(*NodesUsageRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f NodesUsage) WithErrorTrace() func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { r.ErrorTrace = true @@ -215,7 +204,6 @@ func (f NodesUsage) WithErrorTrace() func(*NodesUsageRequest) { } // WithFilterPath filters the properties of the response body. -// func (f NodesUsage) WithFilterPath(v ...string) func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { r.FilterPath = v @@ -223,7 +211,6 @@ func (f NodesUsage) WithFilterPath(v ...string) func(*NodesUsageRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f NodesUsage) WithHeader(h map[string]string) func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { if r.Header == nil { @@ -236,7 +223,6 @@ func (f NodesUsage) WithHeader(h map[string]string) func(*NodesUsageRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f NodesUsage) WithOpaqueID(s string) func(*NodesUsageRequest) { return func(r *NodesUsageRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ping.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ping.go index f30ef61c0188..9f09031e9856 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ping.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.ping.go @@ -45,12 +45,9 @@ func newPingFunc(t Transport) Ping { // ----- API Definition ------------------------------------------------------- // Ping returns whether the cluster is running. -// -// type Ping func(o ...func(*PingRequest)) (*Response, error) // PingRequest configures the Ping API request. -// type PingRequest struct { Pretty bool Human bool @@ -63,7 +60,6 @@ type PingRequest struct { } // Do executes the request and returns response or error. -// func (r PingRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -138,7 +134,6 @@ func (r PingRequest) Do(ctx context.Context, transport Transport) (*Response, er } // WithContext sets the request context. -// func (f Ping) WithContext(v context.Context) func(*PingRequest) { return func(r *PingRequest) { r.ctx = v @@ -146,7 +141,6 @@ func (f Ping) WithContext(v context.Context) func(*PingRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Ping) WithPretty() func(*PingRequest) { return func(r *PingRequest) { r.Pretty = true @@ -154,7 +148,6 @@ func (f Ping) WithPretty() func(*PingRequest) { } // WithHuman makes statistical values human-readable. -// func (f Ping) WithHuman() func(*PingRequest) { return func(r *PingRequest) { r.Human = true @@ -162,7 +155,6 @@ func (f Ping) WithHuman() func(*PingRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Ping) WithErrorTrace() func(*PingRequest) { return func(r *PingRequest) { r.ErrorTrace = true @@ -170,7 +162,6 @@ func (f Ping) WithErrorTrace() func(*PingRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Ping) WithFilterPath(v ...string) func(*PingRequest) { return func(r *PingRequest) { r.FilterPath = v @@ -178,7 +169,6 @@ func (f Ping) WithFilterPath(v ...string) func(*PingRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Ping) WithHeader(h map[string]string) func(*PingRequest) { return func(r *PingRequest) { if r.Header == nil { @@ -191,7 +181,6 @@ func (f Ping) WithHeader(h map[string]string) func(*PingRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Ping) WithOpaqueID(s string) func(*PingRequest) { return func(r *PingRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.put_script.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.put_script.go index 2349b42e1e66..7fdf7194238c 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.put_script.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.put_script.go @@ -47,12 +47,9 @@ func newPutScriptFunc(t Transport) PutScript { // ----- API Definition ------------------------------------------------------- // PutScript creates or updates a script. -// -// type PutScript func(id string, body io.Reader, o ...func(*PutScriptRequest)) (*Response, error) // PutScriptRequest configures the Put Script API request. -// type PutScriptRequest struct { ScriptID string @@ -74,7 +71,6 @@ type PutScriptRequest struct { } // Do executes the request and returns response or error. -// func (r PutScriptRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -172,7 +168,6 @@ func (r PutScriptRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f PutScript) WithContext(v context.Context) func(*PutScriptRequest) { return func(r *PutScriptRequest) { r.ctx = v @@ -180,7 +175,6 @@ func (f PutScript) WithContext(v context.Context) func(*PutScriptRequest) { } // WithScriptContext - script context. -// func (f PutScript) WithScriptContext(v string) func(*PutScriptRequest) { return func(r *PutScriptRequest) { r.ScriptContext = v @@ -188,7 +182,6 @@ func (f PutScript) WithScriptContext(v string) func(*PutScriptRequest) { } // WithMasterTimeout - specify timeout for connection to master. -// func (f PutScript) WithMasterTimeout(v time.Duration) func(*PutScriptRequest) { return func(r *PutScriptRequest) { r.MasterTimeout = v @@ -196,7 +189,6 @@ func (f PutScript) WithMasterTimeout(v time.Duration) func(*PutScriptRequest) { } // WithTimeout - explicit operation timeout. -// func (f PutScript) WithTimeout(v time.Duration) func(*PutScriptRequest) { return func(r *PutScriptRequest) { r.Timeout = v @@ -204,7 +196,6 @@ func (f PutScript) WithTimeout(v time.Duration) func(*PutScriptRequest) { } // WithPretty makes the response body pretty-printed. -// func (f PutScript) WithPretty() func(*PutScriptRequest) { return func(r *PutScriptRequest) { r.Pretty = true @@ -212,7 +203,6 @@ func (f PutScript) WithPretty() func(*PutScriptRequest) { } // WithHuman makes statistical values human-readable. -// func (f PutScript) WithHuman() func(*PutScriptRequest) { return func(r *PutScriptRequest) { r.Human = true @@ -220,7 +210,6 @@ func (f PutScript) WithHuman() func(*PutScriptRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f PutScript) WithErrorTrace() func(*PutScriptRequest) { return func(r *PutScriptRequest) { r.ErrorTrace = true @@ -228,7 +217,6 @@ func (f PutScript) WithErrorTrace() func(*PutScriptRequest) { } // WithFilterPath filters the properties of the response body. -// func (f PutScript) WithFilterPath(v ...string) func(*PutScriptRequest) { return func(r *PutScriptRequest) { r.FilterPath = v @@ -236,7 +224,6 @@ func (f PutScript) WithFilterPath(v ...string) func(*PutScriptRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f PutScript) WithHeader(h map[string]string) func(*PutScriptRequest) { return func(r *PutScriptRequest) { if r.Header == nil { @@ -249,7 +236,6 @@ func (f PutScript) WithHeader(h map[string]string) func(*PutScriptRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f PutScript) WithOpaqueID(s string) func(*PutScriptRequest) { return func(r *PutScriptRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.rank_eval.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.rank_eval.go index 68a819e173ca..7418c350c958 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.rank_eval.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.rank_eval.go @@ -49,12 +49,9 @@ func newRankEvalFunc(t Transport) RankEval { // RankEval allows to evaluate the quality of ranked search results over a set of typical search queries // // This API is experimental. -// -// type RankEval func(body io.Reader, o ...func(*RankEvalRequest)) (*Response, error) // RankEvalRequest configures the Rank Eval API request. -// type RankEvalRequest struct { Index []string @@ -76,7 +73,6 @@ type RankEvalRequest struct { } // Do executes the request and returns response or error. -// func (r RankEvalRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -176,7 +172,6 @@ func (r RankEvalRequest) Do(ctx context.Context, transport Transport) (*Response } // WithContext sets the request context. -// func (f RankEval) WithContext(v context.Context) func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.ctx = v @@ -184,7 +179,6 @@ func (f RankEval) WithContext(v context.Context) func(*RankEvalRequest) { } // WithIndex - a list of index names to search; use _all to perform the operation on all indices. -// func (f RankEval) WithIndex(v ...string) func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.Index = v @@ -192,7 +186,6 @@ func (f RankEval) WithIndex(v ...string) func(*RankEvalRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f RankEval) WithAllowNoIndices(v bool) func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.AllowNoIndices = &v @@ -200,7 +193,6 @@ func (f RankEval) WithAllowNoIndices(v bool) func(*RankEvalRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f RankEval) WithExpandWildcards(v string) func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.ExpandWildcards = v @@ -208,7 +200,6 @@ func (f RankEval) WithExpandWildcards(v string) func(*RankEvalRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f RankEval) WithIgnoreUnavailable(v bool) func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.IgnoreUnavailable = &v @@ -216,7 +207,6 @@ func (f RankEval) WithIgnoreUnavailable(v bool) func(*RankEvalRequest) { } // WithSearchType - search operation type. -// func (f RankEval) WithSearchType(v string) func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.SearchType = v @@ -224,7 +214,6 @@ func (f RankEval) WithSearchType(v string) func(*RankEvalRequest) { } // WithPretty makes the response body pretty-printed. -// func (f RankEval) WithPretty() func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.Pretty = true @@ -232,7 +221,6 @@ func (f RankEval) WithPretty() func(*RankEvalRequest) { } // WithHuman makes statistical values human-readable. -// func (f RankEval) WithHuman() func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.Human = true @@ -240,7 +228,6 @@ func (f RankEval) WithHuman() func(*RankEvalRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f RankEval) WithErrorTrace() func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.ErrorTrace = true @@ -248,7 +235,6 @@ func (f RankEval) WithErrorTrace() func(*RankEvalRequest) { } // WithFilterPath filters the properties of the response body. -// func (f RankEval) WithFilterPath(v ...string) func(*RankEvalRequest) { return func(r *RankEvalRequest) { r.FilterPath = v @@ -256,7 +242,6 @@ func (f RankEval) WithFilterPath(v ...string) func(*RankEvalRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f RankEval) WithHeader(h map[string]string) func(*RankEvalRequest) { return func(r *RankEvalRequest) { if r.Header == nil { @@ -269,7 +254,6 @@ func (f RankEval) WithHeader(h map[string]string) func(*RankEvalRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f RankEval) WithOpaqueID(s string) func(*RankEvalRequest) { return func(r *RankEvalRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.reindex.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.reindex.go index 2311ecb38b26..e19553173915 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.reindex.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.reindex.go @@ -51,12 +51,9 @@ func newReindexFunc(t Transport) Reindex { // Reindex allows to copy documents from one index to another, optionally filtering the source // documents by a query, changing the destination index settings, or fetching the // documents from a remote cluster. -// -// type Reindex func(body io.Reader, o ...func(*ReindexRequest)) (*Response, error) // ReindexRequest configures the Reindex API request. -// type ReindexRequest struct { Body io.Reader @@ -80,7 +77,6 @@ type ReindexRequest struct { } // Do executes the request and returns response or error. -// func (r ReindexRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -191,7 +187,6 @@ func (r ReindexRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f Reindex) WithContext(v context.Context) func(*ReindexRequest) { return func(r *ReindexRequest) { r.ctx = v @@ -199,7 +194,6 @@ func (f Reindex) WithContext(v context.Context) func(*ReindexRequest) { } // WithMaxDocs - maximum number of documents to process (default: all documents). -// func (f Reindex) WithMaxDocs(v int) func(*ReindexRequest) { return func(r *ReindexRequest) { r.MaxDocs = &v @@ -207,7 +201,6 @@ func (f Reindex) WithMaxDocs(v int) func(*ReindexRequest) { } // WithRefresh - should the affected indexes be refreshed?. -// func (f Reindex) WithRefresh(v bool) func(*ReindexRequest) { return func(r *ReindexRequest) { r.Refresh = &v @@ -215,7 +208,6 @@ func (f Reindex) WithRefresh(v bool) func(*ReindexRequest) { } // WithRequestsPerSecond - the throttle to set on this request in sub-requests per second. -1 means no throttle.. -// func (f Reindex) WithRequestsPerSecond(v int) func(*ReindexRequest) { return func(r *ReindexRequest) { r.RequestsPerSecond = &v @@ -223,7 +215,6 @@ func (f Reindex) WithRequestsPerSecond(v int) func(*ReindexRequest) { } // WithScroll - control how long to keep the search context alive. -// func (f Reindex) WithScroll(v time.Duration) func(*ReindexRequest) { return func(r *ReindexRequest) { r.Scroll = v @@ -231,7 +222,6 @@ func (f Reindex) WithScroll(v time.Duration) func(*ReindexRequest) { } // WithSlices - the number of slices this task should be divided into. defaults to 1, meaning the task isn't sliced into subtasks. can be set to `auto`.. -// func (f Reindex) WithSlices(v interface{}) func(*ReindexRequest) { return func(r *ReindexRequest) { r.Slices = v @@ -239,7 +229,6 @@ func (f Reindex) WithSlices(v interface{}) func(*ReindexRequest) { } // WithTimeout - time each individual bulk request should wait for shards that are unavailable.. -// func (f Reindex) WithTimeout(v time.Duration) func(*ReindexRequest) { return func(r *ReindexRequest) { r.Timeout = v @@ -247,7 +236,6 @@ func (f Reindex) WithTimeout(v time.Duration) func(*ReindexRequest) { } // WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the reindex operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1). -// func (f Reindex) WithWaitForActiveShards(v string) func(*ReindexRequest) { return func(r *ReindexRequest) { r.WaitForActiveShards = v @@ -255,7 +243,6 @@ func (f Reindex) WithWaitForActiveShards(v string) func(*ReindexRequest) { } // WithWaitForCompletion - should the request should block until the reindex is complete.. -// func (f Reindex) WithWaitForCompletion(v bool) func(*ReindexRequest) { return func(r *ReindexRequest) { r.WaitForCompletion = &v @@ -263,7 +250,6 @@ func (f Reindex) WithWaitForCompletion(v bool) func(*ReindexRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Reindex) WithPretty() func(*ReindexRequest) { return func(r *ReindexRequest) { r.Pretty = true @@ -271,7 +257,6 @@ func (f Reindex) WithPretty() func(*ReindexRequest) { } // WithHuman makes statistical values human-readable. -// func (f Reindex) WithHuman() func(*ReindexRequest) { return func(r *ReindexRequest) { r.Human = true @@ -279,7 +264,6 @@ func (f Reindex) WithHuman() func(*ReindexRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Reindex) WithErrorTrace() func(*ReindexRequest) { return func(r *ReindexRequest) { r.ErrorTrace = true @@ -287,7 +271,6 @@ func (f Reindex) WithErrorTrace() func(*ReindexRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Reindex) WithFilterPath(v ...string) func(*ReindexRequest) { return func(r *ReindexRequest) { r.FilterPath = v @@ -295,7 +278,6 @@ func (f Reindex) WithFilterPath(v ...string) func(*ReindexRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Reindex) WithHeader(h map[string]string) func(*ReindexRequest) { return func(r *ReindexRequest) { if r.Header == nil { @@ -308,7 +290,6 @@ func (f Reindex) WithHeader(h map[string]string) func(*ReindexRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Reindex) WithOpaqueID(s string) func(*ReindexRequest) { return func(r *ReindexRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.reindex_rethrottle.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.reindex_rethrottle.go index f51b414e11a2..4e8e38da703b 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.reindex_rethrottle.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.reindex_rethrottle.go @@ -46,12 +46,9 @@ func newReindexRethrottleFunc(t Transport) ReindexRethrottle { // ----- API Definition ------------------------------------------------------- // ReindexRethrottle changes the number of requests per second for a particular Reindex operation. -// -// type ReindexRethrottle func(task_id string, requests_per_second *int, o ...func(*ReindexRethrottleRequest)) (*Response, error) // ReindexRethrottleRequest configures the Reindex Rethrottle API request. -// type ReindexRethrottleRequest struct { TaskID string @@ -68,7 +65,6 @@ type ReindexRethrottleRequest struct { } // Do executes the request and returns response or error. -// func (r ReindexRethrottleRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -152,7 +148,6 @@ func (r ReindexRethrottleRequest) Do(ctx context.Context, transport Transport) ( } // WithContext sets the request context. -// func (f ReindexRethrottle) WithContext(v context.Context) func(*ReindexRethrottleRequest) { return func(r *ReindexRethrottleRequest) { r.ctx = v @@ -160,7 +155,6 @@ func (f ReindexRethrottle) WithContext(v context.Context) func(*ReindexRethrottl } // WithRequestsPerSecond - the throttle to set on this request in floating sub-requests per second. -1 means set no throttle.. -// func (f ReindexRethrottle) WithRequestsPerSecond(v int) func(*ReindexRethrottleRequest) { return func(r *ReindexRethrottleRequest) { r.RequestsPerSecond = &v @@ -168,7 +162,6 @@ func (f ReindexRethrottle) WithRequestsPerSecond(v int) func(*ReindexRethrottleR } // WithPretty makes the response body pretty-printed. -// func (f ReindexRethrottle) WithPretty() func(*ReindexRethrottleRequest) { return func(r *ReindexRethrottleRequest) { r.Pretty = true @@ -176,7 +169,6 @@ func (f ReindexRethrottle) WithPretty() func(*ReindexRethrottleRequest) { } // WithHuman makes statistical values human-readable. -// func (f ReindexRethrottle) WithHuman() func(*ReindexRethrottleRequest) { return func(r *ReindexRethrottleRequest) { r.Human = true @@ -184,7 +176,6 @@ func (f ReindexRethrottle) WithHuman() func(*ReindexRethrottleRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ReindexRethrottle) WithErrorTrace() func(*ReindexRethrottleRequest) { return func(r *ReindexRethrottleRequest) { r.ErrorTrace = true @@ -192,7 +183,6 @@ func (f ReindexRethrottle) WithErrorTrace() func(*ReindexRethrottleRequest) { } // WithFilterPath filters the properties of the response body. -// func (f ReindexRethrottle) WithFilterPath(v ...string) func(*ReindexRethrottleRequest) { return func(r *ReindexRethrottleRequest) { r.FilterPath = v @@ -200,7 +190,6 @@ func (f ReindexRethrottle) WithFilterPath(v ...string) func(*ReindexRethrottleRe } // WithHeader adds the headers to the HTTP request. -// func (f ReindexRethrottle) WithHeader(h map[string]string) func(*ReindexRethrottleRequest) { return func(r *ReindexRethrottleRequest) { if r.Header == nil { @@ -213,7 +202,6 @@ func (f ReindexRethrottle) WithHeader(h map[string]string) func(*ReindexRethrott } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ReindexRethrottle) WithOpaqueID(s string) func(*ReindexRethrottleRequest) { return func(r *ReindexRethrottleRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.render_search_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.render_search_template.go index d5ddfdb3a19d..e3011cf7a5fe 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.render_search_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.render_search_template.go @@ -46,12 +46,9 @@ func newRenderSearchTemplateFunc(t Transport) RenderSearchTemplate { // ----- API Definition ------------------------------------------------------- // RenderSearchTemplate allows to use the Mustache language to pre-render a search definition. -// -// type RenderSearchTemplate func(o ...func(*RenderSearchTemplateRequest)) (*Response, error) // RenderSearchTemplateRequest configures the Render Search Template API request. -// type RenderSearchTemplateRequest struct { TemplateID string @@ -68,7 +65,6 @@ type RenderSearchTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r RenderSearchTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -154,7 +150,6 @@ func (r RenderSearchTemplateRequest) Do(ctx context.Context, transport Transport } // WithContext sets the request context. -// func (f RenderSearchTemplate) WithContext(v context.Context) func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { r.ctx = v @@ -162,7 +157,6 @@ func (f RenderSearchTemplate) WithContext(v context.Context) func(*RenderSearchT } // WithBody - The search definition template and its params. -// func (f RenderSearchTemplate) WithBody(v io.Reader) func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { r.Body = v @@ -170,7 +164,6 @@ func (f RenderSearchTemplate) WithBody(v io.Reader) func(*RenderSearchTemplateRe } // WithTemplateID - the ID of the stored search template. -// func (f RenderSearchTemplate) WithTemplateID(v string) func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { r.TemplateID = v @@ -178,7 +171,6 @@ func (f RenderSearchTemplate) WithTemplateID(v string) func(*RenderSearchTemplat } // WithPretty makes the response body pretty-printed. -// func (f RenderSearchTemplate) WithPretty() func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { r.Pretty = true @@ -186,7 +178,6 @@ func (f RenderSearchTemplate) WithPretty() func(*RenderSearchTemplateRequest) { } // WithHuman makes statistical values human-readable. -// func (f RenderSearchTemplate) WithHuman() func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { r.Human = true @@ -194,7 +185,6 @@ func (f RenderSearchTemplate) WithHuman() func(*RenderSearchTemplateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f RenderSearchTemplate) WithErrorTrace() func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { r.ErrorTrace = true @@ -202,7 +192,6 @@ func (f RenderSearchTemplate) WithErrorTrace() func(*RenderSearchTemplateRequest } // WithFilterPath filters the properties of the response body. -// func (f RenderSearchTemplate) WithFilterPath(v ...string) func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { r.FilterPath = v @@ -210,7 +199,6 @@ func (f RenderSearchTemplate) WithFilterPath(v ...string) func(*RenderSearchTemp } // WithHeader adds the headers to the HTTP request. -// func (f RenderSearchTemplate) WithHeader(h map[string]string) func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { if r.Header == nil { @@ -223,7 +211,6 @@ func (f RenderSearchTemplate) WithHeader(h map[string]string) func(*RenderSearch } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f RenderSearchTemplate) WithOpaqueID(s string) func(*RenderSearchTemplateRequest) { return func(r *RenderSearchTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.scripts_painless_execute.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.scripts_painless_execute.go index 818954d55add..0fe3cb48809c 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.scripts_painless_execute.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.scripts_painless_execute.go @@ -48,12 +48,9 @@ func newScriptsPainlessExecuteFunc(t Transport) ScriptsPainlessExecute { // ScriptsPainlessExecute allows an arbitrary script to be executed and a result to be returned // // This API is experimental. -// -// type ScriptsPainlessExecute func(o ...func(*ScriptsPainlessExecuteRequest)) (*Response, error) // ScriptsPainlessExecuteRequest configures the Scripts Painless Execute API request. -// type ScriptsPainlessExecuteRequest struct { Body io.Reader @@ -68,7 +65,6 @@ type ScriptsPainlessExecuteRequest struct { } // Do executes the request and returns response or error. -// func (r ScriptsPainlessExecuteRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -147,7 +143,6 @@ func (r ScriptsPainlessExecuteRequest) Do(ctx context.Context, transport Transpo } // WithContext sets the request context. -// func (f ScriptsPainlessExecute) WithContext(v context.Context) func(*ScriptsPainlessExecuteRequest) { return func(r *ScriptsPainlessExecuteRequest) { r.ctx = v @@ -155,7 +150,6 @@ func (f ScriptsPainlessExecute) WithContext(v context.Context) func(*ScriptsPain } // WithBody - The script to execute. -// func (f ScriptsPainlessExecute) WithBody(v io.Reader) func(*ScriptsPainlessExecuteRequest) { return func(r *ScriptsPainlessExecuteRequest) { r.Body = v @@ -163,7 +157,6 @@ func (f ScriptsPainlessExecute) WithBody(v io.Reader) func(*ScriptsPainlessExecu } // WithPretty makes the response body pretty-printed. -// func (f ScriptsPainlessExecute) WithPretty() func(*ScriptsPainlessExecuteRequest) { return func(r *ScriptsPainlessExecuteRequest) { r.Pretty = true @@ -171,7 +164,6 @@ func (f ScriptsPainlessExecute) WithPretty() func(*ScriptsPainlessExecuteRequest } // WithHuman makes statistical values human-readable. -// func (f ScriptsPainlessExecute) WithHuman() func(*ScriptsPainlessExecuteRequest) { return func(r *ScriptsPainlessExecuteRequest) { r.Human = true @@ -179,7 +171,6 @@ func (f ScriptsPainlessExecute) WithHuman() func(*ScriptsPainlessExecuteRequest) } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f ScriptsPainlessExecute) WithErrorTrace() func(*ScriptsPainlessExecuteRequest) { return func(r *ScriptsPainlessExecuteRequest) { r.ErrorTrace = true @@ -187,7 +178,6 @@ func (f ScriptsPainlessExecute) WithErrorTrace() func(*ScriptsPainlessExecuteReq } // WithFilterPath filters the properties of the response body. -// func (f ScriptsPainlessExecute) WithFilterPath(v ...string) func(*ScriptsPainlessExecuteRequest) { return func(r *ScriptsPainlessExecuteRequest) { r.FilterPath = v @@ -195,7 +185,6 @@ func (f ScriptsPainlessExecute) WithFilterPath(v ...string) func(*ScriptsPainles } // WithHeader adds the headers to the HTTP request. -// func (f ScriptsPainlessExecute) WithHeader(h map[string]string) func(*ScriptsPainlessExecuteRequest) { return func(r *ScriptsPainlessExecuteRequest) { if r.Header == nil { @@ -208,7 +197,6 @@ func (f ScriptsPainlessExecute) WithHeader(h map[string]string) func(*ScriptsPai } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f ScriptsPainlessExecute) WithOpaqueID(s string) func(*ScriptsPainlessExecuteRequest) { return func(r *ScriptsPainlessExecuteRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.scroll.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.scroll.go index 3298281737d7..9bf872ea36df 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.scroll.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.scroll.go @@ -48,12 +48,9 @@ func newScrollFunc(t Transport) Scroll { // ----- API Definition ------------------------------------------------------- // Scroll allows to retrieve a large numbers of results from a single search request. -// -// type Scroll func(o ...func(*ScrollRequest)) (*Response, error) // ScrollRequest configures the Scroll API request. -// type ScrollRequest struct { Body io.Reader @@ -73,7 +70,6 @@ type ScrollRequest struct { } // Do executes the request and returns response or error. -// func (r ScrollRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -164,7 +160,6 @@ func (r ScrollRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f Scroll) WithContext(v context.Context) func(*ScrollRequest) { return func(r *ScrollRequest) { r.ctx = v @@ -172,7 +167,6 @@ func (f Scroll) WithContext(v context.Context) func(*ScrollRequest) { } // WithBody - The scroll ID if not passed by URL or query parameter.. -// func (f Scroll) WithBody(v io.Reader) func(*ScrollRequest) { return func(r *ScrollRequest) { r.Body = v @@ -180,7 +174,6 @@ func (f Scroll) WithBody(v io.Reader) func(*ScrollRequest) { } // WithScrollID - the scroll ID. -// func (f Scroll) WithScrollID(v string) func(*ScrollRequest) { return func(r *ScrollRequest) { r.ScrollID = v @@ -188,7 +181,6 @@ func (f Scroll) WithScrollID(v string) func(*ScrollRequest) { } // WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response. -// func (f Scroll) WithRestTotalHitsAsInt(v bool) func(*ScrollRequest) { return func(r *ScrollRequest) { r.RestTotalHitsAsInt = &v @@ -196,7 +188,6 @@ func (f Scroll) WithRestTotalHitsAsInt(v bool) func(*ScrollRequest) { } // WithScroll - specify how long a consistent view of the index should be maintained for scrolled search. -// func (f Scroll) WithScroll(v time.Duration) func(*ScrollRequest) { return func(r *ScrollRequest) { r.Scroll = v @@ -204,7 +195,6 @@ func (f Scroll) WithScroll(v time.Duration) func(*ScrollRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Scroll) WithPretty() func(*ScrollRequest) { return func(r *ScrollRequest) { r.Pretty = true @@ -212,7 +202,6 @@ func (f Scroll) WithPretty() func(*ScrollRequest) { } // WithHuman makes statistical values human-readable. -// func (f Scroll) WithHuman() func(*ScrollRequest) { return func(r *ScrollRequest) { r.Human = true @@ -220,7 +209,6 @@ func (f Scroll) WithHuman() func(*ScrollRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Scroll) WithErrorTrace() func(*ScrollRequest) { return func(r *ScrollRequest) { r.ErrorTrace = true @@ -228,7 +216,6 @@ func (f Scroll) WithErrorTrace() func(*ScrollRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Scroll) WithFilterPath(v ...string) func(*ScrollRequest) { return func(r *ScrollRequest) { r.FilterPath = v @@ -236,7 +223,6 @@ func (f Scroll) WithFilterPath(v ...string) func(*ScrollRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Scroll) WithHeader(h map[string]string) func(*ScrollRequest) { return func(r *ScrollRequest) { if r.Header == nil { @@ -249,7 +235,6 @@ func (f Scroll) WithHeader(h map[string]string) func(*ScrollRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Scroll) WithOpaqueID(s string) func(*ScrollRequest) { return func(r *ScrollRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search.go index 8d76675bd00b..c76372930027 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search.go @@ -49,12 +49,9 @@ func newSearchFunc(t Transport) Search { // ----- API Definition ------------------------------------------------------- // Search returns results matching a query. -// -// type Search func(o ...func(*SearchRequest)) (*Response, error) // SearchRequest configures the Search API request. -// type SearchRequest struct { Index []string DocumentType []string @@ -116,7 +113,6 @@ type SearchRequest struct { } // Do executes the request and returns response or error. -// func (r SearchRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -376,7 +372,6 @@ func (r SearchRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f Search) WithContext(v context.Context) func(*SearchRequest) { return func(r *SearchRequest) { r.ctx = v @@ -384,7 +379,6 @@ func (f Search) WithContext(v context.Context) func(*SearchRequest) { } // WithBody - The search definition using the Query DSL. -// func (f Search) WithBody(v io.Reader) func(*SearchRequest) { return func(r *SearchRequest) { r.Body = v @@ -392,7 +386,6 @@ func (f Search) WithBody(v io.Reader) func(*SearchRequest) { } // WithIndex - a list of index names to search; use _all to perform the operation on all indices. -// func (f Search) WithIndex(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.Index = v @@ -400,7 +393,6 @@ func (f Search) WithIndex(v ...string) func(*SearchRequest) { } // WithDocumentType - a list of document types to search; leave empty to perform the operation on all types. -// func (f Search) WithDocumentType(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.DocumentType = v @@ -408,7 +400,6 @@ func (f Search) WithDocumentType(v ...string) func(*SearchRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f Search) WithAllowNoIndices(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.AllowNoIndices = &v @@ -416,7 +407,6 @@ func (f Search) WithAllowNoIndices(v bool) func(*SearchRequest) { } // WithAllowPartialSearchResults - indicate if an error should be returned if there is a partial search failure or timeout. -// func (f Search) WithAllowPartialSearchResults(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.AllowPartialSearchResults = &v @@ -424,7 +414,6 @@ func (f Search) WithAllowPartialSearchResults(v bool) func(*SearchRequest) { } // WithAnalyzer - the analyzer to use for the query string. -// func (f Search) WithAnalyzer(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.Analyzer = v @@ -432,7 +421,6 @@ func (f Search) WithAnalyzer(v string) func(*SearchRequest) { } // WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false). -// func (f Search) WithAnalyzeWildcard(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.AnalyzeWildcard = &v @@ -440,7 +428,6 @@ func (f Search) WithAnalyzeWildcard(v bool) func(*SearchRequest) { } // WithBatchedReduceSize - the number of shard results that should be reduced at once on the coordinating node. this value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.. -// func (f Search) WithBatchedReduceSize(v int) func(*SearchRequest) { return func(r *SearchRequest) { r.BatchedReduceSize = &v @@ -448,7 +435,6 @@ func (f Search) WithBatchedReduceSize(v int) func(*SearchRequest) { } // WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. -// func (f Search) WithCcsMinimizeRoundtrips(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.CcsMinimizeRoundtrips = &v @@ -456,7 +442,6 @@ func (f Search) WithCcsMinimizeRoundtrips(v bool) func(*SearchRequest) { } // WithDefaultOperator - the default operator for query string query (and or or). -// func (f Search) WithDefaultOperator(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.DefaultOperator = v @@ -464,7 +449,6 @@ func (f Search) WithDefaultOperator(v string) func(*SearchRequest) { } // WithDf - the field to use as default where no field prefix is given in the query string. -// func (f Search) WithDf(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.Df = v @@ -472,7 +456,6 @@ func (f Search) WithDf(v string) func(*SearchRequest) { } // WithDocvalueFields - a list of fields to return as the docvalue representation of a field for each hit. -// func (f Search) WithDocvalueFields(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.DocvalueFields = v @@ -480,7 +463,6 @@ func (f Search) WithDocvalueFields(v ...string) func(*SearchRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f Search) WithExpandWildcards(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.ExpandWildcards = v @@ -488,7 +470,6 @@ func (f Search) WithExpandWildcards(v string) func(*SearchRequest) { } // WithExplain - specify whether to return detailed information about score computation as part of a hit. -// func (f Search) WithExplain(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.Explain = &v @@ -496,7 +477,6 @@ func (f Search) WithExplain(v bool) func(*SearchRequest) { } // WithFrom - starting offset (default: 0). -// func (f Search) WithFrom(v int) func(*SearchRequest) { return func(r *SearchRequest) { r.From = &v @@ -504,7 +484,6 @@ func (f Search) WithFrom(v int) func(*SearchRequest) { } // WithIgnoreThrottled - whether specified concrete, expanded or aliased indices should be ignored when throttled. -// func (f Search) WithIgnoreThrottled(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.IgnoreThrottled = &v @@ -512,7 +491,6 @@ func (f Search) WithIgnoreThrottled(v bool) func(*SearchRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f Search) WithIgnoreUnavailable(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.IgnoreUnavailable = &v @@ -520,7 +498,6 @@ func (f Search) WithIgnoreUnavailable(v bool) func(*SearchRequest) { } // WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored. -// func (f Search) WithLenient(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.Lenient = &v @@ -528,7 +505,6 @@ func (f Search) WithLenient(v bool) func(*SearchRequest) { } // WithMaxConcurrentShardRequests - the number of concurrent shard requests per node this search executes concurrently. this value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. -// func (f Search) WithMaxConcurrentShardRequests(v int) func(*SearchRequest) { return func(r *SearchRequest) { r.MaxConcurrentShardRequests = &v @@ -536,7 +512,6 @@ func (f Search) WithMaxConcurrentShardRequests(v int) func(*SearchRequest) { } // WithMinCompatibleShardNode - the minimum compatible version that all shards involved in search should have for this request to be successful. -// func (f Search) WithMinCompatibleShardNode(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.MinCompatibleShardNode = v @@ -544,7 +519,6 @@ func (f Search) WithMinCompatibleShardNode(v string) func(*SearchRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f Search) WithPreference(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.Preference = v @@ -552,7 +526,6 @@ func (f Search) WithPreference(v string) func(*SearchRequest) { } // WithPreFilterShardSize - a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.. -// func (f Search) WithPreFilterShardSize(v int) func(*SearchRequest) { return func(r *SearchRequest) { r.PreFilterShardSize = &v @@ -560,7 +533,6 @@ func (f Search) WithPreFilterShardSize(v int) func(*SearchRequest) { } // WithQuery - query in the lucene query string syntax. -// func (f Search) WithQuery(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.Query = v @@ -568,7 +540,6 @@ func (f Search) WithQuery(v string) func(*SearchRequest) { } // WithRequestCache - specify if request cache should be used for this request or not, defaults to index level setting. -// func (f Search) WithRequestCache(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.RequestCache = &v @@ -576,7 +547,6 @@ func (f Search) WithRequestCache(v bool) func(*SearchRequest) { } // WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response. -// func (f Search) WithRestTotalHitsAsInt(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.RestTotalHitsAsInt = &v @@ -584,7 +554,6 @@ func (f Search) WithRestTotalHitsAsInt(v bool) func(*SearchRequest) { } // WithRouting - a list of specific routing values. -// func (f Search) WithRouting(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.Routing = v @@ -592,7 +561,6 @@ func (f Search) WithRouting(v ...string) func(*SearchRequest) { } // WithScroll - specify how long a consistent view of the index should be maintained for scrolled search. -// func (f Search) WithScroll(v time.Duration) func(*SearchRequest) { return func(r *SearchRequest) { r.Scroll = v @@ -600,7 +568,6 @@ func (f Search) WithScroll(v time.Duration) func(*SearchRequest) { } // WithSearchType - search operation type. -// func (f Search) WithSearchType(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.SearchType = v @@ -608,7 +575,6 @@ func (f Search) WithSearchType(v string) func(*SearchRequest) { } // WithSeqNoPrimaryTerm - specify whether to return sequence number and primary term of the last modification of each hit. -// func (f Search) WithSeqNoPrimaryTerm(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.SeqNoPrimaryTerm = &v @@ -616,7 +582,6 @@ func (f Search) WithSeqNoPrimaryTerm(v bool) func(*SearchRequest) { } // WithSize - number of hits to return (default: 10). -// func (f Search) WithSize(v int) func(*SearchRequest) { return func(r *SearchRequest) { r.Size = &v @@ -624,7 +589,6 @@ func (f Search) WithSize(v int) func(*SearchRequest) { } // WithSort - a list of : pairs. -// func (f Search) WithSort(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.Sort = v @@ -632,7 +596,6 @@ func (f Search) WithSort(v ...string) func(*SearchRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f Search) WithSource(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.Source = v @@ -640,7 +603,6 @@ func (f Search) WithSource(v ...string) func(*SearchRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f Search) WithSourceExcludes(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.SourceExcludes = v @@ -648,7 +610,6 @@ func (f Search) WithSourceExcludes(v ...string) func(*SearchRequest) { } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f Search) WithSourceIncludes(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.SourceIncludes = v @@ -656,7 +617,6 @@ func (f Search) WithSourceIncludes(v ...string) func(*SearchRequest) { } // WithStats - specific 'tag' of the request for logging and statistical purposes. -// func (f Search) WithStats(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.Stats = v @@ -664,7 +624,6 @@ func (f Search) WithStats(v ...string) func(*SearchRequest) { } // WithStoredFields - a list of stored fields to return as part of a hit. -// func (f Search) WithStoredFields(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.StoredFields = v @@ -672,7 +631,6 @@ func (f Search) WithStoredFields(v ...string) func(*SearchRequest) { } // WithSuggestField - specify which field to use for suggestions. -// func (f Search) WithSuggestField(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.SuggestField = v @@ -680,7 +638,6 @@ func (f Search) WithSuggestField(v string) func(*SearchRequest) { } // WithSuggestMode - specify suggest mode. -// func (f Search) WithSuggestMode(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.SuggestMode = v @@ -688,7 +645,6 @@ func (f Search) WithSuggestMode(v string) func(*SearchRequest) { } // WithSuggestSize - how many suggestions to return in response. -// func (f Search) WithSuggestSize(v int) func(*SearchRequest) { return func(r *SearchRequest) { r.SuggestSize = &v @@ -696,7 +652,6 @@ func (f Search) WithSuggestSize(v int) func(*SearchRequest) { } // WithSuggestText - the source text for which the suggestions should be returned. -// func (f Search) WithSuggestText(v string) func(*SearchRequest) { return func(r *SearchRequest) { r.SuggestText = v @@ -704,7 +659,6 @@ func (f Search) WithSuggestText(v string) func(*SearchRequest) { } // WithTerminateAfter - the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.. -// func (f Search) WithTerminateAfter(v int) func(*SearchRequest) { return func(r *SearchRequest) { r.TerminateAfter = &v @@ -712,7 +666,6 @@ func (f Search) WithTerminateAfter(v int) func(*SearchRequest) { } // WithTimeout - explicit operation timeout. -// func (f Search) WithTimeout(v time.Duration) func(*SearchRequest) { return func(r *SearchRequest) { r.Timeout = v @@ -720,7 +673,6 @@ func (f Search) WithTimeout(v time.Duration) func(*SearchRequest) { } // WithTrackScores - whether to calculate and return scores even if they are not used for sorting. -// func (f Search) WithTrackScores(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.TrackScores = &v @@ -728,7 +680,6 @@ func (f Search) WithTrackScores(v bool) func(*SearchRequest) { } // WithTrackTotalHits - indicate if the number of documents that match the query should be tracked. -// func (f Search) WithTrackTotalHits(v interface{}) func(*SearchRequest) { return func(r *SearchRequest) { r.TrackTotalHits = v @@ -736,7 +687,6 @@ func (f Search) WithTrackTotalHits(v interface{}) func(*SearchRequest) { } // WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response. -// func (f Search) WithTypedKeys(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.TypedKeys = &v @@ -744,7 +694,6 @@ func (f Search) WithTypedKeys(v bool) func(*SearchRequest) { } // WithVersion - specify whether to return document version as part of a hit. -// func (f Search) WithVersion(v bool) func(*SearchRequest) { return func(r *SearchRequest) { r.Version = &v @@ -752,7 +701,6 @@ func (f Search) WithVersion(v bool) func(*SearchRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Search) WithPretty() func(*SearchRequest) { return func(r *SearchRequest) { r.Pretty = true @@ -760,7 +708,6 @@ func (f Search) WithPretty() func(*SearchRequest) { } // WithHuman makes statistical values human-readable. -// func (f Search) WithHuman() func(*SearchRequest) { return func(r *SearchRequest) { r.Human = true @@ -768,7 +715,6 @@ func (f Search) WithHuman() func(*SearchRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Search) WithErrorTrace() func(*SearchRequest) { return func(r *SearchRequest) { r.ErrorTrace = true @@ -776,7 +722,6 @@ func (f Search) WithErrorTrace() func(*SearchRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Search) WithFilterPath(v ...string) func(*SearchRequest) { return func(r *SearchRequest) { r.FilterPath = v @@ -784,7 +729,6 @@ func (f Search) WithFilterPath(v ...string) func(*SearchRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Search) WithHeader(h map[string]string) func(*SearchRequest) { return func(r *SearchRequest) { if r.Header == nil { @@ -797,7 +741,6 @@ func (f Search) WithHeader(h map[string]string) func(*SearchRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Search) WithOpaqueID(s string) func(*SearchRequest) { return func(r *SearchRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search_shards.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search_shards.go index 7baefdb8989b..190977352aae 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search_shards.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search_shards.go @@ -46,12 +46,9 @@ func newSearchShardsFunc(t Transport) SearchShards { // ----- API Definition ------------------------------------------------------- // SearchShards returns information about the indices and shards that a search request would be executed against. -// -// type SearchShards func(o ...func(*SearchShardsRequest)) (*Response, error) // SearchShardsRequest configures the Search Shards API request. -// type SearchShardsRequest struct { Index []string @@ -73,7 +70,6 @@ type SearchShardsRequest struct { } // Do executes the request and returns response or error. -// func (r SearchShardsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -177,7 +173,6 @@ func (r SearchShardsRequest) Do(ctx context.Context, transport Transport) (*Resp } // WithContext sets the request context. -// func (f SearchShards) WithContext(v context.Context) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.ctx = v @@ -185,7 +180,6 @@ func (f SearchShards) WithContext(v context.Context) func(*SearchShardsRequest) } // WithIndex - a list of index names to search; use _all to perform the operation on all indices. -// func (f SearchShards) WithIndex(v ...string) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.Index = v @@ -193,7 +187,6 @@ func (f SearchShards) WithIndex(v ...string) func(*SearchShardsRequest) { } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f SearchShards) WithAllowNoIndices(v bool) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.AllowNoIndices = &v @@ -201,7 +194,6 @@ func (f SearchShards) WithAllowNoIndices(v bool) func(*SearchShardsRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f SearchShards) WithExpandWildcards(v string) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.ExpandWildcards = v @@ -209,7 +201,6 @@ func (f SearchShards) WithExpandWildcards(v string) func(*SearchShardsRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f SearchShards) WithIgnoreUnavailable(v bool) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.IgnoreUnavailable = &v @@ -217,7 +208,6 @@ func (f SearchShards) WithIgnoreUnavailable(v bool) func(*SearchShardsRequest) { } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f SearchShards) WithLocal(v bool) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.Local = &v @@ -225,7 +215,6 @@ func (f SearchShards) WithLocal(v bool) func(*SearchShardsRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f SearchShards) WithPreference(v string) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.Preference = v @@ -233,7 +222,6 @@ func (f SearchShards) WithPreference(v string) func(*SearchShardsRequest) { } // WithRouting - specific routing value. -// func (f SearchShards) WithRouting(v string) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.Routing = v @@ -241,7 +229,6 @@ func (f SearchShards) WithRouting(v string) func(*SearchShardsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f SearchShards) WithPretty() func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.Pretty = true @@ -249,7 +236,6 @@ func (f SearchShards) WithPretty() func(*SearchShardsRequest) { } // WithHuman makes statistical values human-readable. -// func (f SearchShards) WithHuman() func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.Human = true @@ -257,7 +243,6 @@ func (f SearchShards) WithHuman() func(*SearchShardsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SearchShards) WithErrorTrace() func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.ErrorTrace = true @@ -265,7 +250,6 @@ func (f SearchShards) WithErrorTrace() func(*SearchShardsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f SearchShards) WithFilterPath(v ...string) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { r.FilterPath = v @@ -273,7 +257,6 @@ func (f SearchShards) WithFilterPath(v ...string) func(*SearchShardsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f SearchShards) WithHeader(h map[string]string) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { if r.Header == nil { @@ -286,7 +269,6 @@ func (f SearchShards) WithHeader(h map[string]string) func(*SearchShardsRequest) } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SearchShards) WithOpaqueID(s string) func(*SearchShardsRequest) { return func(r *SearchShardsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search_template.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search_template.go index 4d5b79c3db4b..33f1b8bc8dc3 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search_template.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.search_template.go @@ -48,12 +48,9 @@ func newSearchTemplateFunc(t Transport) SearchTemplate { // ----- API Definition ------------------------------------------------------- // SearchTemplate allows to use the Mustache language to pre-render a search definition. -// -// type SearchTemplate func(body io.Reader, o ...func(*SearchTemplateRequest)) (*Response, error) // SearchTemplateRequest configures the Search Template API request. -// type SearchTemplateRequest struct { Index []string DocumentType []string @@ -85,7 +82,6 @@ type SearchTemplateRequest struct { } // Do executes the request and returns response or error. -// func (r SearchTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -227,7 +223,6 @@ func (r SearchTemplateRequest) Do(ctx context.Context, transport Transport) (*Re } // WithContext sets the request context. -// func (f SearchTemplate) WithContext(v context.Context) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.ctx = v @@ -235,7 +230,6 @@ func (f SearchTemplate) WithContext(v context.Context) func(*SearchTemplateReque } // WithIndex - a list of index names to search; use _all to perform the operation on all indices. -// func (f SearchTemplate) WithIndex(v ...string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.Index = v @@ -243,7 +237,6 @@ func (f SearchTemplate) WithIndex(v ...string) func(*SearchTemplateRequest) { } // WithDocumentType - a list of document types to search; leave empty to perform the operation on all types. -// func (f SearchTemplate) WithDocumentType(v ...string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.DocumentType = v @@ -251,7 +244,6 @@ func (f SearchTemplate) WithDocumentType(v ...string) func(*SearchTemplateReques } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f SearchTemplate) WithAllowNoIndices(v bool) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.AllowNoIndices = &v @@ -259,7 +251,6 @@ func (f SearchTemplate) WithAllowNoIndices(v bool) func(*SearchTemplateRequest) } // WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. -// func (f SearchTemplate) WithCcsMinimizeRoundtrips(v bool) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.CcsMinimizeRoundtrips = &v @@ -267,7 +258,6 @@ func (f SearchTemplate) WithCcsMinimizeRoundtrips(v bool) func(*SearchTemplateRe } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f SearchTemplate) WithExpandWildcards(v string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.ExpandWildcards = v @@ -275,7 +265,6 @@ func (f SearchTemplate) WithExpandWildcards(v string) func(*SearchTemplateReques } // WithExplain - specify whether to return detailed information about score computation as part of a hit. -// func (f SearchTemplate) WithExplain(v bool) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.Explain = &v @@ -283,7 +272,6 @@ func (f SearchTemplate) WithExplain(v bool) func(*SearchTemplateRequest) { } // WithIgnoreThrottled - whether specified concrete, expanded or aliased indices should be ignored when throttled. -// func (f SearchTemplate) WithIgnoreThrottled(v bool) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.IgnoreThrottled = &v @@ -291,7 +279,6 @@ func (f SearchTemplate) WithIgnoreThrottled(v bool) func(*SearchTemplateRequest) } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f SearchTemplate) WithIgnoreUnavailable(v bool) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.IgnoreUnavailable = &v @@ -299,7 +286,6 @@ func (f SearchTemplate) WithIgnoreUnavailable(v bool) func(*SearchTemplateReques } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f SearchTemplate) WithPreference(v string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.Preference = v @@ -307,7 +293,6 @@ func (f SearchTemplate) WithPreference(v string) func(*SearchTemplateRequest) { } // WithProfile - specify whether to profile the query execution. -// func (f SearchTemplate) WithProfile(v bool) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.Profile = &v @@ -315,7 +300,6 @@ func (f SearchTemplate) WithProfile(v bool) func(*SearchTemplateRequest) { } // WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response. -// func (f SearchTemplate) WithRestTotalHitsAsInt(v bool) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.RestTotalHitsAsInt = &v @@ -323,7 +307,6 @@ func (f SearchTemplate) WithRestTotalHitsAsInt(v bool) func(*SearchTemplateReque } // WithRouting - a list of specific routing values. -// func (f SearchTemplate) WithRouting(v ...string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.Routing = v @@ -331,7 +314,6 @@ func (f SearchTemplate) WithRouting(v ...string) func(*SearchTemplateRequest) { } // WithScroll - specify how long a consistent view of the index should be maintained for scrolled search. -// func (f SearchTemplate) WithScroll(v time.Duration) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.Scroll = v @@ -339,7 +321,6 @@ func (f SearchTemplate) WithScroll(v time.Duration) func(*SearchTemplateRequest) } // WithSearchType - search operation type. -// func (f SearchTemplate) WithSearchType(v string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.SearchType = v @@ -347,7 +328,6 @@ func (f SearchTemplate) WithSearchType(v string) func(*SearchTemplateRequest) { } // WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response. -// func (f SearchTemplate) WithTypedKeys(v bool) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.TypedKeys = &v @@ -355,7 +335,6 @@ func (f SearchTemplate) WithTypedKeys(v bool) func(*SearchTemplateRequest) { } // WithPretty makes the response body pretty-printed. -// func (f SearchTemplate) WithPretty() func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.Pretty = true @@ -363,7 +342,6 @@ func (f SearchTemplate) WithPretty() func(*SearchTemplateRequest) { } // WithHuman makes statistical values human-readable. -// func (f SearchTemplate) WithHuman() func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.Human = true @@ -371,7 +349,6 @@ func (f SearchTemplate) WithHuman() func(*SearchTemplateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SearchTemplate) WithErrorTrace() func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.ErrorTrace = true @@ -379,7 +356,6 @@ func (f SearchTemplate) WithErrorTrace() func(*SearchTemplateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f SearchTemplate) WithFilterPath(v ...string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { r.FilterPath = v @@ -387,7 +363,6 @@ func (f SearchTemplate) WithFilterPath(v ...string) func(*SearchTemplateRequest) } // WithHeader adds the headers to the HTTP request. -// func (f SearchTemplate) WithHeader(h map[string]string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { if r.Header == nil { @@ -400,7 +375,6 @@ func (f SearchTemplate) WithHeader(h map[string]string) func(*SearchTemplateRequ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SearchTemplate) WithOpaqueID(s string) func(*SearchTemplateRequest) { return func(r *SearchTemplateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.cleanup_repository.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.cleanup_repository.go index 8d734ce943ea..fd89bbec1b86 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.cleanup_repository.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.cleanup_repository.go @@ -46,12 +46,9 @@ func newSnapshotCleanupRepositoryFunc(t Transport) SnapshotCleanupRepository { // ----- API Definition ------------------------------------------------------- // SnapshotCleanupRepository removes stale data from repository. -// -// type SnapshotCleanupRepository func(repository string, o ...func(*SnapshotCleanupRepositoryRequest)) (*Response, error) // SnapshotCleanupRepositoryRequest configures the Snapshot Cleanup Repository API request. -// type SnapshotCleanupRepositoryRequest struct { Repository string @@ -69,7 +66,6 @@ type SnapshotCleanupRepositoryRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotCleanupRepositoryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -157,7 +153,6 @@ func (r SnapshotCleanupRepositoryRequest) Do(ctx context.Context, transport Tran } // WithContext sets the request context. -// func (f SnapshotCleanupRepository) WithContext(v context.Context) func(*SnapshotCleanupRepositoryRequest) { return func(r *SnapshotCleanupRepositoryRequest) { r.ctx = v @@ -165,7 +160,6 @@ func (f SnapshotCleanupRepository) WithContext(v context.Context) func(*Snapshot } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotCleanupRepository) WithMasterTimeout(v time.Duration) func(*SnapshotCleanupRepositoryRequest) { return func(r *SnapshotCleanupRepositoryRequest) { r.MasterTimeout = v @@ -173,7 +167,6 @@ func (f SnapshotCleanupRepository) WithMasterTimeout(v time.Duration) func(*Snap } // WithTimeout - explicit operation timeout. -// func (f SnapshotCleanupRepository) WithTimeout(v time.Duration) func(*SnapshotCleanupRepositoryRequest) { return func(r *SnapshotCleanupRepositoryRequest) { r.Timeout = v @@ -181,7 +174,6 @@ func (f SnapshotCleanupRepository) WithTimeout(v time.Duration) func(*SnapshotCl } // WithPretty makes the response body pretty-printed. -// func (f SnapshotCleanupRepository) WithPretty() func(*SnapshotCleanupRepositoryRequest) { return func(r *SnapshotCleanupRepositoryRequest) { r.Pretty = true @@ -189,7 +181,6 @@ func (f SnapshotCleanupRepository) WithPretty() func(*SnapshotCleanupRepositoryR } // WithHuman makes statistical values human-readable. -// func (f SnapshotCleanupRepository) WithHuman() func(*SnapshotCleanupRepositoryRequest) { return func(r *SnapshotCleanupRepositoryRequest) { r.Human = true @@ -197,7 +188,6 @@ func (f SnapshotCleanupRepository) WithHuman() func(*SnapshotCleanupRepositoryRe } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotCleanupRepository) WithErrorTrace() func(*SnapshotCleanupRepositoryRequest) { return func(r *SnapshotCleanupRepositoryRequest) { r.ErrorTrace = true @@ -205,7 +195,6 @@ func (f SnapshotCleanupRepository) WithErrorTrace() func(*SnapshotCleanupReposit } // WithFilterPath filters the properties of the response body. -// func (f SnapshotCleanupRepository) WithFilterPath(v ...string) func(*SnapshotCleanupRepositoryRequest) { return func(r *SnapshotCleanupRepositoryRequest) { r.FilterPath = v @@ -213,7 +202,6 @@ func (f SnapshotCleanupRepository) WithFilterPath(v ...string) func(*SnapshotCle } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotCleanupRepository) WithHeader(h map[string]string) func(*SnapshotCleanupRepositoryRequest) { return func(r *SnapshotCleanupRepositoryRequest) { if r.Header == nil { @@ -226,7 +214,6 @@ func (f SnapshotCleanupRepository) WithHeader(h map[string]string) func(*Snapsho } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotCleanupRepository) WithOpaqueID(s string) func(*SnapshotCleanupRepositoryRequest) { return func(r *SnapshotCleanupRepositoryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.clone.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.clone.go index 10ab03a4461f..3df4947cba45 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.clone.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.clone.go @@ -47,12 +47,9 @@ func newSnapshotCloneFunc(t Transport) SnapshotClone { // ----- API Definition ------------------------------------------------------- // SnapshotClone clones indices from one snapshot into another snapshot in the same repository. -// -// type SnapshotClone func(repository string, snapshot string, body io.Reader, target_snapshot string, o ...func(*SnapshotCloneRequest)) (*Response, error) // SnapshotCloneRequest configures the Snapshot Clone API request. -// type SnapshotCloneRequest struct { Body io.Reader @@ -73,7 +70,6 @@ type SnapshotCloneRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotCloneRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -165,7 +161,6 @@ func (r SnapshotCloneRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f SnapshotClone) WithContext(v context.Context) func(*SnapshotCloneRequest) { return func(r *SnapshotCloneRequest) { r.ctx = v @@ -173,7 +168,6 @@ func (f SnapshotClone) WithContext(v context.Context) func(*SnapshotCloneRequest } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotClone) WithMasterTimeout(v time.Duration) func(*SnapshotCloneRequest) { return func(r *SnapshotCloneRequest) { r.MasterTimeout = v @@ -181,7 +175,6 @@ func (f SnapshotClone) WithMasterTimeout(v time.Duration) func(*SnapshotCloneReq } // WithPretty makes the response body pretty-printed. -// func (f SnapshotClone) WithPretty() func(*SnapshotCloneRequest) { return func(r *SnapshotCloneRequest) { r.Pretty = true @@ -189,7 +182,6 @@ func (f SnapshotClone) WithPretty() func(*SnapshotCloneRequest) { } // WithHuman makes statistical values human-readable. -// func (f SnapshotClone) WithHuman() func(*SnapshotCloneRequest) { return func(r *SnapshotCloneRequest) { r.Human = true @@ -197,7 +189,6 @@ func (f SnapshotClone) WithHuman() func(*SnapshotCloneRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotClone) WithErrorTrace() func(*SnapshotCloneRequest) { return func(r *SnapshotCloneRequest) { r.ErrorTrace = true @@ -205,7 +196,6 @@ func (f SnapshotClone) WithErrorTrace() func(*SnapshotCloneRequest) { } // WithFilterPath filters the properties of the response body. -// func (f SnapshotClone) WithFilterPath(v ...string) func(*SnapshotCloneRequest) { return func(r *SnapshotCloneRequest) { r.FilterPath = v @@ -213,7 +203,6 @@ func (f SnapshotClone) WithFilterPath(v ...string) func(*SnapshotCloneRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotClone) WithHeader(h map[string]string) func(*SnapshotCloneRequest) { return func(r *SnapshotCloneRequest) { if r.Header == nil { @@ -226,7 +215,6 @@ func (f SnapshotClone) WithHeader(h map[string]string) func(*SnapshotCloneReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotClone) WithOpaqueID(s string) func(*SnapshotCloneRequest) { return func(r *SnapshotCloneRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.create.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.create.go index 7dc6223e9126..78f494593430 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.create.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.create.go @@ -48,12 +48,9 @@ func newSnapshotCreateFunc(t Transport) SnapshotCreate { // ----- API Definition ------------------------------------------------------- // SnapshotCreate creates a snapshot in a repository. -// -// type SnapshotCreate func(repository string, snapshot string, o ...func(*SnapshotCreateRequest)) (*Response, error) // SnapshotCreateRequest configures the Snapshot Create API request. -// type SnapshotCreateRequest struct { Body io.Reader @@ -74,7 +71,6 @@ type SnapshotCreateRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotCreateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -166,7 +162,6 @@ func (r SnapshotCreateRequest) Do(ctx context.Context, transport Transport) (*Re } // WithContext sets the request context. -// func (f SnapshotCreate) WithContext(v context.Context) func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { r.ctx = v @@ -174,7 +169,6 @@ func (f SnapshotCreate) WithContext(v context.Context) func(*SnapshotCreateReque } // WithBody - The snapshot definition. -// func (f SnapshotCreate) WithBody(v io.Reader) func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { r.Body = v @@ -182,7 +176,6 @@ func (f SnapshotCreate) WithBody(v io.Reader) func(*SnapshotCreateRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotCreate) WithMasterTimeout(v time.Duration) func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { r.MasterTimeout = v @@ -190,7 +183,6 @@ func (f SnapshotCreate) WithMasterTimeout(v time.Duration) func(*SnapshotCreateR } // WithWaitForCompletion - should this request wait until the operation has completed before returning. -// func (f SnapshotCreate) WithWaitForCompletion(v bool) func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { r.WaitForCompletion = &v @@ -198,7 +190,6 @@ func (f SnapshotCreate) WithWaitForCompletion(v bool) func(*SnapshotCreateReques } // WithPretty makes the response body pretty-printed. -// func (f SnapshotCreate) WithPretty() func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { r.Pretty = true @@ -206,7 +197,6 @@ func (f SnapshotCreate) WithPretty() func(*SnapshotCreateRequest) { } // WithHuman makes statistical values human-readable. -// func (f SnapshotCreate) WithHuman() func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { r.Human = true @@ -214,7 +204,6 @@ func (f SnapshotCreate) WithHuman() func(*SnapshotCreateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotCreate) WithErrorTrace() func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { r.ErrorTrace = true @@ -222,7 +211,6 @@ func (f SnapshotCreate) WithErrorTrace() func(*SnapshotCreateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f SnapshotCreate) WithFilterPath(v ...string) func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { r.FilterPath = v @@ -230,7 +218,6 @@ func (f SnapshotCreate) WithFilterPath(v ...string) func(*SnapshotCreateRequest) } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotCreate) WithHeader(h map[string]string) func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { if r.Header == nil { @@ -243,7 +230,6 @@ func (f SnapshotCreate) WithHeader(h map[string]string) func(*SnapshotCreateRequ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotCreate) WithOpaqueID(s string) func(*SnapshotCreateRequest) { return func(r *SnapshotCreateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.create_repository.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.create_repository.go index 615ce23eb2f5..d4d39c99cbe6 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.create_repository.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.create_repository.go @@ -48,12 +48,9 @@ func newSnapshotCreateRepositoryFunc(t Transport) SnapshotCreateRepository { // ----- API Definition ------------------------------------------------------- // SnapshotCreateRepository creates a repository. -// -// type SnapshotCreateRepository func(repository string, body io.Reader, o ...func(*SnapshotCreateRepositoryRequest)) (*Response, error) // SnapshotCreateRepositoryRequest configures the Snapshot Create Repository API request. -// type SnapshotCreateRepositoryRequest struct { Body io.Reader @@ -74,7 +71,6 @@ type SnapshotCreateRepositoryRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotCreateRepositoryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -168,7 +164,6 @@ func (r SnapshotCreateRepositoryRequest) Do(ctx context.Context, transport Trans } // WithContext sets the request context. -// func (f SnapshotCreateRepository) WithContext(v context.Context) func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { r.ctx = v @@ -176,7 +171,6 @@ func (f SnapshotCreateRepository) WithContext(v context.Context) func(*SnapshotC } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotCreateRepository) WithMasterTimeout(v time.Duration) func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { r.MasterTimeout = v @@ -184,7 +178,6 @@ func (f SnapshotCreateRepository) WithMasterTimeout(v time.Duration) func(*Snaps } // WithTimeout - explicit operation timeout. -// func (f SnapshotCreateRepository) WithTimeout(v time.Duration) func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { r.Timeout = v @@ -192,7 +185,6 @@ func (f SnapshotCreateRepository) WithTimeout(v time.Duration) func(*SnapshotCre } // WithVerify - whether to verify the repository after creation. -// func (f SnapshotCreateRepository) WithVerify(v bool) func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { r.Verify = &v @@ -200,7 +192,6 @@ func (f SnapshotCreateRepository) WithVerify(v bool) func(*SnapshotCreateReposit } // WithPretty makes the response body pretty-printed. -// func (f SnapshotCreateRepository) WithPretty() func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { r.Pretty = true @@ -208,7 +199,6 @@ func (f SnapshotCreateRepository) WithPretty() func(*SnapshotCreateRepositoryReq } // WithHuman makes statistical values human-readable. -// func (f SnapshotCreateRepository) WithHuman() func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { r.Human = true @@ -216,7 +206,6 @@ func (f SnapshotCreateRepository) WithHuman() func(*SnapshotCreateRepositoryRequ } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotCreateRepository) WithErrorTrace() func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { r.ErrorTrace = true @@ -224,7 +213,6 @@ func (f SnapshotCreateRepository) WithErrorTrace() func(*SnapshotCreateRepositor } // WithFilterPath filters the properties of the response body. -// func (f SnapshotCreateRepository) WithFilterPath(v ...string) func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { r.FilterPath = v @@ -232,7 +220,6 @@ func (f SnapshotCreateRepository) WithFilterPath(v ...string) func(*SnapshotCrea } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotCreateRepository) WithHeader(h map[string]string) func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { if r.Header == nil { @@ -245,7 +232,6 @@ func (f SnapshotCreateRepository) WithHeader(h map[string]string) func(*Snapshot } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotCreateRepository) WithOpaqueID(s string) func(*SnapshotCreateRepositoryRequest) { return func(r *SnapshotCreateRepositoryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.delete.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.delete.go index 6de65646b372..0c47ff8ccba0 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.delete.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.delete.go @@ -46,12 +46,9 @@ func newSnapshotDeleteFunc(t Transport) SnapshotDelete { // ----- API Definition ------------------------------------------------------- // SnapshotDelete deletes a snapshot. -// -// type SnapshotDelete func(repository string, snapshot string, o ...func(*SnapshotDeleteRequest)) (*Response, error) // SnapshotDeleteRequest configures the Snapshot Delete API request. -// type SnapshotDeleteRequest struct { Repository string Snapshot string @@ -69,7 +66,6 @@ type SnapshotDeleteRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotDeleteRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -153,7 +149,6 @@ func (r SnapshotDeleteRequest) Do(ctx context.Context, transport Transport) (*Re } // WithContext sets the request context. -// func (f SnapshotDelete) WithContext(v context.Context) func(*SnapshotDeleteRequest) { return func(r *SnapshotDeleteRequest) { r.ctx = v @@ -161,7 +156,6 @@ func (f SnapshotDelete) WithContext(v context.Context) func(*SnapshotDeleteReque } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotDelete) WithMasterTimeout(v time.Duration) func(*SnapshotDeleteRequest) { return func(r *SnapshotDeleteRequest) { r.MasterTimeout = v @@ -169,7 +163,6 @@ func (f SnapshotDelete) WithMasterTimeout(v time.Duration) func(*SnapshotDeleteR } // WithPretty makes the response body pretty-printed. -// func (f SnapshotDelete) WithPretty() func(*SnapshotDeleteRequest) { return func(r *SnapshotDeleteRequest) { r.Pretty = true @@ -177,7 +170,6 @@ func (f SnapshotDelete) WithPretty() func(*SnapshotDeleteRequest) { } // WithHuman makes statistical values human-readable. -// func (f SnapshotDelete) WithHuman() func(*SnapshotDeleteRequest) { return func(r *SnapshotDeleteRequest) { r.Human = true @@ -185,7 +177,6 @@ func (f SnapshotDelete) WithHuman() func(*SnapshotDeleteRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotDelete) WithErrorTrace() func(*SnapshotDeleteRequest) { return func(r *SnapshotDeleteRequest) { r.ErrorTrace = true @@ -193,7 +184,6 @@ func (f SnapshotDelete) WithErrorTrace() func(*SnapshotDeleteRequest) { } // WithFilterPath filters the properties of the response body. -// func (f SnapshotDelete) WithFilterPath(v ...string) func(*SnapshotDeleteRequest) { return func(r *SnapshotDeleteRequest) { r.FilterPath = v @@ -201,7 +191,6 @@ func (f SnapshotDelete) WithFilterPath(v ...string) func(*SnapshotDeleteRequest) } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotDelete) WithHeader(h map[string]string) func(*SnapshotDeleteRequest) { return func(r *SnapshotDeleteRequest) { if r.Header == nil { @@ -214,7 +203,6 @@ func (f SnapshotDelete) WithHeader(h map[string]string) func(*SnapshotDeleteRequ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotDelete) WithOpaqueID(s string) func(*SnapshotDeleteRequest) { return func(r *SnapshotDeleteRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.delete_repository.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.delete_repository.go index 261e14cb10e8..f749c5b10197 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.delete_repository.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.delete_repository.go @@ -46,12 +46,9 @@ func newSnapshotDeleteRepositoryFunc(t Transport) SnapshotDeleteRepository { // ----- API Definition ------------------------------------------------------- // SnapshotDeleteRepository deletes a repository. -// -// type SnapshotDeleteRepository func(repository []string, o ...func(*SnapshotDeleteRepositoryRequest)) (*Response, error) // SnapshotDeleteRepositoryRequest configures the Snapshot Delete Repository API request. -// type SnapshotDeleteRepositoryRequest struct { Repository []string @@ -69,7 +66,6 @@ type SnapshotDeleteRepositoryRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotDeleteRepositoryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -155,7 +151,6 @@ func (r SnapshotDeleteRepositoryRequest) Do(ctx context.Context, transport Trans } // WithContext sets the request context. -// func (f SnapshotDeleteRepository) WithContext(v context.Context) func(*SnapshotDeleteRepositoryRequest) { return func(r *SnapshotDeleteRepositoryRequest) { r.ctx = v @@ -163,7 +158,6 @@ func (f SnapshotDeleteRepository) WithContext(v context.Context) func(*SnapshotD } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotDeleteRepository) WithMasterTimeout(v time.Duration) func(*SnapshotDeleteRepositoryRequest) { return func(r *SnapshotDeleteRepositoryRequest) { r.MasterTimeout = v @@ -171,7 +165,6 @@ func (f SnapshotDeleteRepository) WithMasterTimeout(v time.Duration) func(*Snaps } // WithTimeout - explicit operation timeout. -// func (f SnapshotDeleteRepository) WithTimeout(v time.Duration) func(*SnapshotDeleteRepositoryRequest) { return func(r *SnapshotDeleteRepositoryRequest) { r.Timeout = v @@ -179,7 +172,6 @@ func (f SnapshotDeleteRepository) WithTimeout(v time.Duration) func(*SnapshotDel } // WithPretty makes the response body pretty-printed. -// func (f SnapshotDeleteRepository) WithPretty() func(*SnapshotDeleteRepositoryRequest) { return func(r *SnapshotDeleteRepositoryRequest) { r.Pretty = true @@ -187,7 +179,6 @@ func (f SnapshotDeleteRepository) WithPretty() func(*SnapshotDeleteRepositoryReq } // WithHuman makes statistical values human-readable. -// func (f SnapshotDeleteRepository) WithHuman() func(*SnapshotDeleteRepositoryRequest) { return func(r *SnapshotDeleteRepositoryRequest) { r.Human = true @@ -195,7 +186,6 @@ func (f SnapshotDeleteRepository) WithHuman() func(*SnapshotDeleteRepositoryRequ } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotDeleteRepository) WithErrorTrace() func(*SnapshotDeleteRepositoryRequest) { return func(r *SnapshotDeleteRepositoryRequest) { r.ErrorTrace = true @@ -203,7 +193,6 @@ func (f SnapshotDeleteRepository) WithErrorTrace() func(*SnapshotDeleteRepositor } // WithFilterPath filters the properties of the response body. -// func (f SnapshotDeleteRepository) WithFilterPath(v ...string) func(*SnapshotDeleteRepositoryRequest) { return func(r *SnapshotDeleteRepositoryRequest) { r.FilterPath = v @@ -211,7 +200,6 @@ func (f SnapshotDeleteRepository) WithFilterPath(v ...string) func(*SnapshotDele } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotDeleteRepository) WithHeader(h map[string]string) func(*SnapshotDeleteRepositoryRequest) { return func(r *SnapshotDeleteRepositoryRequest) { if r.Header == nil { @@ -224,7 +212,6 @@ func (f SnapshotDeleteRepository) WithHeader(h map[string]string) func(*Snapshot } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotDeleteRepository) WithOpaqueID(s string) func(*SnapshotDeleteRepositoryRequest) { return func(r *SnapshotDeleteRepositoryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.get.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.get.go index c6e3317a5bee..c7b9fe48e7cc 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.get.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.get.go @@ -47,12 +47,9 @@ func newSnapshotGetFunc(t Transport) SnapshotGet { // ----- API Definition ------------------------------------------------------- // SnapshotGet returns information about a snapshot. -// -// type SnapshotGet func(repository string, snapshot []string, o ...func(*SnapshotGetRequest)) (*Response, error) // SnapshotGetRequest configures the Snapshot Get API request. -// type SnapshotGetRequest struct { Repository string Snapshot []string @@ -74,7 +71,6 @@ type SnapshotGetRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotGetRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -174,7 +170,6 @@ func (r SnapshotGetRequest) Do(ctx context.Context, transport Transport) (*Respo } // WithContext sets the request context. -// func (f SnapshotGet) WithContext(v context.Context) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.ctx = v @@ -182,7 +177,6 @@ func (f SnapshotGet) WithContext(v context.Context) func(*SnapshotGetRequest) { } // WithIgnoreUnavailable - whether to ignore unavailable snapshots, defaults to false which means a snapshotmissingexception is thrown. -// func (f SnapshotGet) WithIgnoreUnavailable(v bool) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.IgnoreUnavailable = &v @@ -190,7 +184,6 @@ func (f SnapshotGet) WithIgnoreUnavailable(v bool) func(*SnapshotGetRequest) { } // WithIncludeRepository - whether to include the repository name in the snapshot info. defaults to true.. -// func (f SnapshotGet) WithIncludeRepository(v bool) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.IncludeRepository = &v @@ -198,7 +191,6 @@ func (f SnapshotGet) WithIncludeRepository(v bool) func(*SnapshotGetRequest) { } // WithIndexDetails - whether to include details of each index in the snapshot, if those details are available. defaults to false.. -// func (f SnapshotGet) WithIndexDetails(v bool) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.IndexDetails = &v @@ -206,7 +198,6 @@ func (f SnapshotGet) WithIndexDetails(v bool) func(*SnapshotGetRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotGet) WithMasterTimeout(v time.Duration) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.MasterTimeout = v @@ -214,7 +205,6 @@ func (f SnapshotGet) WithMasterTimeout(v time.Duration) func(*SnapshotGetRequest } // WithVerbose - whether to show verbose snapshot info or only show the basic info found in the repository index blob. -// func (f SnapshotGet) WithVerbose(v bool) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.Verbose = &v @@ -222,7 +212,6 @@ func (f SnapshotGet) WithVerbose(v bool) func(*SnapshotGetRequest) { } // WithPretty makes the response body pretty-printed. -// func (f SnapshotGet) WithPretty() func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.Pretty = true @@ -230,7 +219,6 @@ func (f SnapshotGet) WithPretty() func(*SnapshotGetRequest) { } // WithHuman makes statistical values human-readable. -// func (f SnapshotGet) WithHuman() func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.Human = true @@ -238,7 +226,6 @@ func (f SnapshotGet) WithHuman() func(*SnapshotGetRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotGet) WithErrorTrace() func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.ErrorTrace = true @@ -246,7 +233,6 @@ func (f SnapshotGet) WithErrorTrace() func(*SnapshotGetRequest) { } // WithFilterPath filters the properties of the response body. -// func (f SnapshotGet) WithFilterPath(v ...string) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { r.FilterPath = v @@ -254,7 +240,6 @@ func (f SnapshotGet) WithFilterPath(v ...string) func(*SnapshotGetRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotGet) WithHeader(h map[string]string) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { if r.Header == nil { @@ -267,7 +252,6 @@ func (f SnapshotGet) WithHeader(h map[string]string) func(*SnapshotGetRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotGet) WithOpaqueID(s string) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.get_repository.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.get_repository.go index d034286484bd..b5f58f64545c 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.get_repository.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.get_repository.go @@ -47,12 +47,9 @@ func newSnapshotGetRepositoryFunc(t Transport) SnapshotGetRepository { // ----- API Definition ------------------------------------------------------- // SnapshotGetRepository returns information about a repository. -// -// type SnapshotGetRepository func(o ...func(*SnapshotGetRepositoryRequest)) (*Response, error) // SnapshotGetRepositoryRequest configures the Snapshot Get Repository API request. -// type SnapshotGetRepositoryRequest struct { Repository []string @@ -70,7 +67,6 @@ type SnapshotGetRepositoryRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotGetRepositoryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -158,7 +154,6 @@ func (r SnapshotGetRepositoryRequest) Do(ctx context.Context, transport Transpor } // WithContext sets the request context. -// func (f SnapshotGetRepository) WithContext(v context.Context) func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { r.ctx = v @@ -166,7 +161,6 @@ func (f SnapshotGetRepository) WithContext(v context.Context) func(*SnapshotGetR } // WithRepository - a list of repository names. -// func (f SnapshotGetRepository) WithRepository(v ...string) func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { r.Repository = v @@ -174,7 +168,6 @@ func (f SnapshotGetRepository) WithRepository(v ...string) func(*SnapshotGetRepo } // WithLocal - return local information, do not retrieve the state from master node (default: false). -// func (f SnapshotGetRepository) WithLocal(v bool) func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { r.Local = &v @@ -182,7 +175,6 @@ func (f SnapshotGetRepository) WithLocal(v bool) func(*SnapshotGetRepositoryRequ } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotGetRepository) WithMasterTimeout(v time.Duration) func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { r.MasterTimeout = v @@ -190,7 +182,6 @@ func (f SnapshotGetRepository) WithMasterTimeout(v time.Duration) func(*Snapshot } // WithPretty makes the response body pretty-printed. -// func (f SnapshotGetRepository) WithPretty() func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { r.Pretty = true @@ -198,7 +189,6 @@ func (f SnapshotGetRepository) WithPretty() func(*SnapshotGetRepositoryRequest) } // WithHuman makes statistical values human-readable. -// func (f SnapshotGetRepository) WithHuman() func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { r.Human = true @@ -206,7 +196,6 @@ func (f SnapshotGetRepository) WithHuman() func(*SnapshotGetRepositoryRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotGetRepository) WithErrorTrace() func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { r.ErrorTrace = true @@ -214,7 +203,6 @@ func (f SnapshotGetRepository) WithErrorTrace() func(*SnapshotGetRepositoryReque } // WithFilterPath filters the properties of the response body. -// func (f SnapshotGetRepository) WithFilterPath(v ...string) func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { r.FilterPath = v @@ -222,7 +210,6 @@ func (f SnapshotGetRepository) WithFilterPath(v ...string) func(*SnapshotGetRepo } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotGetRepository) WithHeader(h map[string]string) func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { if r.Header == nil { @@ -235,7 +222,6 @@ func (f SnapshotGetRepository) WithHeader(h map[string]string) func(*SnapshotGet } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotGetRepository) WithOpaqueID(s string) func(*SnapshotGetRepositoryRequest) { return func(r *SnapshotGetRepositoryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.restore.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.restore.go index d6e9fe5b3abe..39cdddf09377 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.restore.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.restore.go @@ -48,12 +48,9 @@ func newSnapshotRestoreFunc(t Transport) SnapshotRestore { // ----- API Definition ------------------------------------------------------- // SnapshotRestore restores a snapshot. -// -// type SnapshotRestore func(repository string, snapshot string, o ...func(*SnapshotRestoreRequest)) (*Response, error) // SnapshotRestoreRequest configures the Snapshot Restore API request. -// type SnapshotRestoreRequest struct { Body io.Reader @@ -74,7 +71,6 @@ type SnapshotRestoreRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotRestoreRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -168,7 +164,6 @@ func (r SnapshotRestoreRequest) Do(ctx context.Context, transport Transport) (*R } // WithContext sets the request context. -// func (f SnapshotRestore) WithContext(v context.Context) func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { r.ctx = v @@ -176,7 +171,6 @@ func (f SnapshotRestore) WithContext(v context.Context) func(*SnapshotRestoreReq } // WithBody - Details of what to restore. -// func (f SnapshotRestore) WithBody(v io.Reader) func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { r.Body = v @@ -184,7 +178,6 @@ func (f SnapshotRestore) WithBody(v io.Reader) func(*SnapshotRestoreRequest) { } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotRestore) WithMasterTimeout(v time.Duration) func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { r.MasterTimeout = v @@ -192,7 +185,6 @@ func (f SnapshotRestore) WithMasterTimeout(v time.Duration) func(*SnapshotRestor } // WithWaitForCompletion - should this request wait until the operation has completed before returning. -// func (f SnapshotRestore) WithWaitForCompletion(v bool) func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { r.WaitForCompletion = &v @@ -200,7 +192,6 @@ func (f SnapshotRestore) WithWaitForCompletion(v bool) func(*SnapshotRestoreRequ } // WithPretty makes the response body pretty-printed. -// func (f SnapshotRestore) WithPretty() func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { r.Pretty = true @@ -208,7 +199,6 @@ func (f SnapshotRestore) WithPretty() func(*SnapshotRestoreRequest) { } // WithHuman makes statistical values human-readable. -// func (f SnapshotRestore) WithHuman() func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { r.Human = true @@ -216,7 +206,6 @@ func (f SnapshotRestore) WithHuman() func(*SnapshotRestoreRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotRestore) WithErrorTrace() func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { r.ErrorTrace = true @@ -224,7 +213,6 @@ func (f SnapshotRestore) WithErrorTrace() func(*SnapshotRestoreRequest) { } // WithFilterPath filters the properties of the response body. -// func (f SnapshotRestore) WithFilterPath(v ...string) func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { r.FilterPath = v @@ -232,7 +220,6 @@ func (f SnapshotRestore) WithFilterPath(v ...string) func(*SnapshotRestoreReques } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotRestore) WithHeader(h map[string]string) func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { if r.Header == nil { @@ -245,7 +232,6 @@ func (f SnapshotRestore) WithHeader(h map[string]string) func(*SnapshotRestoreRe } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotRestore) WithOpaqueID(s string) func(*SnapshotRestoreRequest) { return func(r *SnapshotRestoreRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.status.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.status.go index d642c3c1a139..c00f3a75f966 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.status.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.status.go @@ -47,12 +47,9 @@ func newSnapshotStatusFunc(t Transport) SnapshotStatus { // ----- API Definition ------------------------------------------------------- // SnapshotStatus returns information about the status of a snapshot. -// -// type SnapshotStatus func(o ...func(*SnapshotStatusRequest)) (*Response, error) // SnapshotStatusRequest configures the Snapshot Status API request. -// type SnapshotStatusRequest struct { Repository string Snapshot []string @@ -71,7 +68,6 @@ type SnapshotStatusRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotStatusRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -165,7 +161,6 @@ func (r SnapshotStatusRequest) Do(ctx context.Context, transport Transport) (*Re } // WithContext sets the request context. -// func (f SnapshotStatus) WithContext(v context.Context) func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { r.ctx = v @@ -173,7 +168,6 @@ func (f SnapshotStatus) WithContext(v context.Context) func(*SnapshotStatusReque } // WithRepository - a repository name. -// func (f SnapshotStatus) WithRepository(v string) func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { r.Repository = v @@ -181,7 +175,6 @@ func (f SnapshotStatus) WithRepository(v string) func(*SnapshotStatusRequest) { } // WithSnapshot - a list of snapshot names. -// func (f SnapshotStatus) WithSnapshot(v ...string) func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { r.Snapshot = v @@ -189,7 +182,6 @@ func (f SnapshotStatus) WithSnapshot(v ...string) func(*SnapshotStatusRequest) { } // WithIgnoreUnavailable - whether to ignore unavailable snapshots, defaults to false which means a snapshotmissingexception is thrown. -// func (f SnapshotStatus) WithIgnoreUnavailable(v bool) func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { r.IgnoreUnavailable = &v @@ -197,7 +189,6 @@ func (f SnapshotStatus) WithIgnoreUnavailable(v bool) func(*SnapshotStatusReques } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotStatus) WithMasterTimeout(v time.Duration) func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { r.MasterTimeout = v @@ -205,7 +196,6 @@ func (f SnapshotStatus) WithMasterTimeout(v time.Duration) func(*SnapshotStatusR } // WithPretty makes the response body pretty-printed. -// func (f SnapshotStatus) WithPretty() func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { r.Pretty = true @@ -213,7 +203,6 @@ func (f SnapshotStatus) WithPretty() func(*SnapshotStatusRequest) { } // WithHuman makes statistical values human-readable. -// func (f SnapshotStatus) WithHuman() func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { r.Human = true @@ -221,7 +210,6 @@ func (f SnapshotStatus) WithHuman() func(*SnapshotStatusRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotStatus) WithErrorTrace() func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { r.ErrorTrace = true @@ -229,7 +217,6 @@ func (f SnapshotStatus) WithErrorTrace() func(*SnapshotStatusRequest) { } // WithFilterPath filters the properties of the response body. -// func (f SnapshotStatus) WithFilterPath(v ...string) func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { r.FilterPath = v @@ -237,7 +224,6 @@ func (f SnapshotStatus) WithFilterPath(v ...string) func(*SnapshotStatusRequest) } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotStatus) WithHeader(h map[string]string) func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { if r.Header == nil { @@ -250,7 +236,6 @@ func (f SnapshotStatus) WithHeader(h map[string]string) func(*SnapshotStatusRequ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotStatus) WithOpaqueID(s string) func(*SnapshotStatusRequest) { return func(r *SnapshotStatusRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.verify_repository.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.verify_repository.go index bd71f3f094b9..1f605f1a60c1 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.verify_repository.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.snapshot.verify_repository.go @@ -46,12 +46,9 @@ func newSnapshotVerifyRepositoryFunc(t Transport) SnapshotVerifyRepository { // ----- API Definition ------------------------------------------------------- // SnapshotVerifyRepository verifies a repository. -// -// type SnapshotVerifyRepository func(repository string, o ...func(*SnapshotVerifyRepositoryRequest)) (*Response, error) // SnapshotVerifyRepositoryRequest configures the Snapshot Verify Repository API request. -// type SnapshotVerifyRepositoryRequest struct { Repository string @@ -69,7 +66,6 @@ type SnapshotVerifyRepositoryRequest struct { } // Do executes the request and returns response or error. -// func (r SnapshotVerifyRepositoryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -157,7 +153,6 @@ func (r SnapshotVerifyRepositoryRequest) Do(ctx context.Context, transport Trans } // WithContext sets the request context. -// func (f SnapshotVerifyRepository) WithContext(v context.Context) func(*SnapshotVerifyRepositoryRequest) { return func(r *SnapshotVerifyRepositoryRequest) { r.ctx = v @@ -165,7 +160,6 @@ func (f SnapshotVerifyRepository) WithContext(v context.Context) func(*SnapshotV } // WithMasterTimeout - explicit operation timeout for connection to master node. -// func (f SnapshotVerifyRepository) WithMasterTimeout(v time.Duration) func(*SnapshotVerifyRepositoryRequest) { return func(r *SnapshotVerifyRepositoryRequest) { r.MasterTimeout = v @@ -173,7 +167,6 @@ func (f SnapshotVerifyRepository) WithMasterTimeout(v time.Duration) func(*Snaps } // WithTimeout - explicit operation timeout. -// func (f SnapshotVerifyRepository) WithTimeout(v time.Duration) func(*SnapshotVerifyRepositoryRequest) { return func(r *SnapshotVerifyRepositoryRequest) { r.Timeout = v @@ -181,7 +174,6 @@ func (f SnapshotVerifyRepository) WithTimeout(v time.Duration) func(*SnapshotVer } // WithPretty makes the response body pretty-printed. -// func (f SnapshotVerifyRepository) WithPretty() func(*SnapshotVerifyRepositoryRequest) { return func(r *SnapshotVerifyRepositoryRequest) { r.Pretty = true @@ -189,7 +181,6 @@ func (f SnapshotVerifyRepository) WithPretty() func(*SnapshotVerifyRepositoryReq } // WithHuman makes statistical values human-readable. -// func (f SnapshotVerifyRepository) WithHuman() func(*SnapshotVerifyRepositoryRequest) { return func(r *SnapshotVerifyRepositoryRequest) { r.Human = true @@ -197,7 +188,6 @@ func (f SnapshotVerifyRepository) WithHuman() func(*SnapshotVerifyRepositoryRequ } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f SnapshotVerifyRepository) WithErrorTrace() func(*SnapshotVerifyRepositoryRequest) { return func(r *SnapshotVerifyRepositoryRequest) { r.ErrorTrace = true @@ -205,7 +195,6 @@ func (f SnapshotVerifyRepository) WithErrorTrace() func(*SnapshotVerifyRepositor } // WithFilterPath filters the properties of the response body. -// func (f SnapshotVerifyRepository) WithFilterPath(v ...string) func(*SnapshotVerifyRepositoryRequest) { return func(r *SnapshotVerifyRepositoryRequest) { r.FilterPath = v @@ -213,7 +202,6 @@ func (f SnapshotVerifyRepository) WithFilterPath(v ...string) func(*SnapshotVeri } // WithHeader adds the headers to the HTTP request. -// func (f SnapshotVerifyRepository) WithHeader(h map[string]string) func(*SnapshotVerifyRepositoryRequest) { return func(r *SnapshotVerifyRepositoryRequest) { if r.Header == nil { @@ -226,7 +214,6 @@ func (f SnapshotVerifyRepository) WithHeader(h map[string]string) func(*Snapshot } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f SnapshotVerifyRepository) WithOpaqueID(s string) func(*SnapshotVerifyRepositoryRequest) { return func(r *SnapshotVerifyRepositoryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.cancel.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.cancel.go index 5996a4b76fc8..99e98cdcc895 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.cancel.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.cancel.go @@ -48,12 +48,9 @@ func newTasksCancelFunc(t Transport) TasksCancel { // TasksCancel cancels a task, if it can be cancelled through an API. // // This API is experimental. -// -// type TasksCancel func(o ...func(*TasksCancelRequest)) (*Response, error) // TasksCancelRequest configures the Tasks Cancel API request. -// type TasksCancelRequest struct { TaskID string @@ -73,7 +70,6 @@ type TasksCancelRequest struct { } // Do executes the request and returns response or error. -// func (r TasksCancelRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -171,7 +167,6 @@ func (r TasksCancelRequest) Do(ctx context.Context, transport Transport) (*Respo } // WithContext sets the request context. -// func (f TasksCancel) WithContext(v context.Context) func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.ctx = v @@ -179,7 +174,6 @@ func (f TasksCancel) WithContext(v context.Context) func(*TasksCancelRequest) { } // WithTaskID - cancel the task with specified task ID (node_id:task_number). -// func (f TasksCancel) WithTaskID(v string) func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.TaskID = v @@ -187,7 +181,6 @@ func (f TasksCancel) WithTaskID(v string) func(*TasksCancelRequest) { } // WithActions - a list of actions that should be cancelled. leave empty to cancel all.. -// func (f TasksCancel) WithActions(v ...string) func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.Actions = v @@ -195,7 +188,6 @@ func (f TasksCancel) WithActions(v ...string) func(*TasksCancelRequest) { } // WithNodes - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. -// func (f TasksCancel) WithNodes(v ...string) func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.Nodes = v @@ -203,7 +195,6 @@ func (f TasksCancel) WithNodes(v ...string) func(*TasksCancelRequest) { } // WithParentTaskID - cancel tasks with specified parent task ID (node_id:task_number). set to -1 to cancel all.. -// func (f TasksCancel) WithParentTaskID(v string) func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.ParentTaskID = v @@ -211,7 +202,6 @@ func (f TasksCancel) WithParentTaskID(v string) func(*TasksCancelRequest) { } // WithWaitForCompletion - should the request block until the cancellation of the task and its descendant tasks is completed. defaults to false. -// func (f TasksCancel) WithWaitForCompletion(v bool) func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.WaitForCompletion = &v @@ -219,7 +209,6 @@ func (f TasksCancel) WithWaitForCompletion(v bool) func(*TasksCancelRequest) { } // WithPretty makes the response body pretty-printed. -// func (f TasksCancel) WithPretty() func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.Pretty = true @@ -227,7 +216,6 @@ func (f TasksCancel) WithPretty() func(*TasksCancelRequest) { } // WithHuman makes statistical values human-readable. -// func (f TasksCancel) WithHuman() func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.Human = true @@ -235,7 +223,6 @@ func (f TasksCancel) WithHuman() func(*TasksCancelRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f TasksCancel) WithErrorTrace() func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.ErrorTrace = true @@ -243,7 +230,6 @@ func (f TasksCancel) WithErrorTrace() func(*TasksCancelRequest) { } // WithFilterPath filters the properties of the response body. -// func (f TasksCancel) WithFilterPath(v ...string) func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { r.FilterPath = v @@ -251,7 +237,6 @@ func (f TasksCancel) WithFilterPath(v ...string) func(*TasksCancelRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f TasksCancel) WithHeader(h map[string]string) func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { if r.Header == nil { @@ -264,7 +249,6 @@ func (f TasksCancel) WithHeader(h map[string]string) func(*TasksCancelRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f TasksCancel) WithOpaqueID(s string) func(*TasksCancelRequest) { return func(r *TasksCancelRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.get.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.get.go index 42d00b4b3ee9..574c66ed8a2e 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.get.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.get.go @@ -49,12 +49,9 @@ func newTasksGetFunc(t Transport) TasksGet { // TasksGet returns information about a task. // // This API is experimental. -// -// type TasksGet func(task_id string, o ...func(*TasksGetRequest)) (*Response, error) // TasksGetRequest configures the Tasks Get API request. -// type TasksGetRequest struct { TaskID string @@ -72,7 +69,6 @@ type TasksGetRequest struct { } // Do executes the request and returns response or error. -// func (r TasksGetRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -158,7 +154,6 @@ func (r TasksGetRequest) Do(ctx context.Context, transport Transport) (*Response } // WithContext sets the request context. -// func (f TasksGet) WithContext(v context.Context) func(*TasksGetRequest) { return func(r *TasksGetRequest) { r.ctx = v @@ -166,7 +161,6 @@ func (f TasksGet) WithContext(v context.Context) func(*TasksGetRequest) { } // WithTimeout - explicit operation timeout. -// func (f TasksGet) WithTimeout(v time.Duration) func(*TasksGetRequest) { return func(r *TasksGetRequest) { r.Timeout = v @@ -174,7 +168,6 @@ func (f TasksGet) WithTimeout(v time.Duration) func(*TasksGetRequest) { } // WithWaitForCompletion - wait for the matching tasks to complete (default: false). -// func (f TasksGet) WithWaitForCompletion(v bool) func(*TasksGetRequest) { return func(r *TasksGetRequest) { r.WaitForCompletion = &v @@ -182,7 +175,6 @@ func (f TasksGet) WithWaitForCompletion(v bool) func(*TasksGetRequest) { } // WithPretty makes the response body pretty-printed. -// func (f TasksGet) WithPretty() func(*TasksGetRequest) { return func(r *TasksGetRequest) { r.Pretty = true @@ -190,7 +182,6 @@ func (f TasksGet) WithPretty() func(*TasksGetRequest) { } // WithHuman makes statistical values human-readable. -// func (f TasksGet) WithHuman() func(*TasksGetRequest) { return func(r *TasksGetRequest) { r.Human = true @@ -198,7 +189,6 @@ func (f TasksGet) WithHuman() func(*TasksGetRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f TasksGet) WithErrorTrace() func(*TasksGetRequest) { return func(r *TasksGetRequest) { r.ErrorTrace = true @@ -206,7 +196,6 @@ func (f TasksGet) WithErrorTrace() func(*TasksGetRequest) { } // WithFilterPath filters the properties of the response body. -// func (f TasksGet) WithFilterPath(v ...string) func(*TasksGetRequest) { return func(r *TasksGetRequest) { r.FilterPath = v @@ -214,7 +203,6 @@ func (f TasksGet) WithFilterPath(v ...string) func(*TasksGetRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f TasksGet) WithHeader(h map[string]string) func(*TasksGetRequest) { return func(r *TasksGetRequest) { if r.Header == nil { @@ -227,7 +215,6 @@ func (f TasksGet) WithHeader(h map[string]string) func(*TasksGetRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f TasksGet) WithOpaqueID(s string) func(*TasksGetRequest) { return func(r *TasksGetRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.list.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.list.go index a0ffaadea206..4655c5b4110e 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.list.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.tasks.list.go @@ -49,12 +49,9 @@ func newTasksListFunc(t Transport) TasksList { // TasksList returns a list of tasks. // // This API is experimental. -// -// type TasksList func(o ...func(*TasksListRequest)) (*Response, error) // TasksListRequest configures the Tasks List API request. -// type TasksListRequest struct { Actions []string Detailed *bool @@ -75,7 +72,6 @@ type TasksListRequest struct { } // Do executes the request and returns response or error. -// func (r TasksListRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -178,7 +174,6 @@ func (r TasksListRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f TasksList) WithContext(v context.Context) func(*TasksListRequest) { return func(r *TasksListRequest) { r.ctx = v @@ -186,7 +181,6 @@ func (f TasksList) WithContext(v context.Context) func(*TasksListRequest) { } // WithActions - a list of actions that should be returned. leave empty to return all.. -// func (f TasksList) WithActions(v ...string) func(*TasksListRequest) { return func(r *TasksListRequest) { r.Actions = v @@ -194,7 +188,6 @@ func (f TasksList) WithActions(v ...string) func(*TasksListRequest) { } // WithDetailed - return detailed task information (default: false). -// func (f TasksList) WithDetailed(v bool) func(*TasksListRequest) { return func(r *TasksListRequest) { r.Detailed = &v @@ -202,7 +195,6 @@ func (f TasksList) WithDetailed(v bool) func(*TasksListRequest) { } // WithGroupBy - group tasks by nodes or parent/child relationships. -// func (f TasksList) WithGroupBy(v string) func(*TasksListRequest) { return func(r *TasksListRequest) { r.GroupBy = v @@ -210,7 +202,6 @@ func (f TasksList) WithGroupBy(v string) func(*TasksListRequest) { } // WithNodes - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. -// func (f TasksList) WithNodes(v ...string) func(*TasksListRequest) { return func(r *TasksListRequest) { r.Nodes = v @@ -218,7 +209,6 @@ func (f TasksList) WithNodes(v ...string) func(*TasksListRequest) { } // WithParentTaskID - return tasks with specified parent task ID (node_id:task_number). set to -1 to return all.. -// func (f TasksList) WithParentTaskID(v string) func(*TasksListRequest) { return func(r *TasksListRequest) { r.ParentTaskID = v @@ -226,7 +216,6 @@ func (f TasksList) WithParentTaskID(v string) func(*TasksListRequest) { } // WithTimeout - explicit operation timeout. -// func (f TasksList) WithTimeout(v time.Duration) func(*TasksListRequest) { return func(r *TasksListRequest) { r.Timeout = v @@ -234,7 +223,6 @@ func (f TasksList) WithTimeout(v time.Duration) func(*TasksListRequest) { } // WithWaitForCompletion - wait for the matching tasks to complete (default: false). -// func (f TasksList) WithWaitForCompletion(v bool) func(*TasksListRequest) { return func(r *TasksListRequest) { r.WaitForCompletion = &v @@ -242,7 +230,6 @@ func (f TasksList) WithWaitForCompletion(v bool) func(*TasksListRequest) { } // WithPretty makes the response body pretty-printed. -// func (f TasksList) WithPretty() func(*TasksListRequest) { return func(r *TasksListRequest) { r.Pretty = true @@ -250,7 +237,6 @@ func (f TasksList) WithPretty() func(*TasksListRequest) { } // WithHuman makes statistical values human-readable. -// func (f TasksList) WithHuman() func(*TasksListRequest) { return func(r *TasksListRequest) { r.Human = true @@ -258,7 +244,6 @@ func (f TasksList) WithHuman() func(*TasksListRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f TasksList) WithErrorTrace() func(*TasksListRequest) { return func(r *TasksListRequest) { r.ErrorTrace = true @@ -266,7 +251,6 @@ func (f TasksList) WithErrorTrace() func(*TasksListRequest) { } // WithFilterPath filters the properties of the response body. -// func (f TasksList) WithFilterPath(v ...string) func(*TasksListRequest) { return func(r *TasksListRequest) { r.FilterPath = v @@ -274,7 +258,6 @@ func (f TasksList) WithFilterPath(v ...string) func(*TasksListRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f TasksList) WithHeader(h map[string]string) func(*TasksListRequest) { return func(r *TasksListRequest) { if r.Header == nil { @@ -287,7 +270,6 @@ func (f TasksList) WithHeader(h map[string]string) func(*TasksListRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f TasksList) WithOpaqueID(s string) func(*TasksListRequest) { return func(r *TasksListRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.terms_enum.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.terms_enum.go index f671d3d89ee1..0042f97dfd04 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.terms_enum.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.terms_enum.go @@ -48,12 +48,9 @@ func newTermsEnumFunc(t Transport) TermsEnum { // TermsEnum the terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios. // // This API is beta. -// -// type TermsEnum func(index []string, o ...func(*TermsEnumRequest)) (*Response, error) // TermsEnumRequest configures the Terms Enum API request. -// type TermsEnumRequest struct { Index []string @@ -70,7 +67,6 @@ type TermsEnumRequest struct { } // Do executes the request and returns response or error. -// func (r TermsEnumRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -152,7 +148,6 @@ func (r TermsEnumRequest) Do(ctx context.Context, transport Transport) (*Respons } // WithContext sets the request context. -// func (f TermsEnum) WithContext(v context.Context) func(*TermsEnumRequest) { return func(r *TermsEnumRequest) { r.ctx = v @@ -160,7 +155,6 @@ func (f TermsEnum) WithContext(v context.Context) func(*TermsEnumRequest) { } // WithBody - field name, string which is the prefix expected in matching terms, timeout and size for max number of results. -// func (f TermsEnum) WithBody(v io.Reader) func(*TermsEnumRequest) { return func(r *TermsEnumRequest) { r.Body = v @@ -168,7 +162,6 @@ func (f TermsEnum) WithBody(v io.Reader) func(*TermsEnumRequest) { } // WithPretty makes the response body pretty-printed. -// func (f TermsEnum) WithPretty() func(*TermsEnumRequest) { return func(r *TermsEnumRequest) { r.Pretty = true @@ -176,7 +169,6 @@ func (f TermsEnum) WithPretty() func(*TermsEnumRequest) { } // WithHuman makes statistical values human-readable. -// func (f TermsEnum) WithHuman() func(*TermsEnumRequest) { return func(r *TermsEnumRequest) { r.Human = true @@ -184,7 +176,6 @@ func (f TermsEnum) WithHuman() func(*TermsEnumRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f TermsEnum) WithErrorTrace() func(*TermsEnumRequest) { return func(r *TermsEnumRequest) { r.ErrorTrace = true @@ -192,7 +183,6 @@ func (f TermsEnum) WithErrorTrace() func(*TermsEnumRequest) { } // WithFilterPath filters the properties of the response body. -// func (f TermsEnum) WithFilterPath(v ...string) func(*TermsEnumRequest) { return func(r *TermsEnumRequest) { r.FilterPath = v @@ -200,7 +190,6 @@ func (f TermsEnum) WithFilterPath(v ...string) func(*TermsEnumRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f TermsEnum) WithHeader(h map[string]string) func(*TermsEnumRequest) { return func(r *TermsEnumRequest) { if r.Header == nil { @@ -213,7 +202,6 @@ func (f TermsEnum) WithHeader(h map[string]string) func(*TermsEnumRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f TermsEnum) WithOpaqueID(s string) func(*TermsEnumRequest) { return func(r *TermsEnumRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.termvectors.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.termvectors.go index 2caabc8e8c36..4b8edf78af78 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.termvectors.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.termvectors.go @@ -47,12 +47,9 @@ func newTermvectorsFunc(t Transport) Termvectors { // ----- API Definition ------------------------------------------------------- // Termvectors returns information and statistics about terms in the fields of a particular document. -// -// type Termvectors func(index string, o ...func(*TermvectorsRequest)) (*Response, error) // TermvectorsRequest configures the Termvectors API request. -// type TermvectorsRequest struct { Index string DocumentType string @@ -83,7 +80,6 @@ type TermvectorsRequest struct { } // Do executes the request and returns response or error. -// func (r TermvectorsRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -221,7 +217,6 @@ func (r TermvectorsRequest) Do(ctx context.Context, transport Transport) (*Respo } // WithContext sets the request context. -// func (f Termvectors) WithContext(v context.Context) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.ctx = v @@ -229,7 +224,6 @@ func (f Termvectors) WithContext(v context.Context) func(*TermvectorsRequest) { } // WithBody - Define parameters and or supply a document to get termvectors for. See documentation.. -// func (f Termvectors) WithBody(v io.Reader) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Body = v @@ -237,7 +231,6 @@ func (f Termvectors) WithBody(v io.Reader) func(*TermvectorsRequest) { } // WithDocumentID - the ID of the document, when not specified a doc param should be supplied.. -// func (f Termvectors) WithDocumentID(v string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.DocumentID = v @@ -245,7 +238,6 @@ func (f Termvectors) WithDocumentID(v string) func(*TermvectorsRequest) { } // WithDocumentType - the type of the document.. -// func (f Termvectors) WithDocumentType(v string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.DocumentType = v @@ -253,7 +245,6 @@ func (f Termvectors) WithDocumentType(v string) func(*TermvectorsRequest) { } // WithFields - a list of fields to return.. -// func (f Termvectors) WithFields(v ...string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Fields = v @@ -261,7 +252,6 @@ func (f Termvectors) WithFields(v ...string) func(*TermvectorsRequest) { } // WithFieldStatistics - specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.. -// func (f Termvectors) WithFieldStatistics(v bool) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.FieldStatistics = &v @@ -269,7 +259,6 @@ func (f Termvectors) WithFieldStatistics(v bool) func(*TermvectorsRequest) { } // WithOffsets - specifies if term offsets should be returned.. -// func (f Termvectors) WithOffsets(v bool) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Offsets = &v @@ -277,7 +266,6 @@ func (f Termvectors) WithOffsets(v bool) func(*TermvectorsRequest) { } // WithPayloads - specifies if term payloads should be returned.. -// func (f Termvectors) WithPayloads(v bool) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Payloads = &v @@ -285,7 +273,6 @@ func (f Termvectors) WithPayloads(v bool) func(*TermvectorsRequest) { } // WithPositions - specifies if term positions should be returned.. -// func (f Termvectors) WithPositions(v bool) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Positions = &v @@ -293,7 +280,6 @@ func (f Termvectors) WithPositions(v bool) func(*TermvectorsRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random).. -// func (f Termvectors) WithPreference(v string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Preference = v @@ -301,7 +287,6 @@ func (f Termvectors) WithPreference(v string) func(*TermvectorsRequest) { } // WithRealtime - specifies if request is real-time as opposed to near-real-time (default: true).. -// func (f Termvectors) WithRealtime(v bool) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Realtime = &v @@ -309,7 +294,6 @@ func (f Termvectors) WithRealtime(v bool) func(*TermvectorsRequest) { } // WithRouting - specific routing value.. -// func (f Termvectors) WithRouting(v string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Routing = v @@ -317,7 +301,6 @@ func (f Termvectors) WithRouting(v string) func(*TermvectorsRequest) { } // WithTermStatistics - specifies if total term frequency and document frequency should be returned.. -// func (f Termvectors) WithTermStatistics(v bool) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.TermStatistics = &v @@ -325,7 +308,6 @@ func (f Termvectors) WithTermStatistics(v bool) func(*TermvectorsRequest) { } // WithVersion - explicit version number for concurrency control. -// func (f Termvectors) WithVersion(v int) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Version = &v @@ -333,7 +315,6 @@ func (f Termvectors) WithVersion(v int) func(*TermvectorsRequest) { } // WithVersionType - specific version type. -// func (f Termvectors) WithVersionType(v string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.VersionType = v @@ -341,7 +322,6 @@ func (f Termvectors) WithVersionType(v string) func(*TermvectorsRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Termvectors) WithPretty() func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Pretty = true @@ -349,7 +329,6 @@ func (f Termvectors) WithPretty() func(*TermvectorsRequest) { } // WithHuman makes statistical values human-readable. -// func (f Termvectors) WithHuman() func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.Human = true @@ -357,7 +336,6 @@ func (f Termvectors) WithHuman() func(*TermvectorsRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Termvectors) WithErrorTrace() func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.ErrorTrace = true @@ -365,7 +343,6 @@ func (f Termvectors) WithErrorTrace() func(*TermvectorsRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Termvectors) WithFilterPath(v ...string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { r.FilterPath = v @@ -373,7 +350,6 @@ func (f Termvectors) WithFilterPath(v ...string) func(*TermvectorsRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Termvectors) WithHeader(h map[string]string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { if r.Header == nil { @@ -386,7 +362,6 @@ func (f Termvectors) WithHeader(h map[string]string) func(*TermvectorsRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Termvectors) WithOpaqueID(s string) func(*TermvectorsRequest) { return func(r *TermvectorsRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update.go index 20acbebb1252..9dcb645dec2e 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update.go @@ -48,12 +48,9 @@ func newUpdateFunc(t Transport) Update { // ----- API Definition ------------------------------------------------------- // Update updates a document with a script or partial document. -// -// type Update func(index string, id string, body io.Reader, o ...func(*UpdateRequest)) (*Response, error) // UpdateRequest configures the Update API request. -// type UpdateRequest struct { Index string DocumentType string @@ -85,7 +82,6 @@ type UpdateRequest struct { } // Do executes the request and returns response or error. -// func (r UpdateRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -225,7 +221,6 @@ func (r UpdateRequest) Do(ctx context.Context, transport Transport) (*Response, } // WithContext sets the request context. -// func (f Update) WithContext(v context.Context) func(*UpdateRequest) { return func(r *UpdateRequest) { r.ctx = v @@ -233,7 +228,6 @@ func (f Update) WithContext(v context.Context) func(*UpdateRequest) { } // WithDocumentType - the type of the document. -// func (f Update) WithDocumentType(v string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.DocumentType = v @@ -241,7 +235,6 @@ func (f Update) WithDocumentType(v string) func(*UpdateRequest) { } // WithIfPrimaryTerm - only perform the update operation if the last operation that has changed the document has the specified primary term. -// func (f Update) WithIfPrimaryTerm(v int) func(*UpdateRequest) { return func(r *UpdateRequest) { r.IfPrimaryTerm = &v @@ -249,7 +242,6 @@ func (f Update) WithIfPrimaryTerm(v int) func(*UpdateRequest) { } // WithIfSeqNo - only perform the update operation if the last operation that has changed the document has the specified sequence number. -// func (f Update) WithIfSeqNo(v int) func(*UpdateRequest) { return func(r *UpdateRequest) { r.IfSeqNo = &v @@ -257,7 +249,6 @@ func (f Update) WithIfSeqNo(v int) func(*UpdateRequest) { } // WithLang - the script language (default: painless). -// func (f Update) WithLang(v string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.Lang = v @@ -265,7 +256,6 @@ func (f Update) WithLang(v string) func(*UpdateRequest) { } // WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.. -// func (f Update) WithRefresh(v string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.Refresh = v @@ -273,7 +263,6 @@ func (f Update) WithRefresh(v string) func(*UpdateRequest) { } // WithRequireAlias - when true, requires destination is an alias. default is false. -// func (f Update) WithRequireAlias(v bool) func(*UpdateRequest) { return func(r *UpdateRequest) { r.RequireAlias = &v @@ -281,7 +270,6 @@ func (f Update) WithRequireAlias(v bool) func(*UpdateRequest) { } // WithRetryOnConflict - specify how many times should the operation be retried when a conflict occurs (default: 0). -// func (f Update) WithRetryOnConflict(v int) func(*UpdateRequest) { return func(r *UpdateRequest) { r.RetryOnConflict = &v @@ -289,7 +277,6 @@ func (f Update) WithRetryOnConflict(v int) func(*UpdateRequest) { } // WithRouting - specific routing value. -// func (f Update) WithRouting(v string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.Routing = v @@ -297,7 +284,6 @@ func (f Update) WithRouting(v string) func(*UpdateRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f Update) WithSource(v ...string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.Source = v @@ -305,7 +291,6 @@ func (f Update) WithSource(v ...string) func(*UpdateRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f Update) WithSourceExcludes(v ...string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.SourceExcludes = v @@ -313,7 +298,6 @@ func (f Update) WithSourceExcludes(v ...string) func(*UpdateRequest) { } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f Update) WithSourceIncludes(v ...string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.SourceIncludes = v @@ -321,7 +305,6 @@ func (f Update) WithSourceIncludes(v ...string) func(*UpdateRequest) { } // WithTimeout - explicit operation timeout. -// func (f Update) WithTimeout(v time.Duration) func(*UpdateRequest) { return func(r *UpdateRequest) { r.Timeout = v @@ -329,7 +312,6 @@ func (f Update) WithTimeout(v time.Duration) func(*UpdateRequest) { } // WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the update operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1). -// func (f Update) WithWaitForActiveShards(v string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.WaitForActiveShards = v @@ -337,7 +319,6 @@ func (f Update) WithWaitForActiveShards(v string) func(*UpdateRequest) { } // WithPretty makes the response body pretty-printed. -// func (f Update) WithPretty() func(*UpdateRequest) { return func(r *UpdateRequest) { r.Pretty = true @@ -345,7 +326,6 @@ func (f Update) WithPretty() func(*UpdateRequest) { } // WithHuman makes statistical values human-readable. -// func (f Update) WithHuman() func(*UpdateRequest) { return func(r *UpdateRequest) { r.Human = true @@ -353,7 +333,6 @@ func (f Update) WithHuman() func(*UpdateRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f Update) WithErrorTrace() func(*UpdateRequest) { return func(r *UpdateRequest) { r.ErrorTrace = true @@ -361,7 +340,6 @@ func (f Update) WithErrorTrace() func(*UpdateRequest) { } // WithFilterPath filters the properties of the response body. -// func (f Update) WithFilterPath(v ...string) func(*UpdateRequest) { return func(r *UpdateRequest) { r.FilterPath = v @@ -369,7 +347,6 @@ func (f Update) WithFilterPath(v ...string) func(*UpdateRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f Update) WithHeader(h map[string]string) func(*UpdateRequest) { return func(r *UpdateRequest) { if r.Header == nil { @@ -382,7 +359,6 @@ func (f Update) WithHeader(h map[string]string) func(*UpdateRequest) { } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f Update) WithOpaqueID(s string) func(*UpdateRequest) { return func(r *UpdateRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update_by_query.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update_by_query.go index f1af32071850..80c4af2eb879 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update_by_query.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update_by_query.go @@ -50,12 +50,9 @@ func newUpdateByQueryFunc(t Transport) UpdateByQuery { // UpdateByQuery performs an update on every document in the index without changing the source, // for example to pick up a mapping change. -// -// type UpdateByQuery func(index []string, o ...func(*UpdateByQueryRequest)) (*Response, error) // UpdateByQueryRequest configures the Update By Query API request. -// type UpdateByQueryRequest struct { Index []string DocumentType []string @@ -109,7 +106,6 @@ type UpdateByQueryRequest struct { } // Do executes the request and returns response or error. -// func (r UpdateByQueryRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -335,7 +331,6 @@ func (r UpdateByQueryRequest) Do(ctx context.Context, transport Transport) (*Res } // WithContext sets the request context. -// func (f UpdateByQuery) WithContext(v context.Context) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.ctx = v @@ -343,7 +338,6 @@ func (f UpdateByQuery) WithContext(v context.Context) func(*UpdateByQueryRequest } // WithBody - The search definition using the Query DSL. -// func (f UpdateByQuery) WithBody(v io.Reader) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Body = v @@ -351,7 +345,6 @@ func (f UpdateByQuery) WithBody(v io.Reader) func(*UpdateByQueryRequest) { } // WithDocumentType - a list of document types to search; leave empty to perform the operation on all types. -// func (f UpdateByQuery) WithDocumentType(v ...string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.DocumentType = v @@ -359,7 +352,6 @@ func (f UpdateByQuery) WithDocumentType(v ...string) func(*UpdateByQueryRequest) } // WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). -// func (f UpdateByQuery) WithAllowNoIndices(v bool) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.AllowNoIndices = &v @@ -367,7 +359,6 @@ func (f UpdateByQuery) WithAllowNoIndices(v bool) func(*UpdateByQueryRequest) { } // WithAnalyzer - the analyzer to use for the query string. -// func (f UpdateByQuery) WithAnalyzer(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Analyzer = v @@ -375,7 +366,6 @@ func (f UpdateByQuery) WithAnalyzer(v string) func(*UpdateByQueryRequest) { } // WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false). -// func (f UpdateByQuery) WithAnalyzeWildcard(v bool) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.AnalyzeWildcard = &v @@ -383,7 +373,6 @@ func (f UpdateByQuery) WithAnalyzeWildcard(v bool) func(*UpdateByQueryRequest) { } // WithConflicts - what to do when the update by query hits version conflicts?. -// func (f UpdateByQuery) WithConflicts(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Conflicts = v @@ -391,7 +380,6 @@ func (f UpdateByQuery) WithConflicts(v string) func(*UpdateByQueryRequest) { } // WithDefaultOperator - the default operator for query string query (and or or). -// func (f UpdateByQuery) WithDefaultOperator(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.DefaultOperator = v @@ -399,7 +387,6 @@ func (f UpdateByQuery) WithDefaultOperator(v string) func(*UpdateByQueryRequest) } // WithDf - the field to use as default where no field prefix is given in the query string. -// func (f UpdateByQuery) WithDf(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Df = v @@ -407,7 +394,6 @@ func (f UpdateByQuery) WithDf(v string) func(*UpdateByQueryRequest) { } // WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. -// func (f UpdateByQuery) WithExpandWildcards(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.ExpandWildcards = v @@ -415,7 +401,6 @@ func (f UpdateByQuery) WithExpandWildcards(v string) func(*UpdateByQueryRequest) } // WithFrom - starting offset (default: 0). -// func (f UpdateByQuery) WithFrom(v int) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.From = &v @@ -423,7 +408,6 @@ func (f UpdateByQuery) WithFrom(v int) func(*UpdateByQueryRequest) { } // WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). -// func (f UpdateByQuery) WithIgnoreUnavailable(v bool) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.IgnoreUnavailable = &v @@ -431,7 +415,6 @@ func (f UpdateByQuery) WithIgnoreUnavailable(v bool) func(*UpdateByQueryRequest) } // WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored. -// func (f UpdateByQuery) WithLenient(v bool) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Lenient = &v @@ -439,7 +422,6 @@ func (f UpdateByQuery) WithLenient(v bool) func(*UpdateByQueryRequest) { } // WithMaxDocs - maximum number of documents to process (default: all documents). -// func (f UpdateByQuery) WithMaxDocs(v int) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.MaxDocs = &v @@ -447,7 +429,6 @@ func (f UpdateByQuery) WithMaxDocs(v int) func(*UpdateByQueryRequest) { } // WithPipeline - ingest pipeline to set on index requests made by this action. (default: none). -// func (f UpdateByQuery) WithPipeline(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Pipeline = v @@ -455,7 +436,6 @@ func (f UpdateByQuery) WithPipeline(v string) func(*UpdateByQueryRequest) { } // WithPreference - specify the node or shard the operation should be performed on (default: random). -// func (f UpdateByQuery) WithPreference(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Preference = v @@ -463,7 +443,6 @@ func (f UpdateByQuery) WithPreference(v string) func(*UpdateByQueryRequest) { } // WithQuery - query in the lucene query string syntax. -// func (f UpdateByQuery) WithQuery(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Query = v @@ -471,7 +450,6 @@ func (f UpdateByQuery) WithQuery(v string) func(*UpdateByQueryRequest) { } // WithRefresh - should the affected indexes be refreshed?. -// func (f UpdateByQuery) WithRefresh(v bool) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Refresh = &v @@ -479,7 +457,6 @@ func (f UpdateByQuery) WithRefresh(v bool) func(*UpdateByQueryRequest) { } // WithRequestCache - specify if request cache should be used for this request or not, defaults to index level setting. -// func (f UpdateByQuery) WithRequestCache(v bool) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.RequestCache = &v @@ -487,7 +464,6 @@ func (f UpdateByQuery) WithRequestCache(v bool) func(*UpdateByQueryRequest) { } // WithRequestsPerSecond - the throttle to set on this request in sub-requests per second. -1 means no throttle.. -// func (f UpdateByQuery) WithRequestsPerSecond(v int) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.RequestsPerSecond = &v @@ -495,7 +471,6 @@ func (f UpdateByQuery) WithRequestsPerSecond(v int) func(*UpdateByQueryRequest) } // WithRouting - a list of specific routing values. -// func (f UpdateByQuery) WithRouting(v ...string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Routing = v @@ -503,7 +478,6 @@ func (f UpdateByQuery) WithRouting(v ...string) func(*UpdateByQueryRequest) { } // WithScroll - specify how long a consistent view of the index should be maintained for scrolled search. -// func (f UpdateByQuery) WithScroll(v time.Duration) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Scroll = v @@ -511,7 +485,6 @@ func (f UpdateByQuery) WithScroll(v time.Duration) func(*UpdateByQueryRequest) { } // WithScrollSize - size on the scroll request powering the update by query. -// func (f UpdateByQuery) WithScrollSize(v int) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.ScrollSize = &v @@ -519,7 +492,6 @@ func (f UpdateByQuery) WithScrollSize(v int) func(*UpdateByQueryRequest) { } // WithSearchTimeout - explicit timeout for each search request. defaults to no timeout.. -// func (f UpdateByQuery) WithSearchTimeout(v time.Duration) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.SearchTimeout = v @@ -527,7 +499,6 @@ func (f UpdateByQuery) WithSearchTimeout(v time.Duration) func(*UpdateByQueryReq } // WithSearchType - search operation type. -// func (f UpdateByQuery) WithSearchType(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.SearchType = v @@ -535,7 +506,6 @@ func (f UpdateByQuery) WithSearchType(v string) func(*UpdateByQueryRequest) { } // WithSize - deprecated, please use `max_docs` instead. -// func (f UpdateByQuery) WithSize(v int) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Size = &v @@ -543,7 +513,6 @@ func (f UpdateByQuery) WithSize(v int) func(*UpdateByQueryRequest) { } // WithSlices - the number of slices this task should be divided into. defaults to 1, meaning the task isn't sliced into subtasks. can be set to `auto`.. -// func (f UpdateByQuery) WithSlices(v interface{}) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Slices = v @@ -551,7 +520,6 @@ func (f UpdateByQuery) WithSlices(v interface{}) func(*UpdateByQueryRequest) { } // WithSort - a list of : pairs. -// func (f UpdateByQuery) WithSort(v ...string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Sort = v @@ -559,7 +527,6 @@ func (f UpdateByQuery) WithSort(v ...string) func(*UpdateByQueryRequest) { } // WithSource - true or false to return the _source field or not, or a list of fields to return. -// func (f UpdateByQuery) WithSource(v ...string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Source = v @@ -567,7 +534,6 @@ func (f UpdateByQuery) WithSource(v ...string) func(*UpdateByQueryRequest) { } // WithSourceExcludes - a list of fields to exclude from the returned _source field. -// func (f UpdateByQuery) WithSourceExcludes(v ...string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.SourceExcludes = v @@ -575,7 +541,6 @@ func (f UpdateByQuery) WithSourceExcludes(v ...string) func(*UpdateByQueryReques } // WithSourceIncludes - a list of fields to extract and return from the _source field. -// func (f UpdateByQuery) WithSourceIncludes(v ...string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.SourceIncludes = v @@ -583,7 +548,6 @@ func (f UpdateByQuery) WithSourceIncludes(v ...string) func(*UpdateByQueryReques } // WithStats - specific 'tag' of the request for logging and statistical purposes. -// func (f UpdateByQuery) WithStats(v ...string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Stats = v @@ -591,7 +555,6 @@ func (f UpdateByQuery) WithStats(v ...string) func(*UpdateByQueryRequest) { } // WithTerminateAfter - the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.. -// func (f UpdateByQuery) WithTerminateAfter(v int) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.TerminateAfter = &v @@ -599,7 +562,6 @@ func (f UpdateByQuery) WithTerminateAfter(v int) func(*UpdateByQueryRequest) { } // WithTimeout - time each individual bulk request should wait for shards that are unavailable.. -// func (f UpdateByQuery) WithTimeout(v time.Duration) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Timeout = v @@ -607,7 +569,6 @@ func (f UpdateByQuery) WithTimeout(v time.Duration) func(*UpdateByQueryRequest) } // WithVersion - specify whether to return document version as part of a hit. -// func (f UpdateByQuery) WithVersion(v bool) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Version = &v @@ -615,7 +576,6 @@ func (f UpdateByQuery) WithVersion(v bool) func(*UpdateByQueryRequest) { } // WithVersionType - should the document increment the version number (internal) on hit or not (reindex). -// func (f UpdateByQuery) WithVersionType(v bool) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.VersionType = &v @@ -623,7 +583,6 @@ func (f UpdateByQuery) WithVersionType(v bool) func(*UpdateByQueryRequest) { } // WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the update by query operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1). -// func (f UpdateByQuery) WithWaitForActiveShards(v string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.WaitForActiveShards = v @@ -631,7 +590,6 @@ func (f UpdateByQuery) WithWaitForActiveShards(v string) func(*UpdateByQueryRequ } // WithWaitForCompletion - should the request should block until the update by query operation is complete.. -// func (f UpdateByQuery) WithWaitForCompletion(v bool) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.WaitForCompletion = &v @@ -639,7 +597,6 @@ func (f UpdateByQuery) WithWaitForCompletion(v bool) func(*UpdateByQueryRequest) } // WithPretty makes the response body pretty-printed. -// func (f UpdateByQuery) WithPretty() func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Pretty = true @@ -647,7 +604,6 @@ func (f UpdateByQuery) WithPretty() func(*UpdateByQueryRequest) { } // WithHuman makes statistical values human-readable. -// func (f UpdateByQuery) WithHuman() func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.Human = true @@ -655,7 +611,6 @@ func (f UpdateByQuery) WithHuman() func(*UpdateByQueryRequest) { } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f UpdateByQuery) WithErrorTrace() func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.ErrorTrace = true @@ -663,7 +618,6 @@ func (f UpdateByQuery) WithErrorTrace() func(*UpdateByQueryRequest) { } // WithFilterPath filters the properties of the response body. -// func (f UpdateByQuery) WithFilterPath(v ...string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { r.FilterPath = v @@ -671,7 +625,6 @@ func (f UpdateByQuery) WithFilterPath(v ...string) func(*UpdateByQueryRequest) { } // WithHeader adds the headers to the HTTP request. -// func (f UpdateByQuery) WithHeader(h map[string]string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { if r.Header == nil { @@ -684,7 +637,6 @@ func (f UpdateByQuery) WithHeader(h map[string]string) func(*UpdateByQueryReques } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f UpdateByQuery) WithOpaqueID(s string) func(*UpdateByQueryRequest) { return func(r *UpdateByQueryRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update_by_query_rethrottle.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update_by_query_rethrottle.go index 2bf5d506c772..c8a49a109894 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update_by_query_rethrottle.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/api.update_by_query_rethrottle.go @@ -46,12 +46,9 @@ func newUpdateByQueryRethrottleFunc(t Transport) UpdateByQueryRethrottle { // ----- API Definition ------------------------------------------------------- // UpdateByQueryRethrottle changes the number of requests per second for a particular Update By Query operation. -// -// type UpdateByQueryRethrottle func(task_id string, requests_per_second *int, o ...func(*UpdateByQueryRethrottleRequest)) (*Response, error) // UpdateByQueryRethrottleRequest configures the Update By Query Rethrottle API request. -// type UpdateByQueryRethrottleRequest struct { TaskID string @@ -68,7 +65,6 @@ type UpdateByQueryRethrottleRequest struct { } // Do executes the request and returns response or error. -// func (r UpdateByQueryRethrottleRequest) Do(ctx context.Context, transport Transport) (*Response, error) { var ( method string @@ -152,7 +148,6 @@ func (r UpdateByQueryRethrottleRequest) Do(ctx context.Context, transport Transp } // WithContext sets the request context. -// func (f UpdateByQueryRethrottle) WithContext(v context.Context) func(*UpdateByQueryRethrottleRequest) { return func(r *UpdateByQueryRethrottleRequest) { r.ctx = v @@ -160,7 +155,6 @@ func (f UpdateByQueryRethrottle) WithContext(v context.Context) func(*UpdateByQu } // WithRequestsPerSecond - the throttle to set on this request in floating sub-requests per second. -1 means set no throttle.. -// func (f UpdateByQueryRethrottle) WithRequestsPerSecond(v int) func(*UpdateByQueryRethrottleRequest) { return func(r *UpdateByQueryRethrottleRequest) { r.RequestsPerSecond = &v @@ -168,7 +162,6 @@ func (f UpdateByQueryRethrottle) WithRequestsPerSecond(v int) func(*UpdateByQuer } // WithPretty makes the response body pretty-printed. -// func (f UpdateByQueryRethrottle) WithPretty() func(*UpdateByQueryRethrottleRequest) { return func(r *UpdateByQueryRethrottleRequest) { r.Pretty = true @@ -176,7 +169,6 @@ func (f UpdateByQueryRethrottle) WithPretty() func(*UpdateByQueryRethrottleReque } // WithHuman makes statistical values human-readable. -// func (f UpdateByQueryRethrottle) WithHuman() func(*UpdateByQueryRethrottleRequest) { return func(r *UpdateByQueryRethrottleRequest) { r.Human = true @@ -184,7 +176,6 @@ func (f UpdateByQueryRethrottle) WithHuman() func(*UpdateByQueryRethrottleReques } // WithErrorTrace includes the stack trace for errors in the response body. -// func (f UpdateByQueryRethrottle) WithErrorTrace() func(*UpdateByQueryRethrottleRequest) { return func(r *UpdateByQueryRethrottleRequest) { r.ErrorTrace = true @@ -192,7 +183,6 @@ func (f UpdateByQueryRethrottle) WithErrorTrace() func(*UpdateByQueryRethrottleR } // WithFilterPath filters the properties of the response body. -// func (f UpdateByQueryRethrottle) WithFilterPath(v ...string) func(*UpdateByQueryRethrottleRequest) { return func(r *UpdateByQueryRethrottleRequest) { r.FilterPath = v @@ -200,7 +190,6 @@ func (f UpdateByQueryRethrottle) WithFilterPath(v ...string) func(*UpdateByQuery } // WithHeader adds the headers to the HTTP request. -// func (f UpdateByQueryRethrottle) WithHeader(h map[string]string) func(*UpdateByQueryRethrottleRequest) { return func(r *UpdateByQueryRethrottleRequest) { if r.Header == nil { @@ -213,7 +202,6 @@ func (f UpdateByQueryRethrottle) WithHeader(h map[string]string) func(*UpdateByQ } // WithOpaqueID adds the X-Opaque-Id header to the HTTP request. -// func (f UpdateByQueryRethrottle) WithOpaqueID(s string) func(*UpdateByQueryRethrottleRequest) { return func(r *UpdateByQueryRethrottleRequest) { if r.Header == nil { diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/doc.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/doc.go index 04e8b0a05dcd..7527a082e504 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/doc.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/doc.go @@ -88,7 +88,7 @@ or locally by: go doc github.com/opensearch-project/opensearch-go/opensearchapi Index go doc github.com/opensearch-project/opensearch-go/opensearchapi IndexRequest -Response +# Response The opensearchapi.Response type is a lightweight wrapper around http.Response. @@ -101,6 +101,5 @@ It is imperative to close the response body for a non-nil response. The Response type implements a couple of convenience methods for accessing the status, checking an error status code or printing the response body for debugging purposes. - */ package opensearchapi diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.go index 35804c307212..4c4752d49b4d 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.go @@ -35,11 +35,9 @@ import ( ) // Version returns the package version as a string. -// const Version = version.Client // Transport defines the interface for an API client. -// type Transport interface { Perform(*http.Request) (*http.Response, error) } @@ -49,7 +47,6 @@ type Transport interface { // It is used as a convenience function for converting a bool value // into a pointer when passing the value to a function or struct field // which expects a pointer. -// func BoolPtr(v bool) *bool { return &v } // IntPtr returns a pointer to v. @@ -57,12 +54,10 @@ func BoolPtr(v bool) *bool { return &v } // It is used as a convenience function for converting an int value // into a pointer when passing the value to a function or struct field // which expects a pointer. -// func IntPtr(v int) *int { return &v } // formatDuration converts duration to a string in the format // accepted by Elasticsearch. -// func formatDuration(d time.Duration) string { if d < time.Millisecond { return strconv.FormatInt(int64(d), 10) + "nanos" diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.request.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.request.go index 4c83fb3c9dfe..c1391ddf7653 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.request.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.request.go @@ -41,13 +41,11 @@ var ( ) // Request defines the API request. -// type Request interface { Do(ctx context.Context, transport Transport) (*Response, error) } // newRequest creates an HTTP request. -// func newRequest(method, path string, body io.Reader) (*http.Request, error) { return http.NewRequest(method, path, body) } diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.response.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.response.go index a0cb074d8e7c..a0eb118a9f67 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.response.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchapi/opensearchapi.response.go @@ -37,7 +37,6 @@ import ( ) // Response represents the API response. -// type Response struct { StatusCode int Header http.Header @@ -47,7 +46,6 @@ type Response struct { // String returns the response as a string. // // The intended usage is for testing or debugging only. -// func (r *Response) String() string { var ( out = new(bytes.Buffer) @@ -84,7 +82,6 @@ func (r *Response) String() string { } // Status returns the response status as a string. -// func (r *Response) Status() string { var b strings.Builder if r != nil { @@ -96,19 +93,16 @@ func (r *Response) Status() string { } // IsError returns true when the response status indicates failure. -// func (r *Response) IsError() bool { return r.StatusCode > 299 } // Warnings returns the deprecation warnings from response headers. -// func (r *Response) Warnings() []string { return r.Header["Warning"] } // HasWarnings returns true when the response headers contain deprecation warnings. -// func (r *Response) HasWarnings() bool { return len(r.Warnings()) > 0 } diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/connection.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/connection.go index d4214f6bcdc6..8fd05432b123 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/connection.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/connection.go @@ -42,13 +42,11 @@ var ( ) // Selector defines the interface for selecting connections from the pool. -// type Selector interface { Select([]*Connection) (*Connection, error) } // ConnectionPool defines the interface for the connection pool. -// type ConnectionPool interface { Next() (*Connection, error) // Next returns the next available connection. OnSuccess(*Connection) error // OnSuccess reports that the connection was successful. @@ -57,7 +55,6 @@ type ConnectionPool interface { } // Connection represents a connection to a node. -// type Connection struct { sync.Mutex @@ -95,7 +92,6 @@ type roundRobinSelector struct { } // NewConnectionPool creates and returns a default connection pool. -// func NewConnectionPool(conns []*Connection, selector Selector) (ConnectionPool, error) { if len(conns) == 1 { return &singleConnectionPool{connection: conns[0]}, nil @@ -107,7 +103,6 @@ func NewConnectionPool(conns []*Connection, selector Selector) (ConnectionPool, } // Next returns the connection from pool. -// func (cp *singleConnectionPool) Next() (*Connection, error) { return cp.connection, nil } @@ -124,7 +119,6 @@ func (cp *singleConnectionPool) URLs() []*url.URL { return []*url.URL{cp.connect func (cp *singleConnectionPool) connections() []*Connection { return []*Connection{cp.connection} } // Next returns a connection from pool, or an error. -// func (cp *statusConnectionPool) Next() (*Connection, error) { cp.Lock() defer cp.Unlock() @@ -145,7 +139,6 @@ func (cp *statusConnectionPool) Next() (*Connection, error) { } // OnSuccess marks the connection as successful. -// func (cp *statusConnectionPool) OnSuccess(c *Connection) error { c.Lock() defer c.Unlock() @@ -163,7 +156,6 @@ func (cp *statusConnectionPool) OnSuccess(c *Connection) error { } // OnFailure marks the connection as failed. -// func (cp *statusConnectionPool) OnFailure(c *Connection) error { cp.Lock() defer cp.Unlock() @@ -218,7 +210,6 @@ func (cp *statusConnectionPool) OnFailure(c *Connection) error { } // URLs returns the list of URLs of available connections. -// func (cp *statusConnectionPool) URLs() []*url.URL { var urls []*url.URL @@ -242,7 +233,6 @@ func (cp *statusConnectionPool) connections() []*Connection { // resurrect adds the connection to the list of available connections. // When removeDead is true, it also removes it from the dead list. // The calling code is responsible for locking. -// func (cp *statusConnectionPool) resurrect(c *Connection, removeDead bool) error { if debugLogger != nil { debugLogger.Logf("Resurrecting %s\n", c.URL) @@ -269,7 +259,6 @@ func (cp *statusConnectionPool) resurrect(c *Connection, removeDead bool) error } // scheduleResurrect schedules the connection to be resurrected. -// func (cp *statusConnectionPool) scheduleResurrect(c *Connection) { factor := math.Min(float64(c.Failures-1), float64(defaultResurrectTimeoutFactorCutoff)) timeout := time.Duration(defaultResurrectTimeoutInitial.Seconds() * math.Exp2(factor) * float64(time.Second)) @@ -296,7 +285,6 @@ func (cp *statusConnectionPool) scheduleResurrect(c *Connection) { } // Select returns the connection in a round-robin fashion. -// func (s *roundRobinSelector) Select(conns []*Connection) (*Connection, error) { s.Lock() defer s.Unlock() @@ -306,7 +294,6 @@ func (s *roundRobinSelector) Select(conns []*Connection) (*Connection, error) { } // markAsDead marks the connection as dead. -// func (c *Connection) markAsDead() { c.IsDead = true if c.DeadSince.IsZero() { @@ -316,13 +303,11 @@ func (c *Connection) markAsDead() { } // markAsLive marks the connection as alive. -// func (c *Connection) markAsLive() { c.IsDead = false } // markAsHealthy marks the connection as healthy. -// func (c *Connection) markAsHealthy() { c.IsDead = false c.DeadSince = time.Time{} @@ -330,7 +315,6 @@ func (c *Connection) markAsHealthy() { } // String returns a readable connection representation. -// func (c *Connection) String() string { c.Lock() defer c.Unlock() diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/discovery.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/discovery.go index 1e3a3489cbf1..9da4219b0d39 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/discovery.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/discovery.go @@ -39,13 +39,11 @@ import ( ) // Discoverable defines the interface for transports supporting node discovery. -// type Discoverable interface { DiscoverNodes() error } // nodeInfo represents the information about node in a cluster. -// type nodeInfo struct { ID string Name string @@ -58,7 +56,6 @@ type nodeInfo struct { } // DiscoverNodes reloads the client connections by fetching information from the cluster. -// func (c *Client) DiscoverNodes() error { var conns []*Connection diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/logger.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/logger.go index 223b0165d7b2..43357a01fa32 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/logger.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/logger.go @@ -43,7 +43,6 @@ import ( var debugLogger DebuggingLogger // Logger defines an interface for logging request and response. -// type Logger interface { // LogRoundTrip should not modify the request or response, except for consuming and closing the body. // Implementations have to check for nil values in request and response. @@ -55,14 +54,12 @@ type Logger interface { } // DebuggingLogger defines the interface for a debugging logger. -// type DebuggingLogger interface { Log(a ...interface{}) error Logf(format string, a ...interface{}) error } // TextLogger prints the log message in plain text. -// type TextLogger struct { Output io.Writer EnableRequestBody bool @@ -70,7 +67,6 @@ type TextLogger struct { } // ColorLogger prints the log message in a terminal-optimized plain text. -// type ColorLogger struct { Output io.Writer EnableRequestBody bool @@ -78,7 +74,6 @@ type ColorLogger struct { } // CurlLogger prints the log message as a runnable curl command. -// type CurlLogger struct { Output io.Writer EnableRequestBody bool @@ -86,7 +81,6 @@ type CurlLogger struct { } // JSONLogger prints the log message as JSON. -// type JSONLogger struct { Output io.Writer EnableRequestBody bool @@ -94,13 +88,11 @@ type JSONLogger struct { } // debuggingLogger prints debug messages as plain text. -// type debuggingLogger struct { Output io.Writer } // LogRoundTrip prints the information about request and response. -// func (l *TextLogger) LogRoundTrip(req *http.Request, res *http.Response, err error, start time.Time, dur time.Duration) error { fmt.Fprintf(l.Output, "%s %s %s [status:%d request:%s]\n", start.Format(time.RFC3339), @@ -138,7 +130,6 @@ func (l *TextLogger) RequestBodyEnabled() bool { return l.EnableRequestBody } func (l *TextLogger) ResponseBodyEnabled() bool { return l.EnableResponseBody } // LogRoundTrip prints the information about request and response. -// func (l *ColorLogger) LogRoundTrip(req *http.Request, res *http.Response, err error, start time.Time, dur time.Duration) error { query, _ := url.QueryUnescape(req.URL.RawQuery) if query != "" { @@ -213,7 +204,6 @@ func (l *ColorLogger) RequestBodyEnabled() bool { return l.EnableRequestBody } func (l *ColorLogger) ResponseBodyEnabled() bool { return l.EnableResponseBody } // LogRoundTrip prints the information about request and response. -// func (l *CurlLogger) LogRoundTrip(req *http.Request, res *http.Response, err error, start time.Time, dur time.Duration) error { var b bytes.Buffer @@ -303,7 +293,6 @@ func (l *CurlLogger) RequestBodyEnabled() bool { return l.EnableRequestBody } func (l *CurlLogger) ResponseBodyEnabled() bool { return l.EnableResponseBody } // LogRoundTrip prints the information about request and response. -// func (l *JSONLogger) LogRoundTrip(req *http.Request, res *http.Response, err error, start time.Time, dur time.Duration) error { // TODO: Research performance optimization of using sync.Pool @@ -411,14 +400,12 @@ func (l *JSONLogger) RequestBodyEnabled() bool { return l.EnableRequestBody } func (l *JSONLogger) ResponseBodyEnabled() bool { return l.EnableResponseBody } // Log prints the arguments to output in default format. -// func (l *debuggingLogger) Log(a ...interface{}) error { _, err := fmt.Fprint(l.Output, a...) return err } // Logf prints formats the arguments and prints them to output. -// func (l *debuggingLogger) Logf(format string, a ...interface{}) error { _, err := fmt.Fprintf(l.Output, format, a...) return err diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/metrics.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/metrics.go index caef13e182a4..2c5bbd5e4414 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/metrics.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/metrics.go @@ -36,19 +36,16 @@ import ( ) // Measurable defines the interface for transports supporting metrics. -// type Measurable interface { Metrics() (Metrics, error) } // connectionable defines the interface for transports returning a list of connections. -// type connectionable interface { connections() []*Connection } // Metrics represents the transport metrics. -// type Metrics struct { Requests int `json:"requests"` Failures int `json:"failures"` @@ -58,7 +55,6 @@ type Metrics struct { } // ConnectionMetric represents metric information for a connection. -// type ConnectionMetric struct { URL string `json:"url"` Failures int `json:"failures,omitempty"` @@ -73,7 +69,6 @@ type ConnectionMetric struct { } // metrics represents the inner state of metrics. -// type metrics struct { sync.RWMutex @@ -85,7 +80,6 @@ type metrics struct { } // Metrics returns the transport metrics. -// func (c *Client) Metrics() (Metrics, error) { if c.metrics == nil { return Metrics{}, errors.New("transport metrics not enabled") @@ -139,7 +133,6 @@ func (c *Client) Metrics() (Metrics, error) { } // String returns the metrics as a string. -// func (m Metrics) String() string { var ( i int @@ -184,7 +177,6 @@ func (m Metrics) String() string { } // String returns the connection information as a string. -// func (cm ConnectionMetric) String() string { var b strings.Builder b.WriteString("{") diff --git a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/opensearchtransport.go b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/opensearchtransport.go index 725fddc95ddf..a5870faec87a 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/opensearchtransport.go +++ b/vendor/github.com/opensearch-project/opensearch-go/opensearchtransport/opensearchtransport.go @@ -75,13 +75,11 @@ func init() { } // Interface defines the interface for HTTP client. -// type Interface interface { Perform(*http.Request) (*http.Response, error) } // Config represents the configuration of HTTP client. -// type Config struct { URLs []*url.URL Username string @@ -113,7 +111,6 @@ type Config struct { } // Client represents the HTTP client. -// type Client struct { sync.Mutex @@ -146,7 +143,6 @@ type Client struct { // New creates new transport client. // // http.DefaultTransport will be used if no transport is passed in the configuration. -// func New(cfg Config) (*Client, error) { if cfg.Transport == nil { cfg.Transport = http.DefaultTransport @@ -235,7 +231,6 @@ func New(cfg Config) (*Client, error) { } // Perform executes the request and returns a response or error. -// func (c *Client) Perform(req *http.Request) (*http.Response, error) { var ( res *http.Response @@ -413,8 +408,6 @@ func (c *Client) Perform(req *http.Request) (*http.Response, error) { } // URLs returns a list of transport URLs. -// -// func (c *Client) URLs() []*url.URL { return c.pool.URLs() } diff --git a/vendor/github.com/opensearch-project/opensearch-go/signer/signer.go b/vendor/github.com/opensearch-project/opensearch-go/signer/signer.go index f0a88e7c8fd2..8a5beb94fd60 100644 --- a/vendor/github.com/opensearch-project/opensearch-go/signer/signer.go +++ b/vendor/github.com/opensearch-project/opensearch-go/signer/signer.go @@ -11,7 +11,7 @@ package signer import "net/http" -//Signer an interface that will sign http.Request +// Signer an interface that will sign http.Request type Signer interface { SignRequest(request *http.Request) error } diff --git a/vendor/github.com/pelletier/go-toml/doc.go b/vendor/github.com/pelletier/go-toml/doc.go index a1406a32b381..9e8320d9b0ca 100644 --- a/vendor/github.com/pelletier/go-toml/doc.go +++ b/vendor/github.com/pelletier/go-toml/doc.go @@ -3,21 +3,20 @@ // This version supports the specification as described in // https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.5.0.md // -// Marshaling +// # Marshaling // // Go-toml can marshal and unmarshal TOML documents from and to data // structures. // -// TOML document as a tree +// # TOML document as a tree // // Go-toml can operate on a TOML document as a tree. Use one of the Load* // functions to parse TOML data and obtain a Tree instance, then one of its // methods to manipulate the tree. // -// JSONPath-like queries +// # JSONPath-like queries // // The package github.com/pelletier/go-toml/query implements a system // similar to JSONPath to quickly retrieve elements of a TOML document using a // single expression. See the package documentation for more information. -// package toml diff --git a/vendor/github.com/pelletier/go-toml/fuzz.go b/vendor/github.com/pelletier/go-toml/fuzz.go index 14570c8d3577..0dfaa148c6df 100644 --- a/vendor/github.com/pelletier/go-toml/fuzz.go +++ b/vendor/github.com/pelletier/go-toml/fuzz.go @@ -1,3 +1,4 @@ +//go:build gofuzz // +build gofuzz package toml diff --git a/vendor/github.com/pelletier/go-toml/localtime.go b/vendor/github.com/pelletier/go-toml/localtime.go index 9dfe4b9e6cb3..03ec97ddfb3f 100644 --- a/vendor/github.com/pelletier/go-toml/localtime.go +++ b/vendor/github.com/pelletier/go-toml/localtime.go @@ -76,9 +76,13 @@ func (d LocalDate) IsValid() bool { // // In is always consistent with time.LocalDate, even when time.LocalDate returns a time // on a different day. For example, if loc is America/Indiana/Vincennes, then both -// time.LocalDate(1955, time.May, 1, 0, 0, 0, 0, loc) +// +// time.LocalDate(1955, time.May, 1, 0, 0, 0, 0, loc) +// // and -// civil.LocalDate{Year: 1955, Month: time.May, Day: 1}.In(loc) +// +// civil.LocalDate{Year: 1955, Month: time.May, Day: 1}.In(loc) +// // return 23:00:00 on April 30, 1955. // // In panics if loc is nil. @@ -222,7 +226,9 @@ func LocalDateTimeOf(t time.Time) LocalDateTime { // ParseLocalDateTime accepts a variant of the RFC3339 date-time format that omits // the time offset but includes an optional fractional time, as described in // ParseLocalTime. Informally, the accepted format is -// YYYY-MM-DDTHH:MM:SS[.FFFFFFFFF] +// +// YYYY-MM-DDTHH:MM:SS[.FFFFFFFFF] +// // where the 'T' may be a lower-case 't'. func ParseLocalDateTime(s string) (LocalDateTime, error) { t, err := time.Parse("2006-01-02T15:04:05.999999999", s) @@ -250,11 +256,15 @@ func (dt LocalDateTime) IsValid() bool { // If the time is missing or ambigous at the location, In returns the same // result as time.LocalDate. For example, if loc is America/Indiana/Vincennes, then // both -// time.LocalDate(1955, time.May, 1, 0, 30, 0, 0, loc) +// +// time.LocalDate(1955, time.May, 1, 0, 30, 0, 0, loc) +// // and -// civil.LocalDateTime{ -// civil.LocalDate{Year: 1955, Month: time.May, Day: 1}}, -// civil.LocalTime{Minute: 30}}.In(loc) +// +// civil.LocalDateTime{ +// civil.LocalDate{Year: 1955, Month: time.May, Day: 1}}, +// civil.LocalTime{Minute: 30}}.In(loc) +// // return 23:30:00 on April 30, 1955. // // In panics if loc is nil. diff --git a/vendor/github.com/pelletier/go-toml/marshal.go b/vendor/github.com/pelletier/go-toml/marshal.go index 3443c35452ad..862b4a36b448 100644 --- a/vendor/github.com/pelletier/go-toml/marshal.go +++ b/vendor/github.com/pelletier/go-toml/marshal.go @@ -222,10 +222,10 @@ function for sub-structs, and currently only definite types can be marshaled The following struct annotations are supported: - toml:"Field" Overrides the field's name to output. - omitempty When set, empty values and groups are not emitted. - comment:"comment" Emits a # comment on the same line. This supports new lines. - commented:"true" Emits the value as commented. + toml:"Field" Overrides the field's name to output. + omitempty When set, empty values and groups are not emitted. + comment:"comment" Emits a # comment on the same line. This supports new lines. + commented:"true" Emits the value as commented. Note that pointers are automatically assigned the "omitempty" option, as TOML explicitly does not handle null values (saying instead the label should be @@ -233,19 +233,19 @@ dropped). Tree structural types and corresponding marshal types: - *Tree (*)struct, (*)map[string]interface{} - []*Tree (*)[](*)struct, (*)[](*)map[string]interface{} - []interface{} (as interface{}) (*)[]primitive, (*)[]([]interface{}) - interface{} (*)primitive + *Tree (*)struct, (*)map[string]interface{} + []*Tree (*)[](*)struct, (*)[](*)map[string]interface{} + []interface{} (as interface{}) (*)[]primitive, (*)[]([]interface{}) + interface{} (*)primitive Tree primitive types and corresponding marshal types: - uint64 uint, uint8-uint64, pointers to same - int64 int, int8-uint64, pointers to same - float64 float32, float64, pointers to same - string string, pointers to same - bool bool, pointers to same - time.LocalTime time.LocalTime{}, pointers to same + uint64 uint, uint8-uint64, pointers to same + int64 int, int8-uint64, pointers to same + float64 float32, float64, pointers to same + string string, pointers to same + bool bool, pointers to same + time.LocalTime time.LocalTime{}, pointers to same For additional flexibility, use the Encoder API. */ @@ -307,15 +307,15 @@ func (e *Encoder) QuoteMapKeys(v bool) *Encoder { // // For example: // -// A = [1,2,3] +// A = [1,2,3] // // Becomes // -// A = [ -// 1, -// 2, -// 3, -// ] +// A = [ +// 1, +// 2, +// 3, +// ] func (e *Encoder) ArraysWithOneElementPerLine(v bool) *Encoder { e.arraysOneElementPerLine = v return e @@ -640,15 +640,15 @@ func (t *Tree) Marshal() ([]byte, error) { // // The following struct annotations are supported: // -// toml:"Field" Overrides the field's name to map to. -// default:"foo" Provides a default value. +// toml:"Field" Overrides the field's name to map to. +// default:"foo" Provides a default value. // // For default values, only fields of the following types are supported: -// * string -// * bool -// * int -// * int64 -// * float64 +// - string +// - bool +// - int +// - int64 +// - float64 // // See Marshal() documentation for types mapping table. func Unmarshal(data []byte, v interface{}) error { diff --git a/vendor/github.com/pelletier/go-toml/tomltree_write.go b/vendor/github.com/pelletier/go-toml/tomltree_write.go index c9afbdab76ea..e9cb83b226ff 100644 --- a/vendor/github.com/pelletier/go-toml/tomltree_write.go +++ b/vendor/github.com/pelletier/go-toml/tomltree_write.go @@ -505,14 +505,14 @@ func (t *Tree) String() string { // ToMap recursively generates a representation of the tree using Go built-in structures. // The following types are used: // -// * bool -// * float64 -// * int64 -// * string -// * uint64 -// * time.Time -// * map[string]interface{} (where interface{} is any of this list) -// * []interface{} (where interface{} is any of this list) +// - bool +// - float64 +// - int64 +// - string +// - uint64 +// - time.Time +// - map[string]interface{} (where interface{} is any of this list) +// - []interface{} (where interface{} is any of this list) func (t *Tree) ToMap() map[string]interface{} { result := map[string]interface{}{} diff --git a/vendor/github.com/pkg/errors/errors.go b/vendor/github.com/pkg/errors/errors.go index 161aea258296..5d90dd4cc18a 100644 --- a/vendor/github.com/pkg/errors/errors.go +++ b/vendor/github.com/pkg/errors/errors.go @@ -2,89 +2,89 @@ // // The traditional error handling idiom in Go is roughly akin to // -// if err != nil { -// return err -// } +// if err != nil { +// return err +// } // // which when applied recursively up the call stack results in error reports // without context or debugging information. The errors package allows // programmers to add context to the failure path in their code in a way // that does not destroy the original value of the error. // -// Adding context to an error +// # Adding context to an error // // The errors.Wrap function returns a new error that adds context to the // original error by recording a stack trace at the point Wrap is called, // together with the supplied message. For example // -// _, err := ioutil.ReadAll(r) -// if err != nil { -// return errors.Wrap(err, "read failed") -// } +// _, err := ioutil.ReadAll(r) +// if err != nil { +// return errors.Wrap(err, "read failed") +// } // // If additional control is required, the errors.WithStack and // errors.WithMessage functions destructure errors.Wrap into its component // operations: annotating an error with a stack trace and with a message, // respectively. // -// Retrieving the cause of an error +// # Retrieving the cause of an error // // Using errors.Wrap constructs a stack of errors, adding context to the // preceding error. Depending on the nature of the error it may be necessary // to reverse the operation of errors.Wrap to retrieve the original error // for inspection. Any error value which implements this interface // -// type causer interface { -// Cause() error -// } +// type causer interface { +// Cause() error +// } // // can be inspected by errors.Cause. errors.Cause will recursively retrieve // the topmost error that does not implement causer, which is assumed to be // the original cause. For example: // -// switch err := errors.Cause(err).(type) { -// case *MyError: -// // handle specifically -// default: -// // unknown error -// } +// switch err := errors.Cause(err).(type) { +// case *MyError: +// // handle specifically +// default: +// // unknown error +// } // // Although the causer interface is not exported by this package, it is // considered a part of its stable public interface. // -// Formatted printing of errors +// # Formatted printing of errors // // All error values returned from this package implement fmt.Formatter and can // be formatted by the fmt package. The following verbs are supported: // -// %s print the error. If the error has a Cause it will be -// printed recursively. -// %v see %s -// %+v extended format. Each Frame of the error's StackTrace will -// be printed in detail. +// %s print the error. If the error has a Cause it will be +// printed recursively. +// %v see %s +// %+v extended format. Each Frame of the error's StackTrace will +// be printed in detail. // -// Retrieving the stack trace of an error or wrapper +// # Retrieving the stack trace of an error or wrapper // // New, Errorf, Wrap, and Wrapf record a stack trace at the point they are // invoked. This information can be retrieved with the following interface: // -// type stackTracer interface { -// StackTrace() errors.StackTrace -// } +// type stackTracer interface { +// StackTrace() errors.StackTrace +// } // // The returned errors.StackTrace type is defined as // -// type StackTrace []Frame +// type StackTrace []Frame // // The Frame type represents a call site in the stack trace. Frame supports // the fmt.Formatter interface that can be used for printing information about // the stack trace of this error. For example: // -// if err, ok := err.(stackTracer); ok { -// for _, f := range err.StackTrace() { -// fmt.Printf("%+s:%d\n", f, f) -// } -// } +// if err, ok := err.(stackTracer); ok { +// for _, f := range err.StackTrace() { +// fmt.Printf("%+s:%d\n", f, f) +// } +// } // // Although the stackTracer interface is not exported by this package, it is // considered a part of its stable public interface. @@ -265,9 +265,9 @@ func (w *withMessage) Format(s fmt.State, verb rune) { // An error value has a cause if it implements the following // interface: // -// type causer interface { -// Cause() error -// } +// type causer interface { +// Cause() error +// } // // If the error does not implement Cause, the original error will // be returned. If the error is nil, nil will be returned without further diff --git a/vendor/github.com/pkg/errors/go113.go b/vendor/github.com/pkg/errors/go113.go index be0d10d0c793..2c83c724532f 100644 --- a/vendor/github.com/pkg/errors/go113.go +++ b/vendor/github.com/pkg/errors/go113.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 package errors diff --git a/vendor/github.com/pkg/errors/stack.go b/vendor/github.com/pkg/errors/stack.go index 779a8348fb9c..82784d70036b 100644 --- a/vendor/github.com/pkg/errors/stack.go +++ b/vendor/github.com/pkg/errors/stack.go @@ -51,16 +51,16 @@ func (f Frame) name() string { // Format formats the frame according to the fmt.Formatter interface. // -// %s source file -// %d source line -// %n function name -// %v equivalent to %s:%d +// %s source file +// %d source line +// %n function name +// %v equivalent to %s:%d // // Format accepts flags that alter the printing of some verbs, as follows: // -// %+s function name and path of source file relative to the compile time -// GOPATH separated by \n\t (\n\t) -// %+v equivalent to %+s:%d +// %+s function name and path of source file relative to the compile time +// GOPATH separated by \n\t (\n\t) +// %+v equivalent to %+s:%d func (f Frame) Format(s fmt.State, verb rune) { switch verb { case 's': @@ -98,12 +98,12 @@ type StackTrace []Frame // Format formats the stack of Frames according to the fmt.Formatter interface. // -// %s lists source files for each Frame in the stack -// %v lists the source file and line number for each Frame in the stack +// %s lists source files for each Frame in the stack +// %v lists the source file and line number for each Frame in the stack // // Format accepts flags that alter the printing of some verbs, as follows: // -// %+v Prints filename, function, and line number for each Frame in the stack. +// %+v Prints filename, function, and line number for each Frame in the stack. func (st StackTrace) Format(s fmt.State, verb rune) { switch verb { case 'v': diff --git a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go index 003e99fadb4f..2a73737af6d3 100644 --- a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go +++ b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go @@ -199,12 +199,15 @@ func (m *SequenceMatcher) isBJunk(s string) bool { // If IsJunk is not defined: // // Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where -// alo <= i <= i+k <= ahi -// blo <= j <= j+k <= bhi +// +// alo <= i <= i+k <= ahi +// blo <= j <= j+k <= bhi +// // and for all (i',j',k') meeting those conditions, -// k >= k' -// i <= i' -// and if i == i', j <= j' +// +// k >= k' +// i <= i' +// and if i == i', j <= j' // // In other words, of all maximal matching blocks, return one that // starts earliest in a, and of all those maximal matching blocks that diff --git a/vendor/github.com/rivo/uniseg/gen_breaktest.go b/vendor/github.com/rivo/uniseg/gen_breaktest.go index e613c4cd00f5..4099e6483e6c 100644 --- a/vendor/github.com/rivo/uniseg/gen_breaktest.go +++ b/vendor/github.com/rivo/uniseg/gen_breaktest.go @@ -136,7 +136,9 @@ var ( // // E.g. for the input b="÷ 0020 × 0308 ÷ 1F1E6 ÷" // it will append -// "\u0020\u0308\U0001F1E6" +// +// "\u0020\u0308\U0001F1E6" +// // and "[][]rune{{0x0020,0x0308},{0x1F1E6},}" // to orig and exp respectively. // diff --git a/vendor/github.com/robfig/cron/v3/chain.go b/vendor/github.com/robfig/cron/v3/chain.go index 9565b418e0e7..5dbda89eb590 100644 --- a/vendor/github.com/robfig/cron/v3/chain.go +++ b/vendor/github.com/robfig/cron/v3/chain.go @@ -24,9 +24,12 @@ func NewChain(c ...JobWrapper) Chain { // Then decorates the given job with all JobWrappers in the chain. // // This: -// NewChain(m1, m2, m3).Then(job) +// +// NewChain(m1, m2, m3).Then(job) +// // is equivalent to: -// m1(m2(m3(job))) +// +// m1(m2(m3(job))) func (c Chain) Then(j Job) Job { for i := range c.wrappers { j = c.wrappers[len(c.wrappers)-i-1](j) diff --git a/vendor/github.com/robfig/cron/v3/cron.go b/vendor/github.com/robfig/cron/v3/cron.go index c7e917665898..37d4e9927245 100644 --- a/vendor/github.com/robfig/cron/v3/cron.go +++ b/vendor/github.com/robfig/cron/v3/cron.go @@ -97,17 +97,17 @@ func (s byTime) Less(i, j int) bool { // // Available Settings // -// Time Zone -// Description: The time zone in which schedules are interpreted -// Default: time.Local +// Time Zone +// Description: The time zone in which schedules are interpreted +// Default: time.Local // -// Parser -// Description: Parser converts cron spec strings into cron.Schedules. -// Default: Accepts this spec: https://en.wikipedia.org/wiki/Cron +// Parser +// Description: Parser converts cron spec strings into cron.Schedules. +// Default: Accepts this spec: https://en.wikipedia.org/wiki/Cron // -// Chain -// Description: Wrap submitted jobs to customize behavior. -// Default: A chain that recovers panics and logs them to stderr. +// Chain +// Description: Wrap submitted jobs to customize behavior. +// Default: A chain that recovers panics and logs them to stderr. // // See "cron.With*" to modify the default behavior. func New(opts ...Option) *Cron { diff --git a/vendor/github.com/robfig/cron/v3/doc.go b/vendor/github.com/robfig/cron/v3/doc.go index fa5d08b4dbb8..b9d00f5226a1 100644 --- a/vendor/github.com/robfig/cron/v3/doc.go +++ b/vendor/github.com/robfig/cron/v3/doc.go @@ -1,7 +1,7 @@ /* Package cron implements a cron spec parser and job runner. -Installation +# Installation To download the specific tagged release, run: @@ -13,7 +13,7 @@ Import it in your program as: It requires Go 1.11 or later due to usage of Go Modules. -Usage +# Usage Callers may register Funcs to be invoked on a given schedule. Cron will run them in their own goroutines. @@ -36,7 +36,7 @@ them in their own goroutines. .. c.Stop() // Stop the scheduler (does not stop any jobs already running). -CRON Expression Format +# CRON Expression Format A cron expression represents a set of times, using 5 space-separated fields. @@ -54,7 +54,7 @@ Month and Day-of-week field values are case insensitive. "SUN", "Sun", and The specific interpretation of the format is based on the Cron Wikipedia page: https://en.wikipedia.org/wiki/Cron -Alternative Formats +# Alternative Formats Alternative Cron expression formats support other fields like seconds. You can implement that by creating a custom Parser as follows. @@ -73,7 +73,7 @@ parser you saw earlier, except that its seconds field is REQUIRED: That emulates Quartz, the most popular alternative Cron schedule format: http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html -Special Characters +# Special Characters Asterisk ( * ) @@ -105,7 +105,7 @@ Question mark ( ? ) Question mark may be used instead of '*' for leaving either day-of-month or day-of-week blank. -Predefined schedules +# Predefined schedules You may use one of several pre-defined schedules in place of a cron expression. @@ -117,12 +117,12 @@ You may use one of several pre-defined schedules in place of a cron expression. @daily (or @midnight) | Run once a day, midnight | 0 0 * * * @hourly | Run once an hour, beginning of hour | 0 * * * * -Intervals +# Intervals You may also schedule a job to execute at fixed intervals, starting at the time it's added or cron is run. This is supported by formatting the cron spec like this: - @every + @every where "duration" is a string accepted by time.ParseDuration (http://golang.org/pkg/time/#ParseDuration). @@ -134,13 +134,13 @@ Note: The interval does not take the job runtime into account. For example, if a job takes 3 minutes to run, and it is scheduled to run every 5 minutes, it will have only 2 minutes of idle time between each run. -Time zones +# Time zones By default, all interpretation and scheduling is done in the machine's local time zone (time.Local). You can specify a different time zone on construction: - cron.New( - cron.WithLocation(time.UTC)) + cron.New( + cron.WithLocation(time.UTC)) Individual cron schedules may also override the time zone they are to be interpreted in by providing an additional space-separated field at the beginning @@ -169,7 +169,7 @@ The prefix "TZ=(TIME ZONE)" is also supported for legacy compatibility. Be aware that jobs scheduled during daylight-savings leap-ahead transitions will not be run! -Job Wrappers +# Job Wrappers A Cron runner may be configured with a chain of job wrappers to add cross-cutting functionality to all submitted jobs. For example, they may be used @@ -192,7 +192,7 @@ Install wrappers for individual jobs by explicitly wrapping them: cron.SkipIfStillRunning(logger), ).Then(job) -Thread safety +# Thread safety Since the Cron service runs concurrently with the calling code, some amount of care must be taken to ensure proper synchronization. @@ -200,7 +200,7 @@ care must be taken to ensure proper synchronization. All cron methods are designed to be correctly synchronized as long as the caller ensures that invocations have a clear happens-before ordering between them. -Logging +# Logging Cron defines a Logger interface that is a subset of the one defined in github.com/go-logr/logr. It has two logging levels (Info and Error), and @@ -216,16 +216,15 @@ Activate it with a one-off logger as follows: cron.WithLogger( cron.VerbosePrintfLogger(log.New(os.Stdout, "cron: ", log.LstdFlags)))) - -Implementation +# Implementation Cron entries are stored in an array, sorted by their next activation time. Cron sleeps until the next job is due to be run. Upon waking: - - it runs each entry that is active on that second - - it calculates the next run times for the jobs that were run - - it re-sorts the array of entries by next activation time. - - it goes to sleep until the soonest job. + - it runs each entry that is active on that second + - it calculates the next run times for the jobs that were run + - it re-sorts the array of entries by next activation time. + - it goes to sleep until the soonest job. */ package cron diff --git a/vendor/github.com/robfig/cron/v3/parser.go b/vendor/github.com/robfig/cron/v3/parser.go index 3cf8879f7e71..9835c241ba60 100644 --- a/vendor/github.com/robfig/cron/v3/parser.go +++ b/vendor/github.com/robfig/cron/v3/parser.go @@ -56,18 +56,17 @@ type Parser struct { // // Examples // -// // Standard parser without descriptors -// specParser := NewParser(Minute | Hour | Dom | Month | Dow) -// sched, err := specParser.Parse("0 0 15 */3 *") +// // Standard parser without descriptors +// specParser := NewParser(Minute | Hour | Dom | Month | Dow) +// sched, err := specParser.Parse("0 0 15 */3 *") // -// // Same as above, just excludes time fields -// subsParser := NewParser(Dom | Month | Dow) -// sched, err := specParser.Parse("15 */3 *") -// -// // Same as above, just makes Dow optional -// subsParser := NewParser(Dom | Month | DowOptional) -// sched, err := specParser.Parse("15 */3") +// // Same as above, just excludes time fields +// subsParser := NewParser(Dom | Month | Dow) +// sched, err := specParser.Parse("15 */3 *") // +// // Same as above, just makes Dow optional +// subsParser := NewParser(Dom | Month | DowOptional) +// sched, err := specParser.Parse("15 */3") func NewParser(options ParseOption) Parser { optionals := 0 if options&DowOptional > 0 { @@ -247,7 +246,9 @@ func getField(field string, r bounds) (uint64, error) { } // getRange returns the bits indicated by the given expression: -// number | number "-" number [ "/" number ] +// +// number | number "-" number [ "/" number ] +// // or error parsing range. func getRange(expr string, r bounds) (uint64, error) { var ( diff --git a/vendor/github.com/rs/zerolog/ctx.go b/vendor/github.com/rs/zerolog/ctx.go index 966d17ed8b57..16c367923063 100644 --- a/vendor/github.com/rs/zerolog/ctx.go +++ b/vendor/github.com/rs/zerolog/ctx.go @@ -20,11 +20,11 @@ type ctxKey struct{} // For instance, to add a field to an existing logger in the context, use this // notation: // -// ctx := r.Context() -// l := zerolog.Ctx(ctx) -// l.UpdateContext(func(c Context) Context { -// return c.Str("bar", "baz") -// }) +// ctx := r.Context() +// l := zerolog.Ctx(ctx) +// l.UpdateContext(func(c Context) Context { +// return c.Str("bar", "baz") +// }) func (l *Logger) WithContext(ctx context.Context) context.Context { if lp, ok := ctx.Value(ctxKey{}).(*Logger); ok { if lp == l { diff --git a/vendor/github.com/rs/zerolog/encoder_cbor.go b/vendor/github.com/rs/zerolog/encoder_cbor.go index 7b0dafef887e..5d8ee135229a 100644 --- a/vendor/github.com/rs/zerolog/encoder_cbor.go +++ b/vendor/github.com/rs/zerolog/encoder_cbor.go @@ -1,3 +1,4 @@ +//go:build binary_log // +build binary_log package zerolog diff --git a/vendor/github.com/rs/zerolog/encoder_json.go b/vendor/github.com/rs/zerolog/encoder_json.go index 0e0450e26c01..625e8d41e3f3 100644 --- a/vendor/github.com/rs/zerolog/encoder_json.go +++ b/vendor/github.com/rs/zerolog/encoder_json.go @@ -1,3 +1,4 @@ +//go:build !binary_log // +build !binary_log package zerolog diff --git a/vendor/github.com/rs/zerolog/go112.go b/vendor/github.com/rs/zerolog/go112.go index e7b5a1bdcffc..4326fee9ed90 100644 --- a/vendor/github.com/rs/zerolog/go112.go +++ b/vendor/github.com/rs/zerolog/go112.go @@ -1,3 +1,4 @@ +//go:build go1.12 // +build go1.12 package zerolog diff --git a/vendor/github.com/rs/zerolog/internal/cbor/time.go b/vendor/github.com/rs/zerolog/internal/cbor/time.go index 12f6a1ddd825..e2b9390d0230 100644 --- a/vendor/github.com/rs/zerolog/internal/cbor/time.go +++ b/vendor/github.com/rs/zerolog/internal/cbor/time.go @@ -28,7 +28,7 @@ func (e Encoder) appendFloatTimestamp(dst []byte, t time.Time) []byte { secs := t.Unix() nanos := t.Nanosecond() var val float64 - val = float64(secs)*1.0 + float64(nanos)*1E-9 + val = float64(secs)*1.0 + float64(nanos)*1e-9 return e.AppendFloat64(dst, val) } diff --git a/vendor/github.com/rs/zerolog/internal/json/string.go b/vendor/github.com/rs/zerolog/internal/json/string.go index 46698b54144b..1d9888e2b17c 100644 --- a/vendor/github.com/rs/zerolog/internal/json/string.go +++ b/vendor/github.com/rs/zerolog/internal/json/string.go @@ -88,7 +88,7 @@ func (e Encoder) AppendStringer(dst []byte, val fmt.Stringer) []byte { return e.AppendString(dst, val.String()) } -//// appendStringComplex is used by appendString to take over an in +// // appendStringComplex is used by appendString to take over an in // progress JSON string encoding that encountered a character that needs // to be encoded. func appendStringComplex(dst []byte, s string, i int) []byte { diff --git a/vendor/github.com/rs/zerolog/internal/json/time.go b/vendor/github.com/rs/zerolog/internal/json/time.go index 5aff6be3328c..b4eba93b2969 100644 --- a/vendor/github.com/rs/zerolog/internal/json/time.go +++ b/vendor/github.com/rs/zerolog/internal/json/time.go @@ -7,8 +7,8 @@ import ( const ( // Import from zerolog/global.go - timeFormatUnix = "" - timeFormatUnixMs = "UNIXMS" + timeFormatUnix = "" + timeFormatUnixMs = "UNIXMS" timeFormatUnixMicro = "UNIXMICRO" ) diff --git a/vendor/github.com/rs/zerolog/log.go b/vendor/github.com/rs/zerolog/log.go index 6227386d949c..15d1d006077d 100644 --- a/vendor/github.com/rs/zerolog/log.go +++ b/vendor/github.com/rs/zerolog/log.go @@ -2,97 +2,96 @@ // // A global Logger can be use for simple logging: // -// import "github.com/rs/zerolog/log" +// import "github.com/rs/zerolog/log" // -// log.Info().Msg("hello world") -// // Output: {"time":1494567715,"level":"info","message":"hello world"} +// log.Info().Msg("hello world") +// // Output: {"time":1494567715,"level":"info","message":"hello world"} // // NOTE: To import the global logger, import the "log" subpackage "github.com/rs/zerolog/log". // // Fields can be added to log messages: // -// log.Info().Str("foo", "bar").Msg("hello world") -// // Output: {"time":1494567715,"level":"info","message":"hello world","foo":"bar"} +// log.Info().Str("foo", "bar").Msg("hello world") +// // Output: {"time":1494567715,"level":"info","message":"hello world","foo":"bar"} // // Create logger instance to manage different outputs: // -// logger := zerolog.New(os.Stderr).With().Timestamp().Logger() -// logger.Info(). -// Str("foo", "bar"). -// Msg("hello world") -// // Output: {"time":1494567715,"level":"info","message":"hello world","foo":"bar"} +// logger := zerolog.New(os.Stderr).With().Timestamp().Logger() +// logger.Info(). +// Str("foo", "bar"). +// Msg("hello world") +// // Output: {"time":1494567715,"level":"info","message":"hello world","foo":"bar"} // // Sub-loggers let you chain loggers with additional context: // -// sublogger := log.With().Str("component": "foo").Logger() -// sublogger.Info().Msg("hello world") -// // Output: {"time":1494567715,"level":"info","message":"hello world","component":"foo"} +// sublogger := log.With().Str("component": "foo").Logger() +// sublogger.Info().Msg("hello world") +// // Output: {"time":1494567715,"level":"info","message":"hello world","component":"foo"} // // Level logging // -// zerolog.SetGlobalLevel(zerolog.InfoLevel) +// zerolog.SetGlobalLevel(zerolog.InfoLevel) // -// log.Debug().Msg("filtered out message") -// log.Info().Msg("routed message") +// log.Debug().Msg("filtered out message") +// log.Info().Msg("routed message") // -// if e := log.Debug(); e.Enabled() { -// // Compute log output only if enabled. -// value := compute() -// e.Str("foo": value).Msg("some debug message") -// } -// // Output: {"level":"info","time":1494567715,"routed message"} +// if e := log.Debug(); e.Enabled() { +// // Compute log output only if enabled. +// value := compute() +// e.Str("foo": value).Msg("some debug message") +// } +// // Output: {"level":"info","time":1494567715,"routed message"} // // Customize automatic field names: // -// log.TimestampFieldName = "t" -// log.LevelFieldName = "p" -// log.MessageFieldName = "m" +// log.TimestampFieldName = "t" +// log.LevelFieldName = "p" +// log.MessageFieldName = "m" // -// log.Info().Msg("hello world") -// // Output: {"t":1494567715,"p":"info","m":"hello world"} +// log.Info().Msg("hello world") +// // Output: {"t":1494567715,"p":"info","m":"hello world"} // // Log with no level and message: // -// log.Log().Str("foo","bar").Msg("") -// // Output: {"time":1494567715,"foo":"bar"} +// log.Log().Str("foo","bar").Msg("") +// // Output: {"time":1494567715,"foo":"bar"} // // Add contextual fields to global Logger: // -// log.Logger = log.With().Str("foo", "bar").Logger() +// log.Logger = log.With().Str("foo", "bar").Logger() // // Sample logs: // -// sampled := log.Sample(&zerolog.BasicSampler{N: 10}) -// sampled.Info().Msg("will be logged every 10 messages") +// sampled := log.Sample(&zerolog.BasicSampler{N: 10}) +// sampled.Info().Msg("will be logged every 10 messages") // // Log with contextual hooks: // -// // Create the hook: -// type SeverityHook struct{} +// // Create the hook: +// type SeverityHook struct{} // -// func (h SeverityHook) Run(e *zerolog.Event, level zerolog.Level, msg string) { -// if level != zerolog.NoLevel { -// e.Str("severity", level.String()) -// } -// } +// func (h SeverityHook) Run(e *zerolog.Event, level zerolog.Level, msg string) { +// if level != zerolog.NoLevel { +// e.Str("severity", level.String()) +// } +// } // -// // And use it: -// var h SeverityHook -// log := zerolog.New(os.Stdout).Hook(h) -// log.Warn().Msg("") -// // Output: {"level":"warn","severity":"warn"} +// // And use it: +// var h SeverityHook +// log := zerolog.New(os.Stdout).Hook(h) +// log.Warn().Msg("") +// // Output: {"level":"warn","severity":"warn"} // -// -// Caveats +// # Caveats // // There is no fields deduplication out-of-the-box. // Using the same key multiple times creates new key in final JSON each time. // -// logger := zerolog.New(os.Stderr).With().Timestamp().Logger() -// logger.Info(). -// Timestamp(). -// Msg("dup") -// // Output: {"level":"info","time":1494567715,"time":1494567715,"message":"dup"} +// logger := zerolog.New(os.Stderr).With().Timestamp().Logger() +// logger.Info(). +// Timestamp(). +// Msg("dup") +// // Output: {"level":"info","time":1494567715,"time":1494567715,"message":"dup"} // // In this case, many consumers will take the last value, // but this is not guaranteed; check yours if in doubt. diff --git a/vendor/github.com/rs/zerolog/not_go112.go b/vendor/github.com/rs/zerolog/not_go112.go index 4c43c9e76fdd..720e6877f61f 100644 --- a/vendor/github.com/rs/zerolog/not_go112.go +++ b/vendor/github.com/rs/zerolog/not_go112.go @@ -1,3 +1,4 @@ +//go:build !go1.12 // +build !go1.12 package zerolog diff --git a/vendor/github.com/rs/zerolog/syslog.go b/vendor/github.com/rs/zerolog/syslog.go index c4082830711b..921d33bb7769 100644 --- a/vendor/github.com/rs/zerolog/syslog.go +++ b/vendor/github.com/rs/zerolog/syslog.go @@ -1,5 +1,5 @@ -// +build !windows -// +build !binary_log +//go:build !windows && !binary_log +// +build !windows,!binary_log package zerolog @@ -34,8 +34,8 @@ func SyslogLevelWriter(w SyslogWriter) LevelWriter { } // SyslogCEEWriter wraps a SyslogWriter with a SyslogLevelWriter that adds a -// MITRE CEE prefix for JSON syslog entries, compatible with rsyslog -// and syslog-ng JSON logging support. +// MITRE CEE prefix for JSON syslog entries, compatible with rsyslog +// and syslog-ng JSON logging support. // See https://www.rsyslog.com/json-elasticsearch/ func SyslogCEEWriter(w SyslogWriter) LevelWriter { return syslogWriter{w, ceePrefix} diff --git a/vendor/github.com/russross/blackfriday/v2/doc.go b/vendor/github.com/russross/blackfriday/v2/doc.go index 57ff152a0568..2a5cc5b6784d 100644 --- a/vendor/github.com/russross/blackfriday/v2/doc.go +++ b/vendor/github.com/russross/blackfriday/v2/doc.go @@ -16,7 +16,7 @@ // If you're interested in calling Blackfriday from command line, see // https://github.com/russross/blackfriday-tool. // -// Sanitized Anchor Names +// # Sanitized Anchor Names // // Blackfriday includes an algorithm for creating sanitized anchor names // corresponding to a given input text. This algorithm is used to create diff --git a/vendor/github.com/russross/blackfriday/v2/inline.go b/vendor/github.com/russross/blackfriday/v2/inline.go index d45bd941726e..e13d425720f2 100644 --- a/vendor/github.com/russross/blackfriday/v2/inline.go +++ b/vendor/github.com/russross/blackfriday/v2/inline.go @@ -735,7 +735,9 @@ func linkEndsWithEntity(data []byte, linkEnd int) bool { } // hasPrefixCaseInsensitive is a custom implementation of -// strings.HasPrefix(strings.ToLower(s), prefix) +// +// strings.HasPrefix(strings.ToLower(s), prefix) +// // we rolled our own because ToLower pulls in a huge machinery of lowercasing // anything from Unicode and that's very slow. Since this func will only be // used on ASCII protocol prefixes, we can take shortcuts. diff --git a/vendor/github.com/russross/blackfriday/v2/markdown.go b/vendor/github.com/russross/blackfriday/v2/markdown.go index 58d2e4538c62..382db9e9d233 100644 --- a/vendor/github.com/russross/blackfriday/v2/markdown.go +++ b/vendor/github.com/russross/blackfriday/v2/markdown.go @@ -345,8 +345,8 @@ func WithNoExtensions() Option { // In Markdown, the link reference syntax can be made to resolve a link to // a reference instead of an inline URL, in one of the following ways: // -// * [link text][refid] -// * [refid][] +// - [link text][refid] +// - [refid][] // // Usually, the refid is defined at the bottom of the Markdown document. If // this override function is provided, the refid is passed to the override @@ -363,7 +363,9 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // block of markdown-encoded text. // // The simplest invocation of Run takes one argument, input: -// output := Run(input) +// +// output := Run(input) +// // This will parse the input with CommonExtensions enabled and render it with // the default HTMLRenderer (with CommonHTMLFlags). // @@ -371,13 +373,15 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // type does not contain exported fields, you can not use it directly. Instead, // use the With* functions. For example, this will call the most basic // functionality, with no extensions: -// output := Run(input, WithNoExtensions()) +// +// output := Run(input, WithNoExtensions()) // // You can use any number of With* arguments, even contradicting ones. They // will be applied in order of appearance and the latter will override the // former: -// output := Run(input, WithNoExtensions(), WithExtensions(exts), -// WithRenderer(yourRenderer)) +// +// output := Run(input, WithNoExtensions(), WithExtensions(exts), +// WithRenderer(yourRenderer)) func Run(input []byte, opts ...Option) []byte { r := NewHTMLRenderer(HTMLRendererParameters{ Flags: CommonHTMLFlags, @@ -491,35 +495,35 @@ func (p *Markdown) parseRefsToAST() { // // Consider this markdown with reference-style links: // -// [link][ref] +// [link][ref] // -// [ref]: /url/ "tooltip title" +// [ref]: /url/ "tooltip title" // // It will be ultimately converted to this HTML: // -//

link

+//

link

// // And a reference structure will be populated as follows: // -// p.refs["ref"] = &reference{ -// link: "/url/", -// title: "tooltip title", -// } +// p.refs["ref"] = &reference{ +// link: "/url/", +// title: "tooltip title", +// } // // Alternatively, reference can contain information about a footnote. Consider // this markdown: // -// Text needing a footnote.[^a] +// Text needing a footnote.[^a] // -// [^a]: This is the note +// [^a]: This is the note // // A reference structure will be populated as follows: // -// p.refs["a"] = &reference{ -// link: "a", -// title: "This is the note", -// noteID: , -// } +// p.refs["a"] = &reference{ +// link: "a", +// title: "This is the note", +// noteID: , +// } // // TODO: As you can see, it begs for splitting into two dedicated structures // for refs and for footnotes. diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go index 24a5036e95b6..e368aaf1cede 100644 --- a/vendor/github.com/spf13/pflag/flag.go +++ b/vendor/github.com/spf13/pflag/flag.go @@ -27,23 +27,32 @@ unaffected. Define flags using flag.String(), Bool(), Int(), etc. This declares an integer flag, -flagname, stored in the pointer ip, with type *int. + var ip = flag.Int("flagname", 1234, "help message for flagname") + If you like, you can bind the flag to a variable using the Var() functions. + var flagvar int func init() { flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") } + Or you can create custom flags that satisfy the Value interface (with pointer receivers) and couple them to flag parsing by + flag.Var(&flagVal, "name", "help message for flagname") + For such flags, the default value is just the initial value of the variable. After all flags are defined, call + flag.Parse() + to parse the command line into the defined flags. Flags may then be used directly. If you're using the flags themselves, they are all pointers; if you bind to variables, they're values. + fmt.Println("ip has value ", *ip) fmt.Println("flagvar has value ", flagvar) @@ -54,22 +63,26 @@ The arguments are indexed from 0 through flag.NArg()-1. The pflag package also defines some new functions that are not in flag, that give one-letter shorthands for flags. You can use these by appending 'P' to the name of any function that defines a flag. + var ip = flag.IntP("flagname", "f", 1234, "help message") var flagvar bool func init() { flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") } flag.VarP(&flagval, "varname", "v", "help message") + Shorthand letters can be used with single dashes on the command line. Boolean shorthand flags can be combined with other shorthand flags. Command line flag syntax: + --flag // boolean flags only --flag=x Unlike the flag package, a single dash before an option means something different than a double dash. Single dashes signify a series of shorthand letters for flags. All but the last shorthand letter must be boolean flags. + // boolean flags -f -abc @@ -927,9 +940,9 @@ func (f *FlagSet) usage() { } } -//--unknown (args will be empty) -//--unknown --next-flag ... (args will be --next-flag ...) -//--unknown arg ... (args will be arg ...) +// --unknown (args will be empty) +// --unknown --next-flag ... (args will be --next-flag ...) +// --unknown arg ... (args will be arg ...) func stripUnknownFlagValue(args []string) []string { if len(args) == 0 { //--unknown diff --git a/vendor/github.com/spf13/pflag/string_slice.go b/vendor/github.com/spf13/pflag/string_slice.go index 3cb2e69dba02..d421887e8672 100644 --- a/vendor/github.com/spf13/pflag/string_slice.go +++ b/vendor/github.com/spf13/pflag/string_slice.go @@ -98,9 +98,12 @@ func (f *FlagSet) GetStringSlice(name string) ([]string, error) { // The argument p points to a []string variable in which to store the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) { f.VarP(newStringSliceValue(value, p), name, "", usage) } @@ -114,9 +117,12 @@ func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []s // The argument p points to a []string variable in which to store the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func StringSliceVar(p *[]string, name string, value []string, usage string) { CommandLine.VarP(newStringSliceValue(value, p), name, "", usage) } @@ -130,9 +136,12 @@ func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage // The return value is the address of a []string variable that stores the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string { p := []string{} f.StringSliceVarP(&p, name, "", value, usage) @@ -150,9 +159,12 @@ func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage str // The return value is the address of a []string variable that stores the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func StringSlice(name string, value []string, usage string) *[]string { return CommandLine.StringSliceP(name, "", value, usage) } diff --git a/vendor/github.com/tidwall/match/match.go b/vendor/github.com/tidwall/match/match.go index 11da28f1b983..d41013a38bf7 100644 --- a/vendor/github.com/tidwall/match/match.go +++ b/vendor/github.com/tidwall/match/match.go @@ -10,13 +10,15 @@ import ( // and '?' matches on any one character. // // pattern: -// { term } +// +// { term } +// // term: -// '*' matches any sequence of non-Separator characters -// '?' matches any single non-Separator character -// c matches character c (c != '*', '?', '\\') -// '\\' c matches character c // +// '*' matches any sequence of non-Separator characters +// '?' matches any single non-Separator character +// c matches character c (c != '*', '?', '\\') +// '\\' c matches character c func Match(str, pattern string) bool { if pattern == "*" { return true diff --git a/vendor/github.com/tidwall/sjson/sjson.go b/vendor/github.com/tidwall/sjson/sjson.go index a55eef3fdb84..3e8f8081f76d 100644 --- a/vendor/github.com/tidwall/sjson/sjson.go +++ b/vendor/github.com/tidwall/sjson/sjson.go @@ -427,19 +427,18 @@ func isOptimisticPath(path string) bool { // // A path is a series of keys separated by a dot. // -// { -// "name": {"first": "Tom", "last": "Anderson"}, -// "age":37, -// "children": ["Sara","Alex","Jack"], -// "friends": [ -// {"first": "James", "last": "Murphy"}, -// {"first": "Roger", "last": "Craig"} -// ] -// } -// "name.last" >> "Anderson" -// "age" >> 37 -// "children.1" >> "Alex" -// +// { +// "name": {"first": "Tom", "last": "Anderson"}, +// "age":37, +// "children": ["Sara","Alex","Jack"], +// "friends": [ +// {"first": "James", "last": "Murphy"}, +// {"first": "Roger", "last": "Craig"} +// ] +// } +// "name.last" >> "Anderson" +// "age" >> 37 +// "children.1" >> "Alex" func Set(json, path string, value interface{}) (string, error) { return SetOptions(json, path, value, nil) } diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go index 89df9d6882e5..8a0bb9716c1f 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go @@ -12,14 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build !darwin -// +build !dragonfly -// +build !freebsd -// +build !linux -// +build !netbsd -// +build !openbsd -// +build !solaris -// +build !windows +//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows package resource // import "go.opentelemetry.io/otel/sdk/resource" diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go index 3ebcb534f28e..cd4e46d4db5e 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go @@ -12,16 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build !aix -// +build !darwin -// +build !dragonfly -// +build !freebsd -// +build !linux -// +build !netbsd -// +build !openbsd -// +build !solaris -// +build !windows -// +build !zos +//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos +// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos package resource // import "go.opentelemetry.io/otel/sdk/resource" diff --git a/vendor/go.starlark.net/internal/compile/compile.go b/vendor/go.starlark.net/internal/compile/compile.go index 888d95c56057..6fb59b84c7b4 100644 --- a/vendor/go.starlark.net/internal/compile/compile.go +++ b/vendor/go.starlark.net/internal/compile/compile.go @@ -23,7 +23,6 @@ // // Operands, logically uint32s, are encoded using little-endian 7-bit // varints, the top bit indicating that more bytes follow. -// package compile // import "go.starlark.net/internal/compile" import ( diff --git a/vendor/go.starlark.net/starlark/profile.go b/vendor/go.starlark.net/starlark/profile.go index 38da2b2e9ff2..388b1aa82d5c 100644 --- a/vendor/go.starlark.net/starlark/profile.go +++ b/vendor/go.starlark.net/starlark/profile.go @@ -363,19 +363,19 @@ func profile(w io.Writer) { // monotonic system clock, which there is no portable way to access. // Should that function ever go away, these alternatives exist: // -// // POSIX only. REALTIME not MONOTONIC. 17ns. -// var tv syscall.Timeval -// syscall.Gettimeofday(&tv) // can't fail -// return tv.Nano() +// // POSIX only. REALTIME not MONOTONIC. 17ns. +// var tv syscall.Timeval +// syscall.Gettimeofday(&tv) // can't fail +// return tv.Nano() // -// // Portable. REALTIME not MONOTONIC. 46ns. -// return time.Now().Nanoseconds() +// // Portable. REALTIME not MONOTONIC. 46ns. +// return time.Now().Nanoseconds() // -// // POSIX only. Adds a dependency. -// import "golang.org/x/sys/unix" -// var ts unix.Timespec -// unix.ClockGettime(CLOCK_MONOTONIC, &ts) // can't fail -// return unix.TimespecToNsec(ts) +// // POSIX only. Adds a dependency. +// import "golang.org/x/sys/unix" +// var ts unix.Timespec +// unix.ClockGettime(CLOCK_MONOTONIC, &ts) // can't fail +// return unix.TimespecToNsec(ts) // //go:linkname nanotime runtime.nanotime func nanotime() int64 diff --git a/vendor/go.starlark.net/starlark/unpack.go b/vendor/go.starlark.net/starlark/unpack.go index 316858992170..df700a6e5706 100644 --- a/vendor/go.starlark.net/starlark/unpack.go +++ b/vendor/go.starlark.net/starlark/unpack.go @@ -44,23 +44,23 @@ type Unpacker interface { // // Examples: // -// var ( -// a Value -// b = MakeInt(42) -// c Value = starlark.None -// ) +// var ( +// a Value +// b = MakeInt(42) +// c Value = starlark.None +// ) // -// // 1. mixed parameters, like def f(a, b=42, c=None). -// err := UnpackArgs("f", args, kwargs, "a", &a, "b?", &b, "c?", &c) +// // 1. mixed parameters, like def f(a, b=42, c=None). +// err := UnpackArgs("f", args, kwargs, "a", &a, "b?", &b, "c?", &c) // -// // 2. keyword parameters only, like def f(*, a, b, c=None). -// if len(args) > 0 { -// return fmt.Errorf("f: unexpected positional arguments") -// } -// err := UnpackArgs("f", args, kwargs, "a", &a, "b?", &b, "c?", &c) +// // 2. keyword parameters only, like def f(*, a, b, c=None). +// if len(args) > 0 { +// return fmt.Errorf("f: unexpected positional arguments") +// } +// err := UnpackArgs("f", args, kwargs, "a", &a, "b?", &b, "c?", &c) // -// // 3. positional parameters only, like def f(a, b=42, c=None, /) in Python 3.8. -// err := UnpackPositionalArgs("f", args, kwargs, 1, &a, &b, &c) +// // 3. positional parameters only, like def f(a, b=42, c=None, /) in Python 3.8. +// err := UnpackPositionalArgs("f", args, kwargs, 1, &a, &b, &c) // // More complex forms such as def f(a, b=42, *args, c, d=123, **kwargs) // require additional logic, but their need in built-ins is exceedingly rare. @@ -79,17 +79,16 @@ type Unpacker interface { // for the zero values of variables of type *List, *Dict, Callable, or // Iterable. For example: // -// // def myfunc(d=None, e=[], f={}) -// var ( -// d Value -// e *List -// f *Dict -// ) -// err := UnpackArgs("myfunc", args, kwargs, "d?", &d, "e?", &e, "f?", &f) -// if d == nil { d = None; } -// if e == nil { e = new(List); } -// if f == nil { f = new(Dict); } -// +// // def myfunc(d=None, e=[], f={}) +// var ( +// d Value +// e *List +// f *Dict +// ) +// err := UnpackArgs("myfunc", args, kwargs, "d?", &d, "e?", &e, "f?", &f) +// if d == nil { d = None; } +// if e == nil { e = new(List); } +// if f == nil { f = new(Dict); } func UnpackArgs(fnname string, args Tuple, kwargs []Tuple, pairs ...interface{}) error { nparams := len(pairs) / 2 var defined intset diff --git a/vendor/go.starlark.net/starlarkstruct/struct.go b/vendor/go.starlark.net/starlarkstruct/struct.go index ea2b1f639fc3..2282d7fb6b77 100644 --- a/vendor/go.starlark.net/starlarkstruct/struct.go +++ b/vendor/go.starlark.net/starlarkstruct/struct.go @@ -4,7 +4,6 @@ // Package starlarkstruct defines the Starlark types 'struct' and // 'module', both optional language extensions. -// package starlarkstruct // import "go.starlark.net/starlarkstruct" // It is tempting to introduce a variant of Struct that is a wrapper @@ -36,10 +35,9 @@ import ( // // An application can add 'struct' to the Starlark environment like so: // -// globals := starlark.StringDict{ -// "struct": starlark.NewBuiltin("struct", starlarkstruct.Make), -// } -// +// globals := starlark.StringDict{ +// "struct": starlark.NewBuiltin("struct", starlarkstruct.Make), +// } func Make(_ *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { if len(args) > 0 { return nil, fmt.Errorf("struct: unexpected positional arguments") diff --git a/vendor/go.starlark.net/syntax/parse.go b/vendor/go.starlark.net/syntax/parse.go index f4c8fff4d742..ceb415659852 100644 --- a/vendor/go.starlark.net/syntax/parse.go +++ b/vendor/go.starlark.net/syntax/parse.go @@ -275,10 +275,11 @@ func (p *parser) parseSimpleStmt(stmts []Stmt, consumeNL bool) []Stmt { } // small_stmt = RETURN expr? -// | PASS | BREAK | CONTINUE -// | LOAD ... -// | expr ('=' | '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' | '<<=' | '>>=') expr // assign -// | expr +// +// | PASS | BREAK | CONTINUE +// | LOAD ... +// | expr ('=' | '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' | '<<=' | '>>=') expr // assign +// | expr func (p *parser) parseSmallStmt() Stmt { switch p.tok { case RETURN: @@ -415,21 +416,23 @@ func (p *parser) consume(t Token) Position { } // params = (param COMMA)* param COMMA? -// | +// +// | // // param = IDENT -// | IDENT EQ test -// | STAR -// | STAR IDENT -// | STARSTAR IDENT +// +// | IDENT EQ test +// | STAR +// | STAR IDENT +// | STARSTAR IDENT // // parseParams parses a parameter list. The resulting expressions are of the form: // -// *Ident x -// *Binary{Op: EQ, X: *Ident, Y: Expr} x=y -// *Unary{Op: STAR} * -// *Unary{Op: STAR, X: *Ident} *args -// *Unary{Op: STARSTAR, X: *Ident} **kwargs +// *Ident x +// *Binary{Op: EQ, X: *Ident, Y: Expr} x=y +// *Unary{Op: STAR} * +// *Unary{Op: STAR, X: *Ident} *args +// *Unary{Op: STARSTAR, X: *Ident} **kwargs func (p *parser) parseParams() []Expr { var params []Expr for p.tok != RPAREN && p.tok != COLON && p.tok != EOF { @@ -651,9 +654,10 @@ func init() { } // primary_with_suffix = primary -// | primary '.' IDENT -// | primary slice_suffix -// | primary call_suffix +// +// | primary '.' IDENT +// | primary slice_suffix +// | primary call_suffix func (p *parser) parsePrimaryWithSuffix() Expr { x := p.parsePrimary() for { @@ -770,12 +774,13 @@ func (p *parser) parseArgs() []Expr { return args } -// primary = IDENT -// | INT | FLOAT | STRING | BYTES -// | '[' ... // list literal or comprehension -// | '{' ... // dict literal or comprehension -// | '(' ... // tuple or parenthesized expression -// | ('-'|'+'|'~') primary_with_suffix +// primary = IDENT +// +// | INT | FLOAT | STRING | BYTES +// | '[' ... // list literal or comprehension +// | '{' ... // dict literal or comprehension +// | '(' ... // tuple or parenthesized expression +// | ('-'|'+'|'~') primary_with_suffix func (p *parser) parsePrimary() Expr { switch p.tok { case IDENT: @@ -836,9 +841,10 @@ func (p *parser) parsePrimary() Expr { } // list = '[' ']' -// | '[' expr ']' -// | '[' expr expr_list ']' -// | '[' expr (FOR loop_variables IN expr)+ ']' +// +// | '[' expr ']' +// | '[' expr expr_list ']' +// | '[' expr (FOR loop_variables IN expr)+ ']' func (p *parser) parseList() Expr { lbrack := p.nextToken() if p.tok == RBRACK { @@ -865,8 +871,9 @@ func (p *parser) parseList() Expr { } // dict = '{' '}' -// | '{' dict_entry_list '}' -// | '{' dict_entry FOR loop_variables IN expr '}' +// +// | '{' dict_entry_list '}' +// | '{' dict_entry FOR loop_variables IN expr '}' func (p *parser) parseDict() Expr { lbrace := p.nextToken() if p.tok == RBRACE { @@ -904,8 +911,9 @@ func (p *parser) parseDictEntry() *DictEntry { } // comp_suffix = FOR loopvars IN expr comp_suffix -// | IF expr comp_suffix -// | ']' or ')' (end) +// +// | IF expr comp_suffix +// | ']' or ')' (end) // // There can be multiple FOR/IF clauses; the first is always a FOR. func (p *parser) parseComprehensionSuffix(lbrace Position, body Expr, endBrace Token) Expr { diff --git a/vendor/go.starlark.net/syntax/syntax.go b/vendor/go.starlark.net/syntax/syntax.go index 375663758351..18475d33ec7a 100644 --- a/vendor/go.starlark.net/syntax/syntax.go +++ b/vendor/go.starlark.net/syntax/syntax.go @@ -99,9 +99,10 @@ func (*LoadStmt) stmt() {} func (*ReturnStmt) stmt() {} // An AssignStmt represents an assignment: +// // x = 0 // x, y = y, x -// x += 1 +// x += 1 type AssignStmt struct { commentsRef OpPos Position diff --git a/vendor/gopkg.in/inf.v0/dec.go b/vendor/gopkg.in/inf.v0/dec.go index 26548b63cef4..124cce1443bb 100644 --- a/vendor/gopkg.in/inf.v0/dec.go +++ b/vendor/gopkg.in/inf.v0/dec.go @@ -9,17 +9,16 @@ // This package is currently in experimental stage and the API may change. // // This package does NOT support: -// - rounding to specific precisions (as opposed to specific decimal positions) -// - the notion of context (each rounding must be explicit) -// - NaN and Inf values, and distinguishing between positive and negative zero -// - conversions to and from float32/64 types +// - rounding to specific precisions (as opposed to specific decimal positions) +// - the notion of context (each rounding must be explicit) +// - NaN and Inf values, and distinguishing between positive and negative zero +// - conversions to and from float32/64 types // // Features considered for possible addition: -// + formatting options -// + Exp method -// + combined operations such as AddRound/MulAdd etc -// + exchanging data in decimal32/64/128 formats -// +// - formatting options +// - Exp method +// - combined operations such as AddRound/MulAdd etc +// - exchanging data in decimal32/64/128 formats package inf // import "gopkg.in/inf.v0" // TODO: @@ -43,19 +42,19 @@ import ( // // The mathematical value of a Dec equals: // -// unscaled * 10**(-scale) +// unscaled * 10**(-scale) // // Note that different Dec representations may have equal mathematical values. // -// unscaled scale String() -// ------------------------- -// 0 0 "0" -// 0 2 "0.00" -// 0 -2 "0" -// 1 0 "1" -// 100 2 "1.00" -// 10 0 "10" -// 1 -1 "10" +// unscaled scale String() +// ------------------------- +// 0 0 "0" +// 0 2 "0.00" +// 0 -2 "0" +// 1 0 "1" +// 100 2 "1.00" +// 10 0 "10" +// 1 -1 "10" // // The zero value for a Dec represents the value 0 with scale 0. // @@ -79,7 +78,6 @@ import ( // QuoRound should be used with a Scale and a Rounder. // QuoExact or QuoRound with RoundExact can be used in the special cases when it // is known that the result is always a finite decimal. -// type Dec struct { unscaled big.Int scale Scale @@ -182,7 +180,6 @@ func (z *Dec) Set(x *Dec) *Dec { // -1 if x < 0 // 0 if x == 0 // +1 if x > 0 -// func (x *Dec) Sign() int { return x.UnscaledBig().Sign() } @@ -196,10 +193,9 @@ func (z *Dec) Neg(x *Dec) *Dec { // Cmp compares x and y and returns: // -// -1 if x < y -// 0 if x == y -// +1 if x > y -// +// -1 if x < y +// 0 if x == y +// +1 if x > y func (x *Dec) Cmp(y *Dec) int { xx, yy := upscale(x, y) return xx.UnscaledBig().Cmp(yy.UnscaledBig()) @@ -252,7 +248,6 @@ func (z *Dec) Round(x *Dec, s Scale, r Rounder) *Dec { // // There is no corresponding Div method; the equivalent can be achieved through // the choice of Rounder used. -// func (z *Dec) QuoRound(x, y *Dec, s Scale, r Rounder) *Dec { return z.quo(x, y, sclr{s}, r) } @@ -290,10 +285,9 @@ func (z *Dec) QuoExact(x, y *Dec) *Dec { // The remainder is normalized to the range -1 < r < 1 to simplify rounding; // that is, the results satisfy the following equation: // -// x / y = z + (remNum/remDen) * 10**(-z.Scale()) +// x / y = z + (remNum/remDen) * 10**(-z.Scale()) // // See Rounder for more details about rounding. -// func (z *Dec) quoRem(x, y *Dec, s Scale, useRem bool, remNum, remDen *big.Int) (*Dec, *big.Int, *big.Int) { // difference (required adjustment) compared to "canonical" result scale diff --git a/vendor/gopkg.in/inf.v0/rounder.go b/vendor/gopkg.in/inf.v0/rounder.go index 3a97ef529b97..866180bf4c6e 100644 --- a/vendor/gopkg.in/inf.v0/rounder.go +++ b/vendor/gopkg.in/inf.v0/rounder.go @@ -9,7 +9,6 @@ import ( // Dec.Quo(). // // See the Example for results of using each Rounder with some sample values. -// type Rounder rounder // See http://speleotrove.com/decimal/damodel.html#refround for more detailed diff --git a/vendor/gopkg.in/natefinch/lumberjack.v2/chown.go b/vendor/gopkg.in/natefinch/lumberjack.v2/chown.go index 11d066972328..948f989a2bb7 100644 --- a/vendor/gopkg.in/natefinch/lumberjack.v2/chown.go +++ b/vendor/gopkg.in/natefinch/lumberjack.v2/chown.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package lumberjack diff --git a/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go b/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go index 3447cdc05642..8fe043e0764f 100644 --- a/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go +++ b/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go @@ -3,7 +3,7 @@ // Note that this is v2.0 of lumberjack, and should be imported using gopkg.in // thusly: // -// import "gopkg.in/natefinch/lumberjack.v2" +// import "gopkg.in/natefinch/lumberjack.v2" // // The package name remains simply lumberjack, and the code resides at // https://github.com/natefinch/lumberjack under the v2.0 branch. @@ -66,7 +66,7 @@ var _ io.WriteCloser = (*Logger)(nil) // `/var/log/foo/server.log`, a backup created at 6:30pm on Nov 11 2016 would // use the filename `/var/log/foo/server-2016-11-04T18-30-00.000.log` // -// Cleaning Up Old Log Files +// # Cleaning Up Old Log Files // // Whenever a new logfile gets created, old log files may be deleted. The most // recent files according to the encoded timestamp will be retained, up to a diff --git a/vendor/gopkg.in/square/go-jose.v2/doc.go b/vendor/gopkg.in/square/go-jose.v2/doc.go index dd1387f3f06b..f93215ef801a 100644 --- a/vendor/gopkg.in/square/go-jose.v2/doc.go +++ b/vendor/gopkg.in/square/go-jose.v2/doc.go @@ -15,13 +15,11 @@ */ /* - Package jose aims to provide an implementation of the Javascript Object Signing and Encryption set of standards. It implements encryption and signing based on the JSON Web Encryption and JSON Web Signature standards, with optional JSON Web Token support available in a sub-package. The library supports both the compact and full serialization formats, and has optional support for multiple recipients. - */ package jose diff --git a/vendor/gopkg.in/square/go-jose.v2/json/decode.go b/vendor/gopkg.in/square/go-jose.v2/json/decode.go index 4dbc4146cf9f..50634dd84781 100644 --- a/vendor/gopkg.in/square/go-jose.v2/json/decode.go +++ b/vendor/gopkg.in/square/go-jose.v2/json/decode.go @@ -75,14 +75,13 @@ import ( // // The JSON null value unmarshals into an interface, map, pointer, or slice // by setting that Go value to nil. Because null is often used in JSON to mean -// ``not present,'' unmarshaling a JSON null into any other Go type has no effect +// “not present,” unmarshaling a JSON null into any other Go type has no effect // on the value and produces no error. // // When unmarshaling quoted strings, invalid UTF-8 or // invalid UTF-16 surrogate pairs are not treated as an error. // Instead, they are replaced by the Unicode replacement // character U+FFFD. -// func Unmarshal(data []byte, v interface{}) error { // Check for well-formedness. // Avoids filling out half a data structure diff --git a/vendor/gopkg.in/square/go-jose.v2/json/encode.go b/vendor/gopkg.in/square/go-jose.v2/json/encode.go index 1dae8bb7cd80..d98a4fbf3966 100644 --- a/vendor/gopkg.in/square/go-jose.v2/json/encode.go +++ b/vendor/gopkg.in/square/go-jose.v2/json/encode.go @@ -58,6 +58,7 @@ import ( // becomes a member of the object unless // - the field's tag is "-", or // - the field is empty and its tag specifies the "omitempty" option. +// // The empty values are false, 0, any // nil pointer or interface value, and any array, slice, map, or string of // length zero. The object's default key string is the struct field name @@ -65,28 +66,28 @@ import ( // the struct field's tag value is the key name, followed by an optional comma // and options. Examples: // -// // Field is ignored by this package. -// Field int `json:"-"` +// // Field is ignored by this package. +// Field int `json:"-"` // -// // Field appears in JSON as key "myName". -// Field int `json:"myName"` +// // Field appears in JSON as key "myName". +// Field int `json:"myName"` // -// // Field appears in JSON as key "myName" and -// // the field is omitted from the object if its value is empty, -// // as defined above. -// Field int `json:"myName,omitempty"` +// // Field appears in JSON as key "myName" and +// // the field is omitted from the object if its value is empty, +// // as defined above. +// Field int `json:"myName,omitempty"` // -// // Field appears in JSON as key "Field" (the default), but -// // the field is skipped if empty. -// // Note the leading comma. -// Field int `json:",omitempty"` +// // Field appears in JSON as key "Field" (the default), but +// // the field is skipped if empty. +// // Note the leading comma. +// Field int `json:",omitempty"` // // The "string" option signals that a field is stored as JSON inside a // JSON-encoded string. It applies only to fields of string, floating point, // integer, or boolean types. This extra level of encoding is sometimes used // when communicating with JavaScript programs: // -// Int64String int64 `json:",string"` +// Int64String int64 `json:",string"` // // The key name will be used if it's a non-empty string consisting of // only Unicode letters, digits, dollar signs, percent signs, hyphens, @@ -133,7 +134,6 @@ import ( // JSON cannot represent cyclic data structures and Marshal does not // handle them. Passing cyclic structures to Marshal will result in // an infinite recursion. -// func Marshal(v interface{}) ([]byte, error) { e := &encodeState{} err := e.marshal(v) diff --git a/vendor/gopkg.in/square/go-jose.v2/json/stream.go b/vendor/gopkg.in/square/go-jose.v2/json/stream.go index 9b2b926b0333..f03b171e6a4c 100644 --- a/vendor/gopkg.in/square/go-jose.v2/json/stream.go +++ b/vendor/gopkg.in/square/go-jose.v2/json/stream.go @@ -240,7 +240,6 @@ var _ Unmarshaler = (*RawMessage)(nil) // Number, for JSON numbers // string, for JSON string literals // nil, for JSON null -// type Token interface{} const ( diff --git a/vendor/gopkg.in/square/go-jose.v2/opaque.go b/vendor/gopkg.in/square/go-jose.v2/opaque.go index fc3e8d2ef6ef..68db085ef6b3 100644 --- a/vendor/gopkg.in/square/go-jose.v2/opaque.go +++ b/vendor/gopkg.in/square/go-jose.v2/opaque.go @@ -121,7 +121,7 @@ func (oke *opaqueKeyEncrypter) encryptKey(cek []byte, alg KeyAlgorithm) (recipie return oke.encrypter.encryptKey(cek, alg) } -//OpaqueKeyDecrypter is an interface that supports decrypting keys with an opaque key. +// OpaqueKeyDecrypter is an interface that supports decrypting keys with an opaque key. type OpaqueKeyDecrypter interface { DecryptKey(encryptedKey []byte, header Header) ([]byte, error) } diff --git a/vendor/gopkg.in/yaml.v2/apic.go b/vendor/gopkg.in/yaml.v2/apic.go index acf71402cf31..fb2821e1e667 100644 --- a/vendor/gopkg.in/yaml.v2/apic.go +++ b/vendor/gopkg.in/yaml.v2/apic.go @@ -143,7 +143,7 @@ func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { emitter.canonical = canonical } -//// Set the indentation increment. +// // Set the indentation increment. func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { if indent < 2 || indent > 9 { indent = 2 diff --git a/vendor/gopkg.in/yaml.v2/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go index a1c2cc52627f..638a268c79bf 100644 --- a/vendor/gopkg.in/yaml.v2/emitterc.go +++ b/vendor/gopkg.in/yaml.v2/emitterc.go @@ -130,10 +130,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true diff --git a/vendor/gopkg.in/yaml.v2/parserc.go b/vendor/gopkg.in/yaml.v2/parserc.go index 81d05dfe573f..2883e5c58fab 100644 --- a/vendor/gopkg.in/yaml.v2/parserc.go +++ b/vendor/gopkg.in/yaml.v2/parserc.go @@ -170,7 +170,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -192,9 +193,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -277,8 +281,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -299,9 +303,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -332,30 +337,41 @@ func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -574,8 +590,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -627,7 +643,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -664,14 +681,14 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -723,13 +740,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -757,16 +772,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -825,11 +842,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -849,8 +865,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -873,8 +889,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -891,16 +907,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -965,8 +982,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/vendor/gopkg.in/yaml.v2/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go index 7c1f5fac3dbd..b0c436c4a84d 100644 --- a/vendor/gopkg.in/yaml.v2/readerc.go +++ b/vendor/gopkg.in/yaml.v2/readerc.go @@ -95,7 +95,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests + // for that to be the case, and there are tests // If the EOF flag is set and the raw buffer is empty, do nothing. if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { diff --git a/vendor/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go index 4120e0c9160a..e29c364b3399 100644 --- a/vendor/gopkg.in/yaml.v2/resolve.go +++ b/vendor/gopkg.in/yaml.v2/resolve.go @@ -180,7 +180,7 @@ func resolve(tag string, in string) (rtag string, out interface{}) { return yaml_INT_TAG, uintv } } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) + intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) if err == nil { if true || intv == int64(int(intv)) { return yaml_INT_TAG, int(intv) diff --git a/vendor/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go index 0b9bb6030a0f..d634dca4b04a 100644 --- a/vendor/gopkg.in/yaml.v2/scannerc.go +++ b/vendor/gopkg.in/yaml.v2/scannerc.go @@ -1500,11 +1500,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1601,11 +1601,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1640,8 +1640,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1679,10 +1680,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1716,9 +1718,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte diff --git a/vendor/gopkg.in/yaml.v2/sorter.go b/vendor/gopkg.in/yaml.v2/sorter.go index 4c45e660a8f2..2edd734055fb 100644 --- a/vendor/gopkg.in/yaml.v2/sorter.go +++ b/vendor/gopkg.in/yaml.v2/sorter.go @@ -52,7 +52,7 @@ func (l keyList) Less(i, j int) bool { var ai, bi int var an, bn int64 if ar[i] == '0' || br[i] == '0' { - for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 diff --git a/vendor/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go index 30813884c067..03756f6bbbc8 100644 --- a/vendor/gopkg.in/yaml.v2/yaml.go +++ b/vendor/gopkg.in/yaml.v2/yaml.go @@ -2,8 +2,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -67,16 +66,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -166,36 +164,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() diff --git a/vendor/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go index f6a9c8e34b1e..640f9d95de93 100644 --- a/vendor/gopkg.in/yaml.v2/yamlh.go +++ b/vendor/gopkg.in/yaml.v2/yamlh.go @@ -408,7 +408,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -604,13 +606,14 @@ type yaml_parser_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/vendor/gopkg.in/yaml.v3/apic.go b/vendor/gopkg.in/yaml.v3/apic.go index ae7d049f182a..05fd305da165 100644 --- a/vendor/gopkg.in/yaml.v3/apic.go +++ b/vendor/gopkg.in/yaml.v3/apic.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/vendor/gopkg.in/yaml.v3/emitterc.go b/vendor/gopkg.in/yaml.v3/emitterc.go index 0f47c9ca8add..dde20e5079dd 100644 --- a/vendor/gopkg.in/yaml.v3/emitterc.go +++ b/vendor/gopkg.in/yaml.v3/emitterc.go @@ -162,10 +162,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true @@ -241,7 +240,7 @@ func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool emitter.indent += 2 } else { // Everything else aligns to the chosen indentation. - emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) + emitter.indent = emitter.best_indent * ((emitter.indent + emitter.best_indent) / emitter.best_indent) } } return true diff --git a/vendor/gopkg.in/yaml.v3/parserc.go b/vendor/gopkg.in/yaml.v3/parserc.go index 268558a0d632..25fe823637ab 100644 --- a/vendor/gopkg.in/yaml.v3/parserc.go +++ b/vendor/gopkg.in/yaml.v3/parserc.go @@ -227,7 +227,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -249,9 +250,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -356,8 +360,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -379,9 +383,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -428,30 +433,41 @@ func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -682,8 +698,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -740,7 +756,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -805,14 +822,14 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -881,13 +898,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -915,16 +930,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -987,11 +1004,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1011,8 +1027,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1035,8 +1051,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1053,16 +1069,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -1128,8 +1145,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/vendor/gopkg.in/yaml.v3/readerc.go b/vendor/gopkg.in/yaml.v3/readerc.go index b7de0a89c462..56af245366f2 100644 --- a/vendor/gopkg.in/yaml.v3/readerc.go +++ b/vendor/gopkg.in/yaml.v3/readerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/vendor/gopkg.in/yaml.v3/scannerc.go b/vendor/gopkg.in/yaml.v3/scannerc.go index ca0070108f4e..30b1f08920a0 100644 --- a/vendor/gopkg.in/yaml.v3/scannerc.go +++ b/vendor/gopkg.in/yaml.v3/scannerc.go @@ -1614,11 +1614,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1719,11 +1719,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1758,8 +1758,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1797,10 +1798,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1834,9 +1836,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte @@ -2847,7 +2849,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t continue } if parser.buffer[parser.buffer_pos+peek] == '#' { - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false @@ -2876,7 +2878,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t parser.comments = append(parser.comments, yaml_comment_t{ token_mark: token_mark, start_mark: start_mark, - line: text, + line: text, }) } return true @@ -2910,7 +2912,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo // the foot is the line below it. var foot_line = -1 if scan_mark.line > 0 { - foot_line = parser.mark.line-parser.newlines+1 + foot_line = parser.mark.line - parser.newlines + 1 if parser.newlines == 0 && parser.mark.column > 1 { foot_line++ } @@ -2996,7 +2998,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo recent_empty = false // Consume until after the consumed comment line. - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false diff --git a/vendor/gopkg.in/yaml.v3/writerc.go b/vendor/gopkg.in/yaml.v3/writerc.go index b8a116bf9a22..266d0b092c03 100644 --- a/vendor/gopkg.in/yaml.v3/writerc.go +++ b/vendor/gopkg.in/yaml.v3/writerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/vendor/gopkg.in/yaml.v3/yaml.go b/vendor/gopkg.in/yaml.v3/yaml.go index 8cec6da48d3e..f0bedf3d63c9 100644 --- a/vendor/gopkg.in/yaml.v3/yaml.go +++ b/vendor/gopkg.in/yaml.v3/yaml.go @@ -17,8 +17,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -75,16 +74,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -185,36 +183,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() @@ -358,22 +355,21 @@ const ( // // For example: // -// var person struct { -// Name string -// Address yaml.Node -// } -// err := yaml.Unmarshal(data, &person) -// -// Or by itself: +// var person struct { +// Name string +// Address yaml.Node +// } +// err := yaml.Unmarshal(data, &person) // -// var person Node -// err := yaml.Unmarshal(data, &person) +// Or by itself: // +// var person Node +// err := yaml.Unmarshal(data, &person) type Node struct { // Kind defines whether the node is a document, a mapping, a sequence, // a scalar value, or an alias to another node. The specific data type of // scalar nodes may be obtained via the ShortTag and LongTag methods. - Kind Kind + Kind Kind // Style allows customizing the apperance of the node in the tree. Style Style @@ -421,7 +417,6 @@ func (n *Node) IsZero() bool { n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 } - // LongTag returns the long form of the tag that indicates the data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. diff --git a/vendor/gopkg.in/yaml.v3/yamlh.go b/vendor/gopkg.in/yaml.v3/yamlh.go index 7c6d00770619..ddcd5513ba77 100644 --- a/vendor/gopkg.in/yaml.v3/yamlh.go +++ b/vendor/gopkg.in/yaml.v3/yamlh.go @@ -438,7 +438,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -639,7 +641,6 @@ type yaml_parser_t struct { } type yaml_comment_t struct { - scan_mark yaml_mark_t // Position where scanning for comments started token_mark yaml_mark_t // Position after which tokens will be associated with this comment start_mark yaml_mark_t // Position of '#' comment mark @@ -659,13 +660,14 @@ type yaml_comment_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/vendor/gopkg.in/yaml.v3/yamlprivateh.go b/vendor/gopkg.in/yaml.v3/yamlprivateh.go index e88f9c54aecb..dea1ba9610df 100644 --- a/vendor/gopkg.in/yaml.v3/yamlprivateh.go +++ b/vendor/gopkg.in/yaml.v3/yamlprivateh.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -137,8 +137,8 @@ func is_crlf(b []byte, i int) bool { func is_breakz(b []byte, i int) bool { //return is_break(b, i) || is_z(b, i) return ( - // is_break: - b[i] == '\r' || // CR (#xD) + // is_break: + b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) @@ -151,8 +151,8 @@ func is_breakz(b []byte, i int) bool { func is_spacez(b []byte, i int) bool { //return is_space(b, i) || is_breakz(b, i) return ( - // is_space: - b[i] == ' ' || + // is_space: + b[i] == ' ' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) @@ -166,8 +166,8 @@ func is_spacez(b []byte, i int) bool { func is_blankz(b []byte, i int) bool { //return is_blank(b, i) || is_breakz(b, i) return ( - // is_blank: - b[i] == ' ' || b[i] == '\t' || + // is_blank: + b[i] == ' ' || b[i] == '\t' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go index 5b8514b3fab2..e38605df9237 100644 --- a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go +++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go @@ -359,8 +359,9 @@ const ( // 4) simpleLetterEqualFold, no specials, no non-letters. // // The letters S and K are special because they map to 3 runes, not just 2: -// * S maps to s and to U+017F 'ſ' Latin small letter long s -// * k maps to K and to U+212A 'K' Kelvin sign +// - S maps to s and to U+017F 'ſ' Latin small letter long s +// - k maps to K and to U+212A 'K' Kelvin sign +// // See http://play.golang.org/p/tTxjOc0OGo // // The returned function is specialized for matching against s and diff --git a/vendor/k8s.io/client-go/third_party/forked/golang/template/exec.go b/vendor/k8s.io/client-go/third_party/forked/golang/template/exec.go index 7cf29524cedc..ed66f8401096 100644 --- a/vendor/k8s.io/client-go/third_party/forked/golang/template/exec.go +++ b/vendor/k8s.io/client-go/third_party/forked/golang/template/exec.go @@ -1,6 +1,6 @@ -//This package is copied from Go library text/template. -//The original private functions indirect and printableValue -//are exported as public functions. +// This package is copied from Go library text/template. +// The original private functions indirect and printableValue +// are exported as public functions. package template import ( diff --git a/vendor/k8s.io/client-go/third_party/forked/golang/template/funcs.go b/vendor/k8s.io/client-go/third_party/forked/golang/template/funcs.go index f0c8e712cab3..94c396c657a7 100644 --- a/vendor/k8s.io/client-go/third_party/forked/golang/template/funcs.go +++ b/vendor/k8s.io/client-go/third_party/forked/golang/template/funcs.go @@ -1,6 +1,6 @@ -//This package is copied from Go library text/template. -//The original private functions eq, ge, gt, le, lt, and ne -//are exported as public functions. +// This package is copied from Go library text/template. +// The original private functions eq, ge, gt, le, lt, and ne +// are exported as public functions. package template import ( diff --git a/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go b/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go index 67957ee33e9c..8c05c8efcaea 100644 --- a/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go +++ b/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go @@ -1,6 +1,6 @@ -//This package is copied from Go library reflect/type.go. -//The struct tag library provides no way to extract the list of struct tags, only -//a specific tag +// This package is copied from Go library reflect/type.go. +// The struct tag library provides no way to extract the list of struct tags, only +// a specific tag package reflect import ( diff --git a/vendor/layeh.com/gopher-json/doc.go b/vendor/layeh.com/gopher-json/doc.go index ecc915dfdcb5..5d0c2e89ef2f 100644 --- a/vendor/layeh.com/gopher-json/doc.go +++ b/vendor/layeh.com/gopher-json/doc.go @@ -1,33 +1,35 @@ // Package json is a simple JSON encoder/decoder for gopher-lua. // -// Documentation +// # Documentation // // The following functions are exposed by the library: -// decode(string): Decodes a JSON string. Returns nil and an error string if -// the string could not be decoded. -// encode(value): Encodes a value into a JSON string. Returns nil and an error -// string if the value could not be encoded. +// +// decode(string): Decodes a JSON string. Returns nil and an error string if +// the string could not be decoded. +// encode(value): Encodes a value into a JSON string. Returns nil and an error +// string if the value could not be encoded. // // The following types are supported: // -// Lua | JSON -// ---------+----- -// nil | null -// number | number -// string | string -// table | object: when table is non-empty and has only string keys -// | array: when table is empty, or has only sequential numeric keys -// | starting from 1 +// Lua | JSON +// ---------+----- +// nil | null +// number | number +// string | string +// table | object: when table is non-empty and has only string keys +// | array: when table is empty, or has only sequential numeric keys +// | starting from 1 // // Attempting to encode any other Lua type will result in an error. // -// Example +// # Example // // Below is an example usage of the library: -// import ( -// luajson "layeh.com/gopher-json" -// ) // -// L := lua.NewState() -// luajson.Preload(L) +// import ( +// luajson "layeh.com/gopher-json" +// ) +// +// L := lua.NewState() +// luajson.Preload(L) package json // import "layeh.com/gopher-json" diff --git a/vendor/layeh.com/gopher-json/json.go b/vendor/layeh.com/gopher-json/json.go index c34af2d31645..cc38cced5398 100644 --- a/vendor/layeh.com/gopher-json/json.go +++ b/vendor/layeh.com/gopher-json/json.go @@ -10,7 +10,7 @@ import ( // Preload adds json to the given Lua state's package.preload table. After it // has been preloaded, it can be loaded using require: // -// local json = require("json") +// local json = require("json") func Preload(L *lua.LState) { L.PreloadModule("json", Loader) } diff --git a/vendor/sigs.k8s.io/kustomize/api/filters/namespace/namespace.go b/vendor/sigs.k8s.io/kustomize/api/filters/namespace/namespace.go index 9279abb9d4c4..6d114f95bdf9 100644 --- a/vendor/sigs.k8s.io/kustomize/api/filters/namespace/namespace.go +++ b/vendor/sigs.k8s.io/kustomize/api/filters/namespace/namespace.go @@ -119,10 +119,10 @@ func (ns Filter) metaNamespaceHack(obj *yaml.RNode, gvk resid.Gvk) error { // // kind: RoleBinding // subjects: -// - name: "default" # this will have the namespace set -// ... -// - name: "something-else" # this will not have the namespace set -// ... +// - name: "default" # this will have the namespace set +// ... +// - name: "something-else" # this will not have the namespace set +// ... func (ns Filter) roleBindingHack(obj *yaml.RNode) error { var visitor filtersutil.SetFn switch ns.SetRoleBindingSubjects { diff --git a/vendor/sigs.k8s.io/kustomize/api/filters/valueadd/valueadd.go b/vendor/sigs.k8s.io/kustomize/api/filters/valueadd/valueadd.go index f8e6b2f82610..598e99bbb542 100644 --- a/vendor/sigs.k8s.io/kustomize/api/filters/valueadd/valueadd.go +++ b/vendor/sigs.k8s.io/kustomize/api/filters/valueadd/valueadd.go @@ -19,25 +19,25 @@ import ( // // - Non-existent target field. // -// The field will be added and the value inserted. +// The field will be added and the value inserted. // // - Existing field, scalar or map. // -// E.g. 'spec/template/spec/containers/[name:nginx]/image' +// E.g. 'spec/template/spec/containers/[name:nginx]/image' // -// This behaves like an IETF RFC 6902 Replace operation would; -// the existing value is replaced without complaint, even though -// this is an Add operation. In contrast, a Replace operation -// must fail (report an error) if the field doesn't exist. +// This behaves like an IETF RFC 6902 Replace operation would; +// the existing value is replaced without complaint, even though +// this is an Add operation. In contrast, a Replace operation +// must fail (report an error) if the field doesn't exist. // -// - Existing field, list (array) -// Not supported yet. -// TODO: Honor fields with RFC-6902-style array indices -// TODO: like 'spec/template/spec/containers/2' -// TODO: Modify kyaml/yaml/PathGetter to allow this. -// The value will be inserted into the array at the given position, -// shifting other contents. To instead replace an array entry, use -// an implementation of an IETF RFC 6902 Replace operation. +// - Existing field, list (array) +// Not supported yet. +// TODO: Honor fields with RFC-6902-style array indices +// TODO: like 'spec/template/spec/containers/2' +// TODO: Modify kyaml/yaml/PathGetter to allow this. +// The value will be inserted into the array at the given position, +// shifting other contents. To instead replace an array entry, use +// an implementation of an IETF RFC 6902 Replace operation. // // For the common case of a filepath in the field value, and a desire // to add the value to the filepath (rather than replace the filepath), diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/accumulator/namereferencetransformer.go b/vendor/sigs.k8s.io/kustomize/api/internal/accumulator/namereferencetransformer.go index f8f12b4f2b8c..f00b537f7275 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/accumulator/namereferencetransformer.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/accumulator/namereferencetransformer.go @@ -47,7 +47,6 @@ func newNameReferenceTransformer( // // If the Deployment's name changes, e.g. a prefix is added, // then the HPA's reference to the Deployment must be fixed. -// func (t *nameReferenceTransformer) Transform(m resmap.ResMap) error { fMap := t.determineFilters(m.Resources()) debug(fMap) @@ -101,8 +100,8 @@ func debug(fMap filterMap) { // // - kind: Deployment // fieldSpecs: -// - kind: HorizontalPodAutoscaler -// path: spec/scaleTargetRef/name +// - kind: HorizontalPodAutoscaler +// path: spec/scaleTargetRef/name // // This entry says that an HPA, via its // 'spec/scaleTargetRef/name' field, may refer to a @@ -152,7 +151,9 @@ func (t *nameReferenceTransformer) determineFilters( // how to parse fieldspec-style paths that make no distinction // between maps and sequences. This means it cannot lookup commonly // used "indeterminate" paths like -// spec/containers/env/valueFrom/configMapKeyRef/name +// +// spec/containers/env/valueFrom/configMapKeyRef/name +// // ('containers' is a list, not a map). // However, the fieldspec filter does know how to handle this; // extract that code and call it here? diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/namebackreferences.go b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/namebackreferences.go index 36ef42c27250..84cd87f77f34 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/namebackreferences.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/namebackreferences.go @@ -24,24 +24,25 @@ import ( // // If the name of a ConfigMap instance changed from 'alice' to 'bob', // one must -// - visit all objects that could refer to the ConfigMap (the Referrers) -// - see if they mention 'alice', -// - if so, change the Referrer's name reference to 'bob'. +// - visit all objects that could refer to the ConfigMap (the Referrers) +// - see if they mention 'alice', +// - if so, change the Referrer's name reference to 'bob'. // // The NameBackReferences instance to aid in this could look like -// { -// kind: ConfigMap -// version: v1 -// fieldSpecs: -// - kind: Pod -// version: v1 -// path: spec/volumes/configMap/name -// - kind: Deployment -// path: spec/template/spec/volumes/configMap/name -// - kind: Job -// path: spec/template/spec/volumes/configMap/name -// (etc.) -// } +// +// { +// kind: ConfigMap +// version: v1 +// fieldSpecs: +// - kind: Pod +// version: v1 +// path: spec/volumes/configMap/name +// - kind: Deployment +// path: spec/template/spec/volumes/configMap/name +// - kind: Job +// path: spec/template/spec/volumes/configMap/name +// (etc.) +// } type NameBackReferences struct { resid.Gvk `json:",inline,omitempty" yaml:",inline,omitempty"` // TODO: rename json 'fieldSpecs' to 'referrers' for clarity. diff --git a/vendor/sigs.k8s.io/kustomize/api/internal/validate/fieldvalidator.go b/vendor/sigs.k8s.io/kustomize/api/internal/validate/fieldvalidator.go index 5ccfc3ce7b4f..73a6620371d2 100644 --- a/vendor/sigs.k8s.io/kustomize/api/internal/validate/fieldvalidator.go +++ b/vendor/sigs.k8s.io/kustomize/api/internal/validate/fieldvalidator.go @@ -12,8 +12,9 @@ import ( // e.g. labels, annotations, names, namespaces. // // TODO: Have this use kyaml/yaml/internal/k8sgen/pkg/labels -// which has label and annotation validation code, but is internal -// so this impl would need to move to kyaml (a fine idea). +// +// which has label and annotation validation code, but is internal +// so this impl would need to move to kyaml (a fine idea). type FieldValidator struct { } diff --git a/vendor/sigs.k8s.io/kustomize/api/loader/fileloader.go b/vendor/sigs.k8s.io/kustomize/api/loader/fileloader.go index 672ca29b3c26..d24a1a3d4e82 100644 --- a/vendor/sigs.k8s.io/kustomize/api/loader/fileloader.go +++ b/vendor/sigs.k8s.io/kustomize/api/loader/fileloader.go @@ -38,45 +38,44 @@ func IsRemoteFile(path string) bool { // // * supplemental data paths // -// `Load` is used to visit these paths. +// `Load` is used to visit these paths. // -// These paths refer to resources, patches, -// data for ConfigMaps and Secrets, etc. +// These paths refer to resources, patches, +// data for ConfigMaps and Secrets, etc. // -// The loadRestrictor may disallow certain paths -// or classes of paths. +// The loadRestrictor may disallow certain paths +// or classes of paths. // // * bases (other kustomizations) // -// `New` is used to load bases. +// `New` is used to load bases. // -// A base can be either a remote git repo URL, or -// a directory specified relative to the current -// root. In the former case, the repo is locally -// cloned, and the new loader is rooted on a path -// in that clone. +// A base can be either a remote git repo URL, or +// a directory specified relative to the current +// root. In the former case, the repo is locally +// cloned, and the new loader is rooted on a path +// in that clone. // -// As loaders create new loaders, a root history -// is established, and used to disallow: +// As loaders create new loaders, a root history +// is established, and used to disallow: // -// - A base that is a repository that, in turn, -// specifies a base repository seen previously -// in the loading stack (a cycle). +// - A base that is a repository that, in turn, +// specifies a base repository seen previously +// in the loading stack (a cycle). // -// - An overlay depending on a base positioned at -// or above it. I.e. '../foo' is OK, but '.', -// '..', '../..', etc. are disallowed. Allowing -// such a base has no advantages and encourages -// cycles, particularly if some future change -// were to introduce globbing to file -// specifications in the kustomization file. +// - An overlay depending on a base positioned at +// or above it. I.e. '../foo' is OK, but '.', +// '..', '../..', etc. are disallowed. Allowing +// such a base has no advantages and encourages +// cycles, particularly if some future change +// were to introduce globbing to file +// specifications in the kustomization file. // // These restrictions assure that kustomizations // are self-contained and relocatable, and impose // some safety when relying on remote kustomizations, // e.g. a remotely loaded ConfigMap generator specified // to read from /etc/passwd will fail. -// type fileLoader struct { // Loader that spawned this loader. // Used to avoid cycles. diff --git a/vendor/sigs.k8s.io/kustomize/api/resource/resource.go b/vendor/sigs.k8s.io/kustomize/api/resource/resource.go index ae1a98be0ef4..102e976b286e 100644 --- a/vendor/sigs.k8s.io/kustomize/api/resource/resource.go +++ b/vendor/sigs.k8s.io/kustomize/api/resource/resource.go @@ -157,7 +157,9 @@ func (r *Resource) DeepCopy() *Resource { // the resource. // TODO: move to RNode, use GetMeta to improve performance. // TODO: make a version of mergeStringMaps that is build-annotation aware -// to avoid repeatedly setting refby and genargs annotations +// +// to avoid repeatedly setting refby and genargs annotations +// // Must remove the kustomize bit at the end. func (r *Resource) CopyMergeMetaDataFieldsFrom(other *Resource) error { if err := r.SetLabels( diff --git a/vendor/sigs.k8s.io/kustomize/api/types/fieldspec.go b/vendor/sigs.k8s.io/kustomize/api/types/fieldspec.go index 8d3579544791..3542168859f1 100644 --- a/vendor/sigs.k8s.io/kustomize/api/types/fieldspec.go +++ b/vendor/sigs.k8s.io/kustomize/api/types/fieldspec.go @@ -20,12 +20,13 @@ import ( // field path doesn't exist already. // // This would look like -// { -// group: apps -// kind: Deployment -// path: spec/template/metadata/labels -// create: true -// } +// +// { +// group: apps +// kind: Deployment +// path: spec/template/metadata/labels +// create: true +// } type FieldSpec struct { resid.Gvk `json:",inline,omitempty" yaml:",inline,omitempty"` Path string `json:"path,omitempty" yaml:"path,omitempty"` diff --git a/vendor/sigs.k8s.io/kustomize/api/types/pluginrestrictions.go b/vendor/sigs.k8s.io/kustomize/api/types/pluginrestrictions.go index 88b03b3f5bd6..072f484c91cb 100644 --- a/vendor/sigs.k8s.io/kustomize/api/types/pluginrestrictions.go +++ b/vendor/sigs.k8s.io/kustomize/api/types/pluginrestrictions.go @@ -4,15 +4,15 @@ package types // Some plugin classes -// - builtin: plugins defined in the kustomize repo. -// May be freely used and re-configured. -// - local: plugins that aren't builtin but are -// locally defined (presumably by the user), meaning -// the kustomization refers to them via a relative -// file path, not a URL. -// - remote: require a build-time download to obtain. -// Unadvised, unless one controls the -// serving site. +// - builtin: plugins defined in the kustomize repo. +// May be freely used and re-configured. +// - local: plugins that aren't builtin but are +// locally defined (presumably by the user), meaning +// the kustomization refers to them via a relative +// file path, not a URL. +// - remote: require a build-time download to obtain. +// Unadvised, unless one controls the +// serving site. // //go:generate stringer -type=PluginRestrictions type PluginRestrictions int @@ -28,6 +28,7 @@ const ( ) // BuiltinPluginLoadingOptions distinguish ways in which builtin plugins are used. +// //go:generate stringer -type=BuiltinPluginLoadingOptions type BuiltinPluginLoadingOptions int diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/filesys/confirmeddir.go b/vendor/sigs.k8s.io/kustomize/kyaml/filesys/confirmeddir.go index ea6eff90ba9f..354f5a73271c 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/filesys/confirmeddir.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/filesys/confirmeddir.go @@ -41,14 +41,14 @@ func NewTmpConfirmedDir() (ConfirmedDir, error) { // HasPrefix emulates the semantics of strings.HasPrefix // such that the following are true: // -// strings.HasPrefix("foobar", "foobar") -// strings.HasPrefix("foobar", "foo") -// strings.HasPrefix("foobar", "") +// strings.HasPrefix("foobar", "foobar") +// strings.HasPrefix("foobar", "foo") +// strings.HasPrefix("foobar", "") // -// d := fSys.ConfirmDir("/foo/bar") -// d.HasPrefix("/foo/bar") -// d.HasPrefix("/foo") -// d.HasPrefix("/") +// d := fSys.ConfirmDir("/foo/bar") +// d.HasPrefix("/foo/bar") +// d.HasPrefix("/foo") +// d.HasPrefix("/") // // Not contacting a file system here to check for // actual path existence. @@ -57,10 +57,11 @@ func NewTmpConfirmedDir() (ConfirmedDir, error) { // on other operating systems. // TODO(monopole) Refactor when #golang/go/18358 closes. // See also: -// https://github.com/golang/go/issues/18358 -// https://github.com/golang/dep/issues/296 -// https://github.com/golang/dep/blob/master/internal/fs/fs.go#L33 -// https://codereview.appspot.com/5712045 +// +// https://github.com/golang/go/issues/18358 +// https://github.com/golang/dep/issues/296 +// https://github.com/golang/dep/blob/master/internal/fs/fs.go#L33 +// https://codereview.appspot.com/5712045 func (d ConfirmedDir) HasPrefix(path ConfirmedDir) bool { if path.String() == string(filepath.Separator) || path == d { return true diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/fn/runtime/container/container.go b/vendor/sigs.k8s.io/kustomize/kyaml/fn/runtime/container/container.go index 76b51a8c50c3..adfd4bc22d03 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/fn/runtime/container/container.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/fn/runtime/container/container.go @@ -27,57 +27,62 @@ import ( // Filter applies the function only to Resources to which it is scoped. // // Resources are scoped to a function if any of the following are true: -// - the Resource were read from the same directory as the function config -// - the Resource were read from a subdirectory of the function config directory -// - the function config is in a directory named "functions" and -// they were read from a subdirectory of "functions" parent -// - the function config doesn't have a path annotation (considered globally scoped) -// - the Filter has GlobalScope == true +// - the Resource were read from the same directory as the function config +// - the Resource were read from a subdirectory of the function config directory +// - the function config is in a directory named "functions" and +// they were read from a subdirectory of "functions" parent +// - the function config doesn't have a path annotation (considered globally scoped) +// - the Filter has GlobalScope == true // // In Scope Examples: // // Example 1: deployment.yaml and service.yaml in function.yaml scope -// same directory as the function config directory -// . -// ├── function.yaml -// ├── deployment.yaml -// └── service.yaml +// +// same directory as the function config directory +// . +// ├── function.yaml +// ├── deployment.yaml +// └── service.yaml // // Example 2: apps/deployment.yaml and apps/service.yaml in function.yaml scope -// subdirectory of the function config directory -// . -// ├── function.yaml -// └── apps -//    ├── deployment.yaml -//    └── service.yaml +// +// subdirectory of the function config directory +// . +// ├── function.yaml +// └── apps +//    ├── deployment.yaml +//    └── service.yaml // // Example 3: apps/deployment.yaml and apps/service.yaml in functions/function.yaml scope -// function config is in a directory named "functions" -// . -// ├── functions -// │   └── function.yaml -// └── apps -//    ├── deployment.yaml -//    └── service.yaml +// +// function config is in a directory named "functions" +// . +// ├── functions +// │   └── function.yaml +// └── apps +//    ├── deployment.yaml +//    └── service.yaml // // Out of Scope Examples: // // Example 1: apps/deployment.yaml and apps/service.yaml NOT in stuff/function.yaml scope -// . -// ├── stuff -// │   └── function.yaml -// └── apps -//    ├── deployment.yaml -//    └── service.yaml +// +// . +// ├── stuff +// │   └── function.yaml +// └── apps +//    ├── deployment.yaml +//    └── service.yaml // // Example 2: apps/deployment.yaml and apps/service.yaml NOT in stuff/functions/function.yaml scope -// . -// ├── stuff -// │   └── functions -// │    └── function.yaml -// └── apps -//    ├── deployment.yaml -//    └── service.yaml +// +// . +// ├── stuff +// │   └── functions +// │    └── function.yaml +// └── apps +//    ├── deployment.yaml +//    └── service.yaml // // Default Paths: // Resources emitted by functions will have default path applied as annotations @@ -86,42 +91,45 @@ import ( // + function-file-name/ + namespace/ + kind_name.yaml // // Example 1: Given a function in fn.yaml that produces a Deployment name foo and a Service named bar -// dir -// └── fn.yaml +// +// dir +// └── fn.yaml // // Would default newly generated Resources to: // -// dir -// ├── fn.yaml -// └── fn -//    ├── deployment_foo.yaml -//    └── service_bar.yaml +// dir +// ├── fn.yaml +// └── fn +//    ├── deployment_foo.yaml +//    └── service_bar.yaml // // Example 2: Given a function in functions/fn.yaml that produces a Deployment name foo and a Service named bar -// dir -// └── fn.yaml +// +// dir +// └── fn.yaml // // Would default newly generated Resources to: // -// dir -// ├── functions -// │   └── fn.yaml -// └── fn -//    ├── deployment_foo.yaml -//    └── service_bar.yaml +// dir +// ├── functions +// │   └── fn.yaml +// └── fn +//    ├── deployment_foo.yaml +//    └── service_bar.yaml // // Example 3: Given a function in fn.yaml that produces a Deployment name foo, namespace baz and a Service named bar namespace baz -// dir -// └── fn.yaml +// +// dir +// └── fn.yaml // // Would default newly generated Resources to: // -// dir -// ├── fn.yaml -// └── fn -// └── baz -//    ├── deployment_foo.yaml -//    └── service_bar.yaml +// dir +// ├── fn.yaml +// └── fn +// └── baz +//    ├── deployment_foo.yaml +//    └── service_bar.yaml type Filter struct { runtimeutil.ContainerSpec `json:",inline" yaml:",inline"` diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/apic.go b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/apic.go index ae7d049f182a..05fd305da165 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/apic.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/apic.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/emitterc.go b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/emitterc.go index f0f3d1867f7f..90cb7d88a448 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/emitterc.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/emitterc.go @@ -162,10 +162,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true @@ -241,7 +240,7 @@ func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool emitter.indent += 2 } else { // Everything else aligns to the chosen indentation. - emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) + emitter.indent = emitter.best_indent * ((emitter.indent + emitter.best_indent) / emitter.best_indent) } if compact_seq { emitter.indent = emitter.indent - 2 @@ -733,7 +732,7 @@ func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_ if first { seq := emitter.mapping_context && (emitter.column == 0 || !emitter.indention) && emitter.compact_sequence_indent - if !yaml_emitter_increase_indent(emitter, false, false, seq){ + if !yaml_emitter_increase_indent(emitter, false, false, seq) { return false } } diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/parserc.go b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/parserc.go index 268558a0d632..25fe823637ab 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/parserc.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/parserc.go @@ -227,7 +227,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -249,9 +250,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -356,8 +360,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -379,9 +383,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -428,30 +433,41 @@ func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -682,8 +698,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -740,7 +756,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -805,14 +822,14 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -881,13 +898,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -915,16 +930,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -987,11 +1004,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1011,8 +1027,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1035,8 +1051,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1053,16 +1069,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -1128,8 +1145,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/readerc.go b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/readerc.go index b7de0a89c462..56af245366f2 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/readerc.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/readerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/scannerc.go b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/scannerc.go index ca0070108f4e..30b1f08920a0 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/scannerc.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/scannerc.go @@ -1614,11 +1614,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1719,11 +1719,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1758,8 +1758,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1797,10 +1798,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1834,9 +1836,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte @@ -2847,7 +2849,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t continue } if parser.buffer[parser.buffer_pos+peek] == '#' { - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false @@ -2876,7 +2878,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t parser.comments = append(parser.comments, yaml_comment_t{ token_mark: token_mark, start_mark: start_mark, - line: text, + line: text, }) } return true @@ -2910,7 +2912,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo // the foot is the line below it. var foot_line = -1 if scan_mark.line > 0 { - foot_line = parser.mark.line-parser.newlines+1 + foot_line = parser.mark.line - parser.newlines + 1 if parser.newlines == 0 && parser.mark.column > 1 { foot_line++ } @@ -2996,7 +2998,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo recent_empty = false // Consume until after the consumed comment line. - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/writerc.go b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/writerc.go index b8a116bf9a22..266d0b092c03 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/writerc.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/writerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yaml.go b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yaml.go index bb6418dba323..88b86bd92974 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yaml.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yaml.go @@ -17,8 +17,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -75,16 +74,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -185,36 +183,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() @@ -368,22 +365,21 @@ const ( // // For example: // -// var person struct { -// Name string -// Address yaml.Node -// } -// err := yaml.Unmarshal(data, &person) -// -// Or by itself: +// var person struct { +// Name string +// Address yaml.Node +// } +// err := yaml.Unmarshal(data, &person) // -// var person Node -// err := yaml.Unmarshal(data, &person) +// Or by itself: // +// var person Node +// err := yaml.Unmarshal(data, &person) type Node struct { // Kind defines whether the node is a document, a mapping, a sequence, // a scalar value, or an alias to another node. The specific data type of // scalar nodes may be obtained via the ShortTag and LongTag methods. - Kind Kind + Kind Kind // Style allows customizing the apperance of the node in the tree. Style Style @@ -431,7 +427,6 @@ func (n *Node) IsZero() bool { n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 } - // LongTag returns the long form of the tag that indicates the data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlh.go b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlh.go index 40c74de49787..f59aa40f6401 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlh.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlh.go @@ -438,7 +438,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -639,7 +641,6 @@ type yaml_parser_t struct { } type yaml_comment_t struct { - scan_mark yaml_mark_t // Position where scanning for comments started token_mark yaml_mark_t // Position after which tokens will be associated with this comment start_mark yaml_mark_t // Position of '#' comment mark @@ -659,13 +660,14 @@ type yaml_comment_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlprivateh.go b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlprivateh.go index e88f9c54aecb..dea1ba9610df 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlprivateh.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/yamlprivateh.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -137,8 +137,8 @@ func is_crlf(b []byte, i int) bool { func is_breakz(b []byte, i int) bool { //return is_break(b, i) || is_z(b, i) return ( - // is_break: - b[i] == '\r' || // CR (#xD) + // is_break: + b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) @@ -151,8 +151,8 @@ func is_breakz(b []byte, i int) bool { func is_spacez(b []byte, i int) bool { //return is_space(b, i) || is_breakz(b, i) return ( - // is_space: - b[i] == ' ' || + // is_space: + b[i] == ' ' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) @@ -166,8 +166,8 @@ func is_spacez(b []byte, i int) bool { func is_blankz(b []byte, i int) bool { //return is_blank(b, i) || is_breakz(b, i) return ( - // is_blank: - b[i] == ' ' || b[i] == '\t' || + // is_blank: + b[i] == ' ' || b[i] == '\t' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/kio/byteio_writer.go b/vendor/sigs.k8s.io/kustomize/kyaml/kio/byteio_writer.go index ec4cafe303df..dcd03f000668 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/kio/byteio_writer.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/kio/byteio_writer.go @@ -166,13 +166,16 @@ func copyRNodes(in []*yaml.RNode) []*yaml.RNode { // shouldJSONEncodeSingleBareNode determines if nodes contain a single node that should not be // wrapped and has a JSON file extension, which in turn means that the node should be JSON encoded. // Note 1: this must be checked before any annotations to avoid losing information about the target -// filename extension. +// +// filename extension. +// // Note 2: JSON encoding should only be used for single, unwrapped nodes because multiple unwrapped -// nodes cannot be represented in JSON (no multi doc support). Furthermore, the typical use -// cases for wrapping nodes would likely not include later writing the whole wrapper to a -// .json file, i.e. there is no point risking any edge case information loss e.g. comments -// disappearing, that could come from JSON encoding the whole wrapper just to ensure that -// one (or all nodes) can be read as JSON. +// +// nodes cannot be represented in JSON (no multi doc support). Furthermore, the typical use +// cases for wrapping nodes would likely not include later writing the whole wrapper to a +// .json file, i.e. there is no point risking any edge case information loss e.g. comments +// disappearing, that could come from JSON encoding the whole wrapper just to ensure that +// one (or all nodes) can be read as JSON. func (w ByteWriter) shouldJSONEncodeSingleBareNode(nodes []*yaml.RNode) bool { if w.WrappingKind == "" && len(nodes) == 1 { if path, _, _ := kioutil.GetFileAnnotations(nodes[0]); path != "" { diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/kio/doc.go b/vendor/sigs.k8s.io/kustomize/kyaml/kio/doc.go index 9c11a14630f7..82f9a5e03495 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/kio/doc.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/kio/doc.go @@ -3,31 +3,33 @@ // Package kio contains libraries for reading and writing collections of Resources. // -// Reading Resources +// # Reading Resources // // Resources are Read using a kio.Reader function. Examples: -// [kio.LocalPackageReader{}, kio.ByteReader{}] +// +// [kio.LocalPackageReader{}, kio.ByteReader{}] // // Resources read using a LocalPackageReader will have annotations applied so they can be // written back to the files they were read from. // -// Modifying Resources +// # Modifying Resources // // Resources are modified using a kio.Filter. The kio.Filter accepts a collection of // Resources as input, and returns a new collection as output. // It is recommended to use the yaml package for manipulating individual Resources in // the collection. // -// Writing Resources +// # Writing Resources // // Resources are Read using a kio.Reader function. Examples: -// [kio.LocalPackageWriter{}, kio.ByteWriter{}] // -// ReadWriters +// [kio.LocalPackageWriter{}, kio.ByteWriter{}] +// +// # ReadWriters // // It is preferred to use a ReadWriter when reading and writing from / to the same source. // -// Building Pipelines +// # Building Pipelines // // The preferred way to transforms a collection of Resources is to use kio.Pipeline to Read, // Modify and Write the collection of Resources. Pipeline will automatically sequentially diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/kio/ignorefilesmatcher.go b/vendor/sigs.k8s.io/kustomize/kyaml/kio/ignorefilesmatcher.go index 0ba3d8382159..18575148fee5 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/kio/ignorefilesmatcher.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/kio/ignorefilesmatcher.go @@ -22,16 +22,16 @@ import ( // // It works as follows: // -// * It will look for .krmignore file in the top folder and on the top level -// of any subpackages. Subpackages are defined by the presence of a Krmfile -// in the folder. -// * `.krmignore` files only cover files and folders for the package in which -// it is defined. So ignore patterns defined in a parent package does not -// affect which files are ignored from a subpackage. -// * An ignore pattern can not ignore a subpackage. So even if the parent -// package contains a pattern that ignores the directory foo, if foo is a -// subpackage, it will still be included if the IncludeSubpackages property -// is set to true +// - It will look for .krmignore file in the top folder and on the top level +// of any subpackages. Subpackages are defined by the presence of a Krmfile +// in the folder. +// - `.krmignore` files only cover files and folders for the package in which +// it is defined. So ignore patterns defined in a parent package does not +// affect which files are ignored from a subpackage. +// - An ignore pattern can not ignore a subpackage. So even if the parent +// package contains a pattern that ignores the directory foo, if foo is a +// subpackage, it will still be included if the IncludeSubpackages property +// is set to true type ignoreFilesMatcher struct { matchers []matcher fs filesys.FileSystemOrOnDisk diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/kio/tree.go b/vendor/sigs.k8s.io/kustomize/kyaml/kio/tree.go index a14181578eeb..87ff9a353601 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/kio/tree.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/kio/tree.go @@ -32,7 +32,8 @@ var GraphStructures = []string{string(TreeStructureGraph), string(TreeStructureP // TreeWriter prints the package structured as a tree. // TODO(pwittrock): test this package better. it is lower-risk since it is only -// used for printing rather than updating or editing. +// +// used for printing rather than updating or editing. type TreeWriter struct { Writer io.Writer Root string diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/v1_21_2/swagger.go b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/v1_21_2/swagger.go index b599e539a516..6d3299e7aba9 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/v1_21_2/swagger.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/v1_21_2/swagger.go @@ -1,6 +1,6 @@ // Code generated by go-bindata. (@generated) DO NOT EDIT. - //Package v1_21_2 generated by go-bindata.// sources: +//Package v1_21_2 generated by go-bindata.// sources: // kubernetesapi/v1_21_2/swagger.pb package v1_21_2 @@ -157,11 +157,13 @@ var _bindata = map[string]func() (*asset, error){ // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png +// +// data/ +// foo.txt +// img/ +// a.png +// b.png +// // then AssetDir("data") would return []string{"foo.txt", "img"} // AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("foo.txt") and AssetDir("notexist") would return an error diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kustomizationapi/swagger.go b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kustomizationapi/swagger.go index 49647be4b9ea..e6daede77fe6 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kustomizationapi/swagger.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kustomizationapi/swagger.go @@ -158,11 +158,13 @@ var _bindata = map[string]func() (*asset, error){ // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png +// +// data/ +// foo.txt +// img/ +// a.png +// b.png +// // then AssetDir("data") would return []string{"foo.txt", "img"} // AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("foo.txt") and AssetDir("notexist") would return an error diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/resid/gvk.go b/vendor/sigs.k8s.io/kustomize/kyaml/resid/gvk.go index 0289cadd7830..6ff070b61f45 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/resid/gvk.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/resid/gvk.go @@ -210,14 +210,16 @@ func (x Gvk) IsLessThan(o Gvk) bool { // anything in the corresponding fields, e.g. // // this item: -// +// +// // // is selected by -// +// +// // // but rejected by -// // +// func (x Gvk) IsSelected(selector *Gvk) bool { if selector == nil { return true diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/doc.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/doc.go index b58811cf8b4d..c34ed804d614 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/doc.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/doc.go @@ -4,46 +4,54 @@ // Package yaml contains libraries for manipulating individual Kubernetes Resource // Configuration as yaml, keeping yaml structure and comments. // -// Parsing Resources +// # Parsing Resources // // Typically Resources will be initialized as collections through the kio package libraries. // However it is possible to directly initialize Resources using Parse. -// resource, err := yaml.Parse("apiVersion: apps/v1\nkind: Deployment") // -// Processing Resources +// resource, err := yaml.Parse("apiVersion: apps/v1\nkind: Deployment") +// +// # Processing Resources // // Individual Resources are manipulated using the Pipe and PipeE to apply Filter functions // to transform the Resource data. -// err := resource.PipeE(yaml.SetAnnotation("key", "value")) +// +// err := resource.PipeE(yaml.SetAnnotation("key", "value")) // // If multiple Filter functions are provided to Pipe or PipeE, each function is applied to // the result of the last function -- e.g. yaml.Lookup(...), yaml.SetField(...) // // Field values may also be retrieved using Pipe. -// annotationValue, err := resource.Pipe(yaml.GetAnnotation("key")) +// +// annotationValue, err := resource.Pipe(yaml.GetAnnotation("key")) // // See http://www.linfo.org/filters.html for a definition of filters. // -// Common Filters +// # Common Filters // // There are a number of standard filter functions provided by the yaml package. // // Working with annotations: -// [AnnotationSetter{}, AnnotationGetter{}, AnnotationClearer{}] +// +// [AnnotationSetter{}, AnnotationGetter{}, AnnotationClearer{}] // // Working with fields by path: -// [PathMatcher{}, PathGetter{}] +// +// [PathMatcher{}, PathGetter{}] // // Working with individual fields on Maps and Objects: -// [FieldMatcher{}, FieldSetter{}, FieldGetter{}] +// +// [FieldMatcher{}, FieldSetter{}, FieldGetter{}] // // Working with individual elements in Sequences: -// [ElementAppender{}, ElementSetter{}, ElementMatcher{}] // -// Writing Filters +// [ElementAppender{}, ElementSetter{}, ElementMatcher{}] +// +// # Writing Filters // // Users may implement their own filter functions. When doing so, can be necessary to work with // the RNode directly rather than through Pipe. RNode provides a number of functions for doing // so. See: -// [GetMeta(), Fields(), Elements(), String()] +// +// [GetMeta(), Fields(), Elements(), String()] package yaml diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/labels/selector.go b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/labels/selector.go index 73c5ae6a65a1..3c781dcf0af8 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/labels/selector.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/labels/selector.go @@ -138,7 +138,8 @@ type Requirement struct { // (4) If the operator is Exists or DoesNotExist, the value set must be empty. // (5) If the operator is Gt or Lt, the values set must contain only one value, which will be interpreted as an integer. // (6) The key is invalid due to its length, or sequence -// of characters. See validateLabelKey for more details. +// +// of characters. See validateLabelKey for more details. // // The empty string is a valid value in the input values set. func NewRequirement(key string, op selection.Operator, vals []string) (*Requirement, error) { @@ -192,13 +193,20 @@ func (r *Requirement) hasValue(value string) bool { // There is a match in the following cases: // (1) The operator is Exists and Labels has the Requirement's key. // (2) The operator is In, Labels has the Requirement's key and Labels' -// value for that key is in Requirement's value set. +// +// value for that key is in Requirement's value set. +// // (3) The operator is NotIn, Labels has the Requirement's key and -// Labels' value for that key is not in Requirement's value set. +// +// Labels' value for that key is not in Requirement's value set. +// // (4) The operator is DoesNotExist or NotIn and Labels does not have the -// Requirement's key. +// +// Requirement's key. +// // (5) The operator is GreaterThanOperator or LessThanOperator, and Labels has -// the Requirement's key and the corresponding value satisfies mathematical inequality. +// +// the Requirement's key and the corresponding value satisfies mathematical inequality. func (r *Requirement) Matches(ls Labels) bool { switch r.operator { case selection.In, selection.Equals, selection.DoubleEquals: @@ -809,32 +817,33 @@ func (p *Parser) parseExactValue() (sets.String, error) { // as they parse different selectors with different syntaxes. // The input will cause an error if it does not follow this form: // -// ::= | "," -// ::= [!] KEY [ | ] -// ::= "" | -// ::= | -// ::= "notin" -// ::= "in" -// ::= "(" ")" -// ::= VALUE | VALUE "," -// ::= ["="|"=="|"!="] VALUE +// ::= | "," +// ::= [!] KEY [ | ] +// ::= "" | +// ::= | +// ::= "notin" +// ::= "in" +// ::= "(" ")" +// ::= VALUE | VALUE "," +// ::= ["="|"=="|"!="] VALUE // // KEY is a sequence of one or more characters following [ DNS_SUBDOMAIN "/" ] DNS_LABEL. Max length is 63 characters. // VALUE is a sequence of zero or more characters "([A-Za-z0-9_-\.])". Max length is 63 characters. // Delimiter is white space: (' ', '\t') // Example of valid syntax: -// "x in (foo,,baz),y,z notin ()" +// +// "x in (foo,,baz),y,z notin ()" // // Note: -// (1) Inclusion - " in " - denotes that the KEY exists and is equal to any of the -// VALUEs in its requirement -// (2) Exclusion - " notin " - denotes that the KEY is not equal to any -// of the VALUEs in its requirement or does not exist -// (3) The empty string is a valid VALUE -// (4) A requirement with just a KEY - as in "y" above - denotes that -// the KEY exists and can be any VALUE. -// (5) A requirement with just !KEY requires that the KEY not exist. // +// (1) Inclusion - " in " - denotes that the KEY exists and is equal to any of the +// VALUEs in its requirement +// (2) Exclusion - " notin " - denotes that the KEY is not equal to any +// of the VALUEs in its requirement or does not exist +// (3) The empty string is a valid VALUE +// (4) A requirement with just a KEY - as in "y" above - denotes that +// the KEY exists and can be any VALUE. +// (5) A requirement with just !KEY requires that the KEY not exist. func Parse(selector string) (Selector, error) { parsedSelector, err := parse(selector) if err == nil { diff --git a/vendor/sigs.k8s.io/mcs-api/pkg/apis/v1alpha1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/mcs-api/pkg/apis/v1alpha1/zz_generated.deepcopy.go index 4e26c28b29f6..8da2e93cb850 100644 --- a/vendor/sigs.k8s.io/mcs-api/pkg/apis/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/sigs.k8s.io/mcs-api/pkg/apis/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go index acf71402cf31..fb2821e1e667 100644 --- a/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go @@ -143,7 +143,7 @@ func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { emitter.canonical = canonical } -//// Set the indentation increment. +// // Set the indentation increment. func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { if indent < 2 || indent > 9 { indent = 2 diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go index a1c2cc52627f..638a268c79bf 100644 --- a/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go @@ -130,10 +130,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go index 81d05dfe573f..2883e5c58fab 100644 --- a/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go @@ -170,7 +170,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -192,9 +193,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -277,8 +281,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -299,9 +303,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -332,30 +337,41 @@ func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -574,8 +590,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -627,7 +643,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -664,14 +681,14 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -723,13 +740,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -757,16 +772,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -825,11 +842,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -849,8 +865,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -873,8 +889,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -891,16 +907,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -965,8 +982,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go index 7c1f5fac3dbd..b0c436c4a84d 100644 --- a/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go @@ -95,7 +95,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests + // for that to be the case, and there are tests // If the EOF flag is set and the raw buffer is empty, do nothing. if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go index 4120e0c9160a..e29c364b3399 100644 --- a/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go @@ -180,7 +180,7 @@ func resolve(tag string, in string) (rtag string, out interface{}) { return yaml_INT_TAG, uintv } } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) + intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) if err == nil { if true || intv == int64(int(intv)) { return yaml_INT_TAG, int(intv) diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go index 0b9bb6030a0f..d634dca4b04a 100644 --- a/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go @@ -1500,11 +1500,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1601,11 +1601,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1640,8 +1640,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1679,10 +1680,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1716,9 +1718,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go index 4c45e660a8f2..2edd734055fb 100644 --- a/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go @@ -52,7 +52,7 @@ func (l keyList) Less(i, j int) bool { var ai, bi int var an, bn int64 if ar[i] == '0' || br[i] == '0' { - for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go index 30813884c067..03756f6bbbc8 100644 --- a/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go @@ -2,8 +2,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -67,16 +66,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -166,36 +164,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go index f6a9c8e34b1e..640f9d95de93 100644 --- a/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go @@ -408,7 +408,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -604,13 +606,14 @@ type yaml_parser_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int