repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
list
docstring
stringlengths
6
2.61k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
85
252
partition
stringclasses
1 value
algolia/algoliasearch-client-go
algolia/internal/opt/disable_exact_on_attributes.go
ExtractDisableExactOnAttributes
func ExtractDisableExactOnAttributes(opts ...interface{}) *opt.DisableExactOnAttributesOption { for _, o := range opts { if v, ok := o.(*opt.DisableExactOnAttributesOption); ok { return v } } return nil }
go
func ExtractDisableExactOnAttributes(opts ...interface{}) *opt.DisableExactOnAttributesOption { for _, o := range opts { if v, ok := o.(*opt.DisableExactOnAttributesOption); ok { return v } } return nil }
[ "func", "ExtractDisableExactOnAttributes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "DisableExactOnAttributesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ...
// ExtractDisableExactOnAttributes returns the first found DisableExactOnAttributesOption from the // given variadic arguments or nil otherwise.
[ "ExtractDisableExactOnAttributes", "returns", "the", "first", "found", "DisableExactOnAttributesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/disable_exact_on_attributes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/auto_generate_object_id_if_not_exist.go
ExtractAutoGenerateObjectIDIfNotExist
func ExtractAutoGenerateObjectIDIfNotExist(opts ...interface{}) *opt.AutoGenerateObjectIDIfNotExistOption { for _, o := range opts { if v, ok := o.(*opt.AutoGenerateObjectIDIfNotExistOption); ok { return v } } return nil }
go
func ExtractAutoGenerateObjectIDIfNotExist(opts ...interface{}) *opt.AutoGenerateObjectIDIfNotExistOption { for _, o := range opts { if v, ok := o.(*opt.AutoGenerateObjectIDIfNotExistOption); ok { return v } } return nil }
[ "func", "ExtractAutoGenerateObjectIDIfNotExist", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AutoGenerateObjectIDIfNotExistOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*",...
// ExtractAutoGenerateObjectIDIfNotExist returns the first found AutoGenerateObjectIDIfNotExistOption from the // given variadic arguments or nil otherwise.
[ "ExtractAutoGenerateObjectIDIfNotExist", "returns", "the", "first", "found", "AutoGenerateObjectIDIfNotExistOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/auto_generate_object_id_if_not_exist.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/inside_bounding_box.go
ExtractInsideBoundingBox
func ExtractInsideBoundingBox(opts ...interface{}) *opt.InsideBoundingBoxOption { for _, o := range opts { if v, ok := o.(*opt.InsideBoundingBoxOption); ok { return v } } return nil }
go
func ExtractInsideBoundingBox(opts ...interface{}) *opt.InsideBoundingBoxOption { for _, o := range opts { if v, ok := o.(*opt.InsideBoundingBoxOption); ok { return v } } return nil }
[ "func", "ExtractInsideBoundingBox", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "InsideBoundingBoxOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "Inside...
// ExtractInsideBoundingBox returns the first found InsideBoundingBoxOption from the // given variadic arguments or nil otherwise.
[ "ExtractInsideBoundingBox", "returns", "the", "first", "found", "InsideBoundingBoxOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/inside_bounding_box.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/around_lat_lng_via_ip.go
ExtractAroundLatLngViaIP
func ExtractAroundLatLngViaIP(opts ...interface{}) *opt.AroundLatLngViaIPOption { for _, o := range opts { if v, ok := o.(*opt.AroundLatLngViaIPOption); ok { return v } } return nil }
go
func ExtractAroundLatLngViaIP(opts ...interface{}) *opt.AroundLatLngViaIPOption { for _, o := range opts { if v, ok := o.(*opt.AroundLatLngViaIPOption); ok { return v } } return nil }
[ "func", "ExtractAroundLatLngViaIP", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AroundLatLngViaIPOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "Around...
// ExtractAroundLatLngViaIP returns the first found AroundLatLngViaIPOption from the // given variadic arguments or nil otherwise.
[ "ExtractAroundLatLngViaIP", "returns", "the", "first", "found", "AroundLatLngViaIPOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/around_lat_lng_via_ip.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/snippet_ellipsis_text.go
UnmarshalJSON
func (o *SnippetEllipsisTextOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { o.value = newDefaultSnippetEllipsisTextValue return nil } return json.Unmarshal(data, &o.value) }
go
func (o *SnippetEllipsisTextOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { o.value = newDefaultSnippetEllipsisTextValue return nil } return json.Unmarshal(data, &o.value) }
[ "func", "(", "o", "*", "SnippetEllipsisTextOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "string", "(", "data", ")", "==", "\"", "\"", "{", "o", ".", "value", "=", "newDefaultSnippetEllipsisTextValue", "\n", "return...
// UnmarshalJSON implements the json.Unmarshaler interface for // SnippetEllipsisTextOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "SnippetEllipsisTextOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/snippet_ellipsis_text.go#L37-L43
train
algolia/algoliasearch-client-go
algolia/opt/snippet_ellipsis_text.go
SnippetEllipsisTextEqual
func SnippetEllipsisTextEqual(o1, o2 *SnippetEllipsisTextOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func SnippetEllipsisTextEqual(o1, o2 *SnippetEllipsisTextOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "SnippetEllipsisTextEqual", "(", "o1", ",", "o2", "*", "SnippetEllipsisTextOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", "...
// SnippetEllipsisTextEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "SnippetEllipsisTextEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/snippet_ellipsis_text.go#L64-L72
train
algolia/algoliasearch-client-go
algolia/internal/opt/around_precision.go
ExtractAroundPrecision
func ExtractAroundPrecision(opts ...interface{}) *opt.AroundPrecisionOption { for _, o := range opts { if v, ok := o.(*opt.AroundPrecisionOption); ok { return v } } return nil }
go
func ExtractAroundPrecision(opts ...interface{}) *opt.AroundPrecisionOption { for _, o := range opts { if v, ok := o.(*opt.AroundPrecisionOption); ok { return v } } return nil }
[ "func", "ExtractAroundPrecision", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AroundPrecisionOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "AroundPrec...
// ExtractAroundPrecision returns the first found AroundPrecisionOption from the // given variadic arguments or nil otherwise.
[ "ExtractAroundPrecision", "returns", "the", "first", "found", "AroundPrecisionOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/around_precision.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/searchable_attributes.go
SearchableAttributesEqual
func SearchableAttributesEqual(o1, o2 *SearchableAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func SearchableAttributesEqual(o1, o2 *SearchableAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "SearchableAttributesEqual", "(", "o1", ",", "o2", "*", "SearchableAttributesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ...
// SearchableAttributesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "SearchableAttributesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "th...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/searchable_attributes.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/min_proximity.go
ExtractMinProximity
func ExtractMinProximity(opts ...interface{}) *opt.MinProximityOption { for _, o := range opts { if v, ok := o.(*opt.MinProximityOption); ok { return v } } return nil }
go
func ExtractMinProximity(opts ...interface{}) *opt.MinProximityOption { for _, o := range opts { if v, ok := o.(*opt.MinProximityOption); ok { return v } } return nil }
[ "func", "ExtractMinProximity", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "MinProximityOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "MinProximityOpti...
// ExtractMinProximity returns the first found MinProximityOption from the // given variadic arguments or nil otherwise.
[ "ExtractMinProximity", "returns", "the", "first", "found", "MinProximityOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/min_proximity.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/ignore_plurals.go
ExtractIgnorePlurals
func ExtractIgnorePlurals(opts ...interface{}) *opt.IgnorePluralsOption { for _, o := range opts { if v, ok := o.(*opt.IgnorePluralsOption); ok { return v } } return nil }
go
func ExtractIgnorePlurals(opts ...interface{}) *opt.IgnorePluralsOption { for _, o := range opts { if v, ok := o.(*opt.IgnorePluralsOption); ok { return v } } return nil }
[ "func", "ExtractIgnorePlurals", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "IgnorePluralsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "IgnorePluralsO...
// ExtractIgnorePlurals returns the first found IgnorePluralsOption from the // given variadic arguments or nil otherwise.
[ "ExtractIgnorePlurals", "returns", "the", "first", "found", "IgnorePluralsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/ignore_plurals.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/restrict_sources.go
RestrictSourcesEqual
func RestrictSourcesEqual(o1, o2 *RestrictSourcesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func RestrictSourcesEqual(o1, o2 *RestrictSourcesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "RestrictSourcesEqual", "(", "o1", ",", "o2", "*", "RestrictSourcesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "E...
// RestrictSourcesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "RestrictSourcesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/restrict_sources.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/inside_polygon.go
ExtractInsidePolygon
func ExtractInsidePolygon(opts ...interface{}) *opt.InsidePolygonOption { for _, o := range opts { if v, ok := o.(*opt.InsidePolygonOption); ok { return v } } return nil }
go
func ExtractInsidePolygon(opts ...interface{}) *opt.InsidePolygonOption { for _, o := range opts { if v, ok := o.(*opt.InsidePolygonOption); ok { return v } } return nil }
[ "func", "ExtractInsidePolygon", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "InsidePolygonOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "InsidePolygonO...
// ExtractInsidePolygon returns the first found InsidePolygonOption from the // given variadic arguments or nil otherwise.
[ "ExtractInsidePolygon", "returns", "the", "first", "found", "InsidePolygonOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/inside_polygon.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/restrict_indices.go
RestrictIndicesEqual
func RestrictIndicesEqual(o1, o2 *RestrictIndicesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func RestrictIndicesEqual(o1, o2 *RestrictIndicesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "RestrictIndicesEqual", "(", "o1", ",", "o2", "*", "RestrictIndicesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "E...
// RestrictIndicesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "RestrictIndicesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/restrict_indices.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/disable_typo_tolerance_on_words.go
ExtractDisableTypoToleranceOnWords
func ExtractDisableTypoToleranceOnWords(opts ...interface{}) *opt.DisableTypoToleranceOnWordsOption { for _, o := range opts { if v, ok := o.(*opt.DisableTypoToleranceOnWordsOption); ok { return v } } return nil }
go
func ExtractDisableTypoToleranceOnWords(opts ...interface{}) *opt.DisableTypoToleranceOnWordsOption { for _, o := range opts { if v, ok := o.(*opt.DisableTypoToleranceOnWordsOption); ok { return v } } return nil }
[ "func", "ExtractDisableTypoToleranceOnWords", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "DisableTypoToleranceOnWordsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "op...
// ExtractDisableTypoToleranceOnWords returns the first found DisableTypoToleranceOnWordsOption from the // given variadic arguments or nil otherwise.
[ "ExtractDisableTypoToleranceOnWords", "returns", "the", "first", "found", "DisableTypoToleranceOnWordsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/disable_typo_tolerance_on_words.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/advanced_syntax_features.go
AdvancedSyntaxFeaturesEqual
func AdvancedSyntaxFeaturesEqual(o1, o2 *AdvancedSyntaxFeaturesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AdvancedSyntaxFeaturesEqual(o1, o2 *AdvancedSyntaxFeaturesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AdvancedSyntaxFeaturesEqual", "(", "o1", ",", "o2", "*", "AdvancedSyntaxFeaturesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2...
// AdvancedSyntaxFeaturesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AdvancedSyntaxFeaturesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/advanced_syntax_features.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/ranking.go
ExtractRanking
func ExtractRanking(opts ...interface{}) *opt.RankingOption { for _, o := range opts { if v, ok := o.(*opt.RankingOption); ok { return v } } return nil }
go
func ExtractRanking(opts ...interface{}) *opt.RankingOption { for _, o := range opts { if v, ok := o.(*opt.RankingOption); ok { return v } } return nil }
[ "func", "ExtractRanking", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "RankingOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "RankingOption", ")", "...
// ExtractRanking returns the first found RankingOption from the // given variadic arguments or nil otherwise.
[ "ExtractRanking", "returns", "the", "first", "found", "RankingOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/ranking.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/index_name.go
ExtractIndexName
func ExtractIndexName(opts ...interface{}) *opt.IndexNameOption { for _, o := range opts { if v, ok := o.(*opt.IndexNameOption); ok { return v } } return nil }
go
func ExtractIndexName(opts ...interface{}) *opt.IndexNameOption { for _, o := range opts { if v, ok := o.(*opt.IndexNameOption); ok { return v } } return nil }
[ "func", "ExtractIndexName", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "IndexNameOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "IndexNameOption", ")...
// ExtractIndexName returns the first found IndexNameOption from the // given variadic arguments or nil otherwise.
[ "ExtractIndexName", "returns", "the", "first", "found", "IndexNameOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/index_name.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/scopes.go
ScopesEqual
func ScopesEqual(o1, o2 *ScopesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func ScopesEqual(o1, o2 *ScopesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "ScopesEqual", "(", "o1", ",", "o2", "*", "ScopesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", "o...
// ScopesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "ScopesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "default...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/scopes.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/around_precision.go
AroundPrecisionEqual
func AroundPrecisionEqual(o1, o2 *AroundPrecisionOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AroundPrecisionEqual(o1, o2 *AroundPrecisionOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AroundPrecisionEqual", "(", "o1", ",", "o2", "*", "AroundPrecisionOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "E...
// AroundPrecisionEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AroundPrecisionEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/around_precision.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/user_token.go
ExtractUserToken
func ExtractUserToken(opts ...interface{}) *opt.UserTokenOption { for _, o := range opts { if v, ok := o.(*opt.UserTokenOption); ok { return v } } return nil }
go
func ExtractUserToken(opts ...interface{}) *opt.UserTokenOption { for _, o := range opts { if v, ok := o.(*opt.UserTokenOption); ok { return v } } return nil }
[ "func", "ExtractUserToken", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "UserTokenOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "UserTokenOption", ")...
// ExtractUserToken returns the first found UserTokenOption from the // given variadic arguments or nil otherwise.
[ "ExtractUserToken", "returns", "the", "first", "found", "UserTokenOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/user_token.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/advanced_syntax_features.go
ExtractAdvancedSyntaxFeatures
func ExtractAdvancedSyntaxFeatures(opts ...interface{}) *opt.AdvancedSyntaxFeaturesOption { for _, o := range opts { if v, ok := o.(*opt.AdvancedSyntaxFeaturesOption); ok { return v } } return nil }
go
func ExtractAdvancedSyntaxFeatures(opts ...interface{}) *opt.AdvancedSyntaxFeaturesOption { for _, o := range opts { if v, ok := o.(*opt.AdvancedSyntaxFeaturesOption); ok { return v } } return nil }
[ "func", "ExtractAdvancedSyntaxFeatures", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AdvancedSyntaxFeaturesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".",...
// ExtractAdvancedSyntaxFeatures returns the first found AdvancedSyntaxFeaturesOption from the // given variadic arguments or nil otherwise.
[ "ExtractAdvancedSyntaxFeatures", "returns", "the", "first", "found", "AdvancedSyntaxFeaturesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/advanced_syntax_features.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/referers.go
ExtractReferers
func ExtractReferers(opts ...interface{}) *opt.ReferersOption { for _, o := range opts { if v, ok := o.(*opt.ReferersOption); ok { return v } } return nil }
go
func ExtractReferers(opts ...interface{}) *opt.ReferersOption { for _, o := range opts { if v, ok := o.(*opt.ReferersOption); ok { return v } } return nil }
[ "func", "ExtractReferers", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ReferersOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "ReferersOption", ")", ...
// ExtractReferers returns the first found ReferersOption from the // given variadic arguments or nil otherwise.
[ "ExtractReferers", "returns", "the", "first", "found", "ReferersOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/referers.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/extra_url_params.go
ExtraURLParamsEqual
func ExtraURLParamsEqual(o1, o2 *ExtraURLParamsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func ExtraURLParamsEqual(o1, o2 *ExtraURLParamsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "ExtraURLParamsEqual", "(", "o1", ",", "o2", "*", "ExtraURLParamsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equ...
// ExtraURLParamsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "ExtraURLParamsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/extra_url_params.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/disable_prefix_on_attributes.go
UnmarshalJSON
func (o *DisablePrefixOnAttributesOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { o.value = []string{} return nil } return json.Unmarshal(data, &o.value) }
go
func (o *DisablePrefixOnAttributesOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { o.value = []string{} return nil } return json.Unmarshal(data, &o.value) }
[ "func", "(", "o", "*", "DisablePrefixOnAttributesOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "string", "(", "data", ")", "==", "\"", "\"", "{", "o", ".", "value", "=", "[", "]", "string", "{", "}", "\n", "...
// UnmarshalJSON implements the json.Unmarshaler interface for // DisablePrefixOnAttributesOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "DisablePrefixOnAttributesOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/disable_prefix_on_attributes.go#L37-L43
train
algolia/algoliasearch-client-go
algolia/opt/disable_prefix_on_attributes.go
DisablePrefixOnAttributesEqual
func DisablePrefixOnAttributesEqual(o1, o2 *DisablePrefixOnAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func DisablePrefixOnAttributesEqual(o1, o2 *DisablePrefixOnAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "DisablePrefixOnAttributesEqual", "(", "o1", ",", "o2", "*", "DisablePrefixOnAttributesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return",...
// DisablePrefixOnAttributesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "DisablePrefixOnAttributesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/disable_prefix_on_attributes.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/tag_filters.go
UnmarshalJSON
func (o *TagFiltersOption) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &o.comp) }
go
func (o *TagFiltersOption) UnmarshalJSON(data []byte) error { return json.Unmarshal(data, &o.comp) }
[ "func", "(", "o", "*", "TagFiltersOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "return", "json", ".", "Unmarshal", "(", "data", ",", "&", "o", ".", "comp", ")", "\n", "}" ]
// UnmarshalJSON implements the json.Unmarshaler interface for TagFiltersOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "TagFiltersOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/tag_filters.go#L52-L54
train
algolia/algoliasearch-client-go
algolia/opt/tag_filters.go
TagFiltersEqual
func TagFiltersEqual(o1, o2 *TagFiltersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func TagFiltersEqual(o1, o2 *TagFiltersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "TagFiltersEqual", "(", "o1", ",", "o2", "*", "TagFiltersOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "...
// TagFiltersEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "TagFiltersEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "def...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/tag_filters.go#L66-L74
train
algolia/algoliasearch-client-go
algolia/search/client_mcm.go
ListClusters
func (c *Client) ListClusters(opts ...interface{}) (res ListClustersRes, err error) { err = c.transport.Request(&res, http.MethodGet, "/1/clusters", nil, call.Read, opts...) return }
go
func (c *Client) ListClusters(opts ...interface{}) (res ListClustersRes, err error) { err = c.transport.Request(&res, http.MethodGet, "/1/clusters", nil, call.Read, opts...) return }
[ "func", "(", "c", "*", "Client", ")", "ListClusters", "(", "opts", "...", "interface", "{", "}", ")", "(", "res", "ListClustersRes", ",", "err", "error", ")", "{", "err", "=", "c", ".", "transport", ".", "Request", "(", "&", "res", ",", "http", "."...
// ListClusters list all the clusters managed by MCM.
[ "ListClusters", "list", "all", "the", "clusters", "managed", "by", "MCM", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_mcm.go#L13-L16
train
algolia/algoliasearch-client-go
algolia/search/client_mcm.go
ListUserIDs
func (c *Client) ListUserIDs(opts ...interface{}) (res ListUserIDsRes, err error) { opts = opt.InsertExtraURLParam(opts, "page", iopt.ExtractPage(opts...).Get()) opts = opt.InsertExtraURLParam(opts, "hitsPerPage", iopt.ExtractHitsPerPage(opts...).Get()) err = c.transport.Request(&res, http.MethodGet, "/1/clusters/ma...
go
func (c *Client) ListUserIDs(opts ...interface{}) (res ListUserIDsRes, err error) { opts = opt.InsertExtraURLParam(opts, "page", iopt.ExtractPage(opts...).Get()) opts = opt.InsertExtraURLParam(opts, "hitsPerPage", iopt.ExtractHitsPerPage(opts...).Get()) err = c.transport.Request(&res, http.MethodGet, "/1/clusters/ma...
[ "func", "(", "c", "*", "Client", ")", "ListUserIDs", "(", "opts", "...", "interface", "{", "}", ")", "(", "res", "ListUserIDsRes", ",", "err", "error", ")", "{", "opts", "=", "opt", ".", "InsertExtraURLParam", "(", "opts", ",", "\"", "\"", ",", "iopt...
// ListUserIDs list all the userIDs managed by MCM. // // Pagination can be implemented using the opt.Page and opt.HitsPerPage option // parameters.
[ "ListUserIDs", "list", "all", "the", "userIDs", "managed", "by", "MCM", ".", "Pagination", "can", "be", "implemented", "using", "the", "opt", ".", "Page", "and", "opt", ".", "HitsPerPage", "option", "parameters", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_mcm.go#L22-L27
train
algolia/algoliasearch-client-go
algolia/search/client_mcm.go
GetUserID
func (c *Client) GetUserID(userID string, opts ...interface{}) (res UserID, err error) { path := fmt.Sprintf("/1/clusters/mapping/%s", userID) err = c.transport.Request(&res, http.MethodGet, path, nil, call.Read, opts...) return }
go
func (c *Client) GetUserID(userID string, opts ...interface{}) (res UserID, err error) { path := fmt.Sprintf("/1/clusters/mapping/%s", userID) err = c.transport.Request(&res, http.MethodGet, path, nil, call.Read, opts...) return }
[ "func", "(", "c", "*", "Client", ")", "GetUserID", "(", "userID", "string", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "UserID", ",", "err", "error", ")", "{", "path", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "userID", ...
// GetUserID retrieves the user, managed by MCM, according to the given userID.
[ "GetUserID", "retrieves", "the", "user", "managed", "by", "MCM", "according", "to", "the", "given", "userID", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_mcm.go#L30-L34
train
algolia/algoliasearch-client-go
algolia/search/client_mcm.go
AssignUserID
func (c *Client) AssignUserID(userID, clusterName string, opts ...interface{}) (res AssignUserIDRes, err error) { opts = opt.InsertExtraHeader(opts, "X-Algolia-User-ID", userID) body := map[string]string{"cluster": clusterName} err = c.transport.Request(&res, http.MethodPost, "/1/clusters/mapping", body, call.Write,...
go
func (c *Client) AssignUserID(userID, clusterName string, opts ...interface{}) (res AssignUserIDRes, err error) { opts = opt.InsertExtraHeader(opts, "X-Algolia-User-ID", userID) body := map[string]string{"cluster": clusterName} err = c.transport.Request(&res, http.MethodPost, "/1/clusters/mapping", body, call.Write,...
[ "func", "(", "c", "*", "Client", ")", "AssignUserID", "(", "userID", ",", "clusterName", "string", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "AssignUserIDRes", ",", "err", "error", ")", "{", "opts", "=", "opt", ".", "InsertExtraHeader",...
// AssignUserID assign the given userID to the given cluster.
[ "AssignUserID", "assign", "the", "given", "userID", "to", "the", "given", "cluster", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_mcm.go#L37-L42
train
algolia/algoliasearch-client-go
algolia/search/client_mcm.go
RemoveUserID
func (c *Client) RemoveUserID(userID string, opts ...interface{}) (res RemoveUserIDRes, err error) { opts = opt.InsertExtraHeader(opts, "X-Algolia-User-ID", userID) err = c.transport.Request(&res, http.MethodDelete, "/1/clusters/mapping", nil, call.Write, opts...) return }
go
func (c *Client) RemoveUserID(userID string, opts ...interface{}) (res RemoveUserIDRes, err error) { opts = opt.InsertExtraHeader(opts, "X-Algolia-User-ID", userID) err = c.transport.Request(&res, http.MethodDelete, "/1/clusters/mapping", nil, call.Write, opts...) return }
[ "func", "(", "c", "*", "Client", ")", "RemoveUserID", "(", "userID", "string", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "RemoveUserIDRes", ",", "err", "error", ")", "{", "opts", "=", "opt", ".", "InsertExtraHeader", "(", "opts", ",",...
// RemoveUserID deletes the given userID managed by MCM.
[ "RemoveUserID", "deletes", "the", "given", "userID", "managed", "by", "MCM", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_mcm.go#L45-L49
train
algolia/algoliasearch-client-go
algolia/search/client_mcm.go
GetTopUserIDs
func (c *Client) GetTopUserIDs(opts ...interface{}) (res TopUserIDs, err error) { err = c.transport.Request(&res, "GET", "/1/clusters/mapping/top", nil, call.Read, opts...) return }
go
func (c *Client) GetTopUserIDs(opts ...interface{}) (res TopUserIDs, err error) { err = c.transport.Request(&res, "GET", "/1/clusters/mapping/top", nil, call.Read, opts...) return }
[ "func", "(", "c", "*", "Client", ")", "GetTopUserIDs", "(", "opts", "...", "interface", "{", "}", ")", "(", "res", "TopUserIDs", ",", "err", "error", ")", "{", "err", "=", "c", ".", "transport", ".", "Request", "(", "&", "res", ",", "\"", "\"", "...
// GetTopUserIDs retrieves the top list of userIDs managed by MCM.
[ "GetTopUserIDs", "retrieves", "the", "top", "list", "of", "userIDs", "managed", "by", "MCM", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_mcm.go#L52-L55
train
algolia/algoliasearch-client-go
algolia/opt/remove_words_if_no_results.go
RemoveWordsIfNoResultsEqual
func RemoveWordsIfNoResultsEqual(o1, o2 *RemoveWordsIfNoResultsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func RemoveWordsIfNoResultsEqual(o1, o2 *RemoveWordsIfNoResultsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "RemoveWordsIfNoResultsEqual", "(", "o1", ",", "o2", "*", "RemoveWordsIfNoResultsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2...
// RemoveWordsIfNoResultsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "RemoveWordsIfNoResultsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/remove_words_if_no_results.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/query_languages.go
ExtractQueryLanguages
func ExtractQueryLanguages(opts ...interface{}) *opt.QueryLanguagesOption { for _, o := range opts { if v, ok := o.(*opt.QueryLanguagesOption); ok { return v } } return nil }
go
func ExtractQueryLanguages(opts ...interface{}) *opt.QueryLanguagesOption { for _, o := range opts { if v, ok := o.(*opt.QueryLanguagesOption); ok { return v } } return nil }
[ "func", "ExtractQueryLanguages", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "QueryLanguagesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "QueryLanguag...
// ExtractQueryLanguages returns the first found QueryLanguagesOption from the // given variadic arguments or nil otherwise.
[ "ExtractQueryLanguages", "returns", "the", "first", "found", "QueryLanguagesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/query_languages.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/search/client_personalization.go
SetPersonalizationStrategy
func (c *Client) SetPersonalizationStrategy(strategy Strategy, opts ...interface{}) (res SetPersonalizationStrategyRes, err error) { path := c.path("/recommendation/personalization/strategy") err = c.transport.Request(&res, http.MethodPost, path, strategy, call.Write, opts...) return }
go
func (c *Client) SetPersonalizationStrategy(strategy Strategy, opts ...interface{}) (res SetPersonalizationStrategyRes, err error) { path := c.path("/recommendation/personalization/strategy") err = c.transport.Request(&res, http.MethodPost, path, strategy, call.Write, opts...) return }
[ "func", "(", "c", "*", "Client", ")", "SetPersonalizationStrategy", "(", "strategy", "Strategy", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "SetPersonalizationStrategyRes", ",", "err", "error", ")", "{", "path", ":=", "c", ".", "path", "("...
// SetPersonalizationStrategy defines and override the full configuration of // the personalization strategy feature.
[ "SetPersonalizationStrategy", "defines", "and", "override", "the", "full", "configuration", "of", "the", "personalization", "strategy", "feature", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_personalization.go#L11-L15
train
algolia/algoliasearch-client-go
algolia/search/client_personalization.go
GetPersonalizationStrategy
func (c *Client) GetPersonalizationStrategy(opts ...interface{}) (res GetPersonalizationStrategyRes, err error) { path := c.path("/recommendation/personalization/strategy") err = c.transport.Request(&res, http.MethodGet, path, nil, call.Read, opts...) return }
go
func (c *Client) GetPersonalizationStrategy(opts ...interface{}) (res GetPersonalizationStrategyRes, err error) { path := c.path("/recommendation/personalization/strategy") err = c.transport.Request(&res, http.MethodGet, path, nil, call.Read, opts...) return }
[ "func", "(", "c", "*", "Client", ")", "GetPersonalizationStrategy", "(", "opts", "...", "interface", "{", "}", ")", "(", "res", "GetPersonalizationStrategyRes", ",", "err", "error", ")", "{", "path", ":=", "c", ".", "path", "(", "\"", "\"", ")", "\n", ...
// GetPersonalizationStrategy retrieves the full configuration of the // personalization strategy feature.
[ "GetPersonalizationStrategy", "retrieves", "the", "full", "configuration", "of", "the", "personalization", "strategy", "feature", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_personalization.go#L19-L23
train
algolia/algoliasearch-client-go
algolia/opt/restrict_searchable_attributes.go
RestrictSearchableAttributesEqual
func RestrictSearchableAttributesEqual(o1, o2 *RestrictSearchableAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func RestrictSearchableAttributesEqual(o1, o2 *RestrictSearchableAttributesOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "RestrictSearchableAttributesEqual", "(", "o1", ",", "o2", "*", "RestrictSearchableAttributesOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "re...
// RestrictSearchableAttributesEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "RestrictSearchableAttributesEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/restrict_searchable_attributes.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/cluster_name.go
ClusterNameEqual
func ClusterNameEqual(o1, o2 *ClusterNameOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func ClusterNameEqual(o1, o2 *ClusterNameOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "ClusterNameEqual", "(", "o1", ",", "o2", "*", "ClusterNameOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", ...
// ClusterNameEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "ClusterNameEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "de...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/cluster_name.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/search/client_multiple.go
MultipleBatch
func (c *Client) MultipleBatch(operations []BatchOperationIndexed, opts ...interface{}) (res MultipleBatchRes, err error) { body := map[string][]BatchOperationIndexed{"requests": operations} path := c.path("/indexes/*/batch") err = c.transport.Request(&res, http.MethodPost, path, body, call.Write, opts...) res.wait...
go
func (c *Client) MultipleBatch(operations []BatchOperationIndexed, opts ...interface{}) (res MultipleBatchRes, err error) { body := map[string][]BatchOperationIndexed{"requests": operations} path := c.path("/indexes/*/batch") err = c.transport.Request(&res, http.MethodPost, path, body, call.Write, opts...) res.wait...
[ "func", "(", "c", "*", "Client", ")", "MultipleBatch", "(", "operations", "[", "]", "BatchOperationIndexed", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "MultipleBatchRes", ",", "err", "error", ")", "{", "body", ":=", "map", "[", "string"...
// MultipleBatch applies multiple indexing operations on potentially multiple // indices in a single call.
[ "MultipleBatch", "applies", "multiple", "indexing", "operations", "on", "potentially", "multiple", "indices", "in", "a", "single", "call", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_multiple.go#L11-L17
train
algolia/algoliasearch-client-go
algolia/search/client_multiple.go
MultipleGetObjects
func (c *Client) MultipleGetObjects(requests []IndexedGetObject, objects interface{}, opts ...interface{}) (err error) { if len(requests) == 0 { return } res := getObjectsRes{objects} body := map[string]interface{}{"requests": requests} path := c.path("/indexes/*/objects") err = c.transport.Request(&res, http.M...
go
func (c *Client) MultipleGetObjects(requests []IndexedGetObject, objects interface{}, opts ...interface{}) (err error) { if len(requests) == 0 { return } res := getObjectsRes{objects} body := map[string]interface{}{"requests": requests} path := c.path("/indexes/*/objects") err = c.transport.Request(&res, http.M...
[ "func", "(", "c", "*", "Client", ")", "MultipleGetObjects", "(", "requests", "[", "]", "IndexedGetObject", ",", "objects", "interface", "{", "}", ",", "opts", "...", "interface", "{", "}", ")", "(", "err", "error", ")", "{", "if", "len", "(", "requests...
// MultipleGetObjects retrieves multiple objects from potentially multiple // indices in a single call.
[ "MultipleGetObjects", "retrieves", "multiple", "objects", "from", "potentially", "multiple", "indices", "in", "a", "single", "call", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_multiple.go#L25-L34
train
algolia/algoliasearch-client-go
algolia/search/client_multiple.go
MultipleQueries
func (c *Client) MultipleQueries(queries []IndexedQuery, strategy string, opts ...interface{}) (res MultipleQueriesRes, err error) { body := newMultipleQueriesReq(queries, strategy) path := c.path("/indexes/*/queries") err = c.transport.Request(&res, http.MethodPost, path, body, call.Read, opts...) return }
go
func (c *Client) MultipleQueries(queries []IndexedQuery, strategy string, opts ...interface{}) (res MultipleQueriesRes, err error) { body := newMultipleQueriesReq(queries, strategy) path := c.path("/indexes/*/queries") err = c.transport.Request(&res, http.MethodPost, path, body, call.Read, opts...) return }
[ "func", "(", "c", "*", "Client", ")", "MultipleQueries", "(", "queries", "[", "]", "IndexedQuery", ",", "strategy", "string", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "MultipleQueriesRes", ",", "err", "error", ")", "{", "body", ":=", ...
// MultipleQueries performs multiple search queries on potentially multiple // indices in a single call.
[ "MultipleQueries", "performs", "multiple", "search", "queries", "on", "potentially", "multiple", "indices", "in", "a", "single", "call", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_multiple.go#L38-L43
train
algolia/algoliasearch-client-go
algolia/internal/opt/attributes_to_highlight.go
ExtractAttributesToHighlight
func ExtractAttributesToHighlight(opts ...interface{}) *opt.AttributesToHighlightOption { for _, o := range opts { if v, ok := o.(*opt.AttributesToHighlightOption); ok { return v } } return nil }
go
func ExtractAttributesToHighlight(opts ...interface{}) *opt.AttributesToHighlightOption { for _, o := range opts { if v, ok := o.(*opt.AttributesToHighlightOption); ok { return v } } return nil }
[ "func", "ExtractAttributesToHighlight", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AttributesToHighlightOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", ...
// ExtractAttributesToHighlight returns the first found AttributesToHighlightOption from the // given variadic arguments or nil otherwise.
[ "ExtractAttributesToHighlight", "returns", "the", "first", "found", "AttributesToHighlightOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/attributes_to_highlight.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/around_lat_lng.go
AroundLatLngEqual
func AroundLatLngEqual(o1, o2 *AroundLatLngOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AroundLatLngEqual(o1, o2 *AroundLatLngOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AroundLatLngEqual", "(", "o1", ",", "o2", "*", "AroundLatLngOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal",...
// AroundLatLngEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AroundLatLngEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "d...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/around_lat_lng.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/hits_per_page.go
ExtractHitsPerPage
func ExtractHitsPerPage(opts ...interface{}) *opt.HitsPerPageOption { for _, o := range opts { if v, ok := o.(*opt.HitsPerPageOption); ok { return v } } return nil }
go
func ExtractHitsPerPage(opts ...interface{}) *opt.HitsPerPageOption { for _, o := range opts { if v, ok := o.(*opt.HitsPerPageOption); ok { return v } } return nil }
[ "func", "ExtractHitsPerPage", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "HitsPerPageOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "HitsPerPageOption"...
// ExtractHitsPerPage returns the first found HitsPerPageOption from the // given variadic arguments or nil otherwise.
[ "ExtractHitsPerPage", "returns", "the", "first", "found", "HitsPerPageOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/hits_per_page.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/hits_per_page.go
HitsPerPageEqual
func HitsPerPageEqual(o1, o2 *HitsPerPageOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func HitsPerPageEqual(o1, o2 *HitsPerPageOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "HitsPerPageEqual", "(", "o1", ",", "o2", "*", "HitsPerPageOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", ...
// HitsPerPageEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "HitsPerPageEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "de...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/hits_per_page.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/gen/gen_query_params.go
main
func main() { var ( settings []Option settingsTemplate = createTemplate("templates/query_params.go.tmpl") filepath = "../../search/query_params.go" ) for _, opt := range options { if isSearch(opt.Kind) { settings = append(settings, opt) } } generateFile(settingsTemplate, settings, fi...
go
func main() { var ( settings []Option settingsTemplate = createTemplate("templates/query_params.go.tmpl") filepath = "../../search/query_params.go" ) for _, opt := range options { if isSearch(opt.Kind) { settings = append(settings, opt) } } generateFile(settingsTemplate, settings, fi...
[ "func", "main", "(", ")", "{", "var", "(", "settings", "[", "]", "Option", "\n", "settingsTemplate", "=", "createTemplate", "(", "\"", "\"", ")", "\n", "filepath", "=", "\"", "\"", "\n", ")", "\n\n", "for", "_", ",", "opt", ":=", "range", "options", ...
// Generates the query_params.go file which contains the main QueryParams // struct used by Search and other methods.
[ "Generates", "the", "query_params", ".", "go", "file", "which", "contains", "the", "main", "QueryParams", "struct", "used", "by", "Search", "and", "other", "methods", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/gen/gen_query_params.go#L7-L21
train
algolia/algoliasearch-client-go
algolia/opt/minimum_around_radius.go
MinimumAroundRadiusEqual
func MinimumAroundRadiusEqual(o1, o2 *MinimumAroundRadiusOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func MinimumAroundRadiusEqual(o1, o2 *MinimumAroundRadiusOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "MinimumAroundRadiusEqual", "(", "o1", ",", "o2", "*", "MinimumAroundRadiusOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", "...
// MinimumAroundRadiusEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "MinimumAroundRadiusEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/minimum_around_radius.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/search/key.go
SetQueryParameters
func (k *Key) SetQueryParameters(opts ...interface{}) { k.QueryParameters = transport.URLEncode(newQueryParams(opts...)) }
go
func (k *Key) SetQueryParameters(opts ...interface{}) { k.QueryParameters = transport.URLEncode(newQueryParams(opts...)) }
[ "func", "(", "k", "*", "Key", ")", "SetQueryParameters", "(", "opts", "...", "interface", "{", "}", ")", "{", "k", ".", "QueryParameters", "=", "transport", ".", "URLEncode", "(", "newQueryParams", "(", "opts", "...", ")", ")", "\n", "}" ]
// SetQueryParameters properly encodes any given query parameters into the // QueryParameters field of the Key.
[ "SetQueryParameters", "properly", "encodes", "any", "given", "query", "parameters", "into", "the", "QueryParameters", "field", "of", "the", "Key", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/key.go#L29-L31
train
algolia/algoliasearch-client-go
algolia/search/key.go
Equal
func (k Key) Equal(k2 Key) bool { k.CreatedAt, k2.CreatedAt = time.Time{}, time.Time{} k.Validity, k2.Validity = 0, 0 return reflect.DeepEqual(k, k2) }
go
func (k Key) Equal(k2 Key) bool { k.CreatedAt, k2.CreatedAt = time.Time{}, time.Time{} k.Validity, k2.Validity = 0, 0 return reflect.DeepEqual(k, k2) }
[ "func", "(", "k", "Key", ")", "Equal", "(", "k2", "Key", ")", "bool", "{", "k", ".", "CreatedAt", ",", "k2", ".", "CreatedAt", "=", "time", ".", "Time", "{", "}", ",", "time", ".", "Time", "{", "}", "\n", "k", ".", "Validity", ",", "k2", ".",...
// Equal returns true if the Keys are equal. It returns false otherwise.
[ "Equal", "returns", "true", "if", "the", "Keys", "are", "equal", ".", "It", "returns", "false", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/key.go#L65-L69
train
algolia/algoliasearch-client-go
algolia/opt/index_name.go
IndexNameEqual
func IndexNameEqual(o1, o2 *IndexNameOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func IndexNameEqual(o1, o2 *IndexNameOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "IndexNameEqual", "(", "o1", ",", "o2", "*", "IndexNameOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "("...
// IndexNameEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "IndexNameEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defa...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/index_name.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/attributes_to_snippet.go
ExtractAttributesToSnippet
func ExtractAttributesToSnippet(opts ...interface{}) *opt.AttributesToSnippetOption { for _, o := range opts { if v, ok := o.(*opt.AttributesToSnippetOption); ok { return v } } return nil }
go
func ExtractAttributesToSnippet(opts ...interface{}) *opt.AttributesToSnippetOption { for _, o := range opts { if v, ok := o.(*opt.AttributesToSnippetOption); ok { return v } } return nil }
[ "func", "ExtractAttributesToSnippet", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AttributesToSnippetOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "At...
// ExtractAttributesToSnippet returns the first found AttributesToSnippetOption from the // given variadic arguments or nil otherwise.
[ "ExtractAttributesToSnippet", "returns", "the", "first", "found", "AttributesToSnippetOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/attributes_to_snippet.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/user_token.go
UserTokenEqual
func UserTokenEqual(o1, o2 *UserTokenOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func UserTokenEqual(o1, o2 *UserTokenOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "UserTokenEqual", "(", "o1", ",", "o2", "*", "UserTokenOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "("...
// UserTokenEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "UserTokenEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defa...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/user_token.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/safe.go
ExtractSafe
func ExtractSafe(opts ...interface{}) *opt.SafeOption { for _, o := range opts { if v, ok := o.(*opt.SafeOption); ok { return v } } return nil }
go
func ExtractSafe(opts ...interface{}) *opt.SafeOption { for _, o := range opts { if v, ok := o.(*opt.SafeOption); ok { return v } } return nil }
[ "func", "ExtractSafe", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "SafeOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "SafeOption", ")", ";", "ok...
// ExtractSafe returns the first found SafeOption from the // given variadic arguments or nil otherwise.
[ "ExtractSafe", "returns", "the", "first", "found", "SafeOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/safe.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/advanced_syntax.go
ExtractAdvancedSyntax
func ExtractAdvancedSyntax(opts ...interface{}) *opt.AdvancedSyntaxOption { for _, o := range opts { if v, ok := o.(*opt.AdvancedSyntaxOption); ok { return v } } return nil }
go
func ExtractAdvancedSyntax(opts ...interface{}) *opt.AdvancedSyntaxOption { for _, o := range opts { if v, ok := o.(*opt.AdvancedSyntaxOption); ok { return v } } return nil }
[ "func", "ExtractAdvancedSyntax", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AdvancedSyntaxOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "AdvancedSynt...
// ExtractAdvancedSyntax returns the first found AdvancedSyntaxOption from the // given variadic arguments or nil otherwise.
[ "ExtractAdvancedSyntax", "returns", "the", "first", "found", "AdvancedSyntaxOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/advanced_syntax.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/facet_filters.go
ExtractFacetFilters
func ExtractFacetFilters(opts ...interface{}) *opt.FacetFiltersOption { for _, o := range opts { if v, ok := o.(*opt.FacetFiltersOption); ok { return v } } return nil }
go
func ExtractFacetFilters(opts ...interface{}) *opt.FacetFiltersOption { for _, o := range opts { if v, ok := o.(*opt.FacetFiltersOption); ok { return v } } return nil }
[ "func", "ExtractFacetFilters", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "FacetFiltersOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "FacetFiltersOpti...
// ExtractFacetFilters returns the first found FacetFiltersOption from the // given variadic arguments or nil otherwise.
[ "ExtractFacetFilters", "returns", "the", "first", "found", "FacetFiltersOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/facet_filters.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/around_lat_lng_via_ip.go
AroundLatLngViaIPEqual
func AroundLatLngViaIPEqual(o1, o2 *AroundLatLngViaIPOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AroundLatLngViaIPEqual(o1, o2 *AroundLatLngViaIPOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AroundLatLngViaIPEqual", "(", "o1", ",", "o2", "*", "AroundLatLngViaIPOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", ...
// AroundLatLngViaIPEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AroundLatLngViaIPEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/around_lat_lng_via_ip.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/limit.go
ExtractLimit
func ExtractLimit(opts ...interface{}) *opt.LimitOption { for _, o := range opts { if v, ok := o.(*opt.LimitOption); ok { return v } } return nil }
go
func ExtractLimit(opts ...interface{}) *opt.LimitOption { for _, o := range opts { if v, ok := o.(*opt.LimitOption); ok { return v } } return nil }
[ "func", "ExtractLimit", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "LimitOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "LimitOption", ")", ";", ...
// ExtractLimit returns the first found LimitOption from the // given variadic arguments or nil otherwise.
[ "ExtractLimit", "returns", "the", "first", "found", "LimitOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/limit.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/attributes_for_faceting.go
ExtractAttributesForFaceting
func ExtractAttributesForFaceting(opts ...interface{}) *opt.AttributesForFacetingOption { for _, o := range opts { if v, ok := o.(*opt.AttributesForFacetingOption); ok { return v } } return nil }
go
func ExtractAttributesForFaceting(opts ...interface{}) *opt.AttributesForFacetingOption { for _, o := range opts { if v, ok := o.(*opt.AttributesForFacetingOption); ok { return v } } return nil }
[ "func", "ExtractAttributesForFaceting", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AttributesForFacetingOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", ...
// ExtractAttributesForFaceting returns the first found AttributesForFacetingOption from the // given variadic arguments or nil otherwise.
[ "ExtractAttributesForFaceting", "returns", "the", "first", "found", "AttributesForFacetingOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/attributes_for_faceting.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/create_if_not_exists.go
ExtractCreateIfNotExists
func ExtractCreateIfNotExists(opts ...interface{}) *opt.CreateIfNotExistsOption { for _, o := range opts { if v, ok := o.(*opt.CreateIfNotExistsOption); ok { return v } } return nil }
go
func ExtractCreateIfNotExists(opts ...interface{}) *opt.CreateIfNotExistsOption { for _, o := range opts { if v, ok := o.(*opt.CreateIfNotExistsOption); ok { return v } } return nil }
[ "func", "ExtractCreateIfNotExists", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "CreateIfNotExistsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "Create...
// ExtractCreateIfNotExists returns the first found CreateIfNotExistsOption from the // given variadic arguments or nil otherwise.
[ "ExtractCreateIfNotExists", "returns", "the", "first", "found", "CreateIfNotExistsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/create_if_not_exists.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/enable_personalization.go
EnablePersonalizationEqual
func EnablePersonalizationEqual(o1, o2 *EnablePersonalizationOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func EnablePersonalizationEqual(o1, o2 *EnablePersonalizationOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "EnablePersonalizationEqual", "(", "o1", ",", "o2", "*", "EnablePersonalizationOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2",...
// EnablePersonalizationEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "EnablePersonalizationEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "t...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/enable_personalization.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/create_if_not_exists.go
CreateIfNotExistsEqual
func CreateIfNotExistsEqual(o1, o2 *CreateIfNotExistsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func CreateIfNotExistsEqual(o1, o2 *CreateIfNotExistsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "CreateIfNotExistsEqual", "(", "o1", ",", "o2", "*", "CreateIfNotExistsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", ...
// CreateIfNotExistsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "CreateIfNotExistsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/create_if_not_exists.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/allow_typos_on_numeric_tokens.go
ExtractAllowTyposOnNumericTokens
func ExtractAllowTyposOnNumericTokens(opts ...interface{}) *opt.AllowTyposOnNumericTokensOption { for _, o := range opts { if v, ok := o.(*opt.AllowTyposOnNumericTokensOption); ok { return v } } return nil }
go
func ExtractAllowTyposOnNumericTokens(opts ...interface{}) *opt.AllowTyposOnNumericTokensOption { for _, o := range opts { if v, ok := o.(*opt.AllowTyposOnNumericTokensOption); ok { return v } } return nil }
[ "func", "ExtractAllowTyposOnNumericTokens", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AllowTyposOnNumericTokensOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ...
// ExtractAllowTyposOnNumericTokens returns the first found AllowTyposOnNumericTokensOption from the // given variadic arguments or nil otherwise.
[ "ExtractAllowTyposOnNumericTokens", "returns", "the", "first", "found", "AllowTyposOnNumericTokensOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/allow_typos_on_numeric_tokens.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/facets.go
FacetsEqual
func FacetsEqual(o1, o2 *FacetsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func FacetsEqual(o1, o2 *FacetsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "FacetsEqual", "(", "o1", ",", "o2", "*", "FacetsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", "o...
// FacetsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "FacetsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "default...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/facets.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/inside_bounding_box.go
MarshalJSON
func (o InsideBoundingBoxOption) MarshalJSON() ([]byte, error) { if o.coordinates != "" { return json.Marshal(o.coordinates) } return json.Marshal(o.boxes) }
go
func (o InsideBoundingBoxOption) MarshalJSON() ([]byte, error) { if o.coordinates != "" { return json.Marshal(o.coordinates) } return json.Marshal(o.boxes) }
[ "func", "(", "o", "InsideBoundingBoxOption", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "o", ".", "coordinates", "!=", "\"", "\"", "{", "return", "json", ".", "Marshal", "(", "o", ".", "coordinates", ")", "\n",...
// MarshalJSON implements the json.Marshaler interface for // InsideBoundingBoxOption.
[ "MarshalJSON", "implements", "the", "json", ".", "Marshaler", "interface", "for", "InsideBoundingBoxOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/inside_bounding_box.go#L39-L44
train
algolia/algoliasearch-client-go
algolia/opt/inside_bounding_box.go
UnmarshalJSON
func (o *InsideBoundingBoxOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } var boxes [][4]float64 if err := json.Unmarshal(data, &boxes); err == nil { o.boxes = boxes return nil } var coordinates string if err := json.Unmarshal(data, &coordinates); err == nil { o.coor...
go
func (o *InsideBoundingBoxOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } var boxes [][4]float64 if err := json.Unmarshal(data, &boxes); err == nil { o.boxes = boxes return nil } var coordinates string if err := json.Unmarshal(data, &coordinates); err == nil { o.coor...
[ "func", "(", "o", "*", "InsideBoundingBoxOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "string", "(", "data", ")", "==", "\"", "\"", "{", "return", "nil", "\n", "}", "\n\n", "var", "boxes", "[", "]", "[", "4...
// UnmarshalJSON implements the json.Unmarshaler interface for // InsideBoundingBoxOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "InsideBoundingBoxOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/inside_bounding_box.go#L48-L66
train
algolia/algoliasearch-client-go
algolia/opt/inside_bounding_box.go
InsideBoundingBoxEqual
func InsideBoundingBoxEqual(o1, o2 *InsideBoundingBoxOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func InsideBoundingBoxEqual(o1, o2 *InsideBoundingBoxOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "InsideBoundingBoxEqual", "(", "o1", ",", "o2", "*", "InsideBoundingBoxOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", ...
// InsideBoundingBoxEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "InsideBoundingBoxEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/inside_bounding_box.go#L81-L89
train
algolia/algoliasearch-client-go
algolia/opt/referers.go
ReferersEqual
func ReferersEqual(o1, o2 *ReferersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func ReferersEqual(o1, o2 *ReferersOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "ReferersEqual", "(", "o1", ",", "o2", "*", "ReferersOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", ...
// ReferersEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "ReferersEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defau...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/referers.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/page.go
ExtractPage
func ExtractPage(opts ...interface{}) *opt.PageOption { for _, o := range opts { if v, ok := o.(*opt.PageOption); ok { return v } } return nil }
go
func ExtractPage(opts ...interface{}) *opt.PageOption { for _, o := range opts { if v, ok := o.(*opt.PageOption); ok { return v } } return nil }
[ "func", "ExtractPage", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "PageOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "PageOption", ")", ";", "ok...
// ExtractPage returns the first found PageOption from the // given variadic arguments or nil otherwise.
[ "ExtractPage", "returns", "the", "first", "found", "PageOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/page.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/optional_words.go
OptionalWordsEqual
func OptionalWordsEqual(o1, o2 *OptionalWordsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func OptionalWordsEqual(o1, o2 *OptionalWordsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "OptionalWordsEqual", "(", "o1", ",", "o2", "*", "OptionalWordsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal...
// OptionalWordsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "OptionalWordsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/optional_words.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/opt/attributes_to_snippet.go
AttributesToSnippetEqual
func AttributesToSnippetEqual(o1, o2 *AttributesToSnippetOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AttributesToSnippetEqual(o1, o2 *AttributesToSnippetOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AttributesToSnippetEqual", "(", "o1", ",", "o2", "*", "AttributesToSnippetOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", "...
// AttributesToSnippetEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AttributesToSnippetEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/attributes_to_snippet.go#L58-L66
train
algolia/algoliasearch-client-go
algolia/internal/opt/filters.go
ExtractFilters
func ExtractFilters(opts ...interface{}) *opt.FiltersOption { for _, o := range opts { if v, ok := o.(*opt.FiltersOption); ok { return v } } return nil }
go
func ExtractFilters(opts ...interface{}) *opt.FiltersOption { for _, o := range opts { if v, ok := o.(*opt.FiltersOption); ok { return v } } return nil }
[ "func", "ExtractFilters", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "FiltersOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "FiltersOption", ")", "...
// ExtractFilters returns the first found FiltersOption from the // given variadic arguments or nil otherwise.
[ "ExtractFilters", "returns", "the", "first", "found", "FiltersOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/filters.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/restrict_highlight_and_snippet_arrays.go
ExtractRestrictHighlightAndSnippetArrays
func ExtractRestrictHighlightAndSnippetArrays(opts ...interface{}) *opt.RestrictHighlightAndSnippetArraysOption { for _, o := range opts { if v, ok := o.(*opt.RestrictHighlightAndSnippetArraysOption); ok { return v } } return nil }
go
func ExtractRestrictHighlightAndSnippetArrays(opts ...interface{}) *opt.RestrictHighlightAndSnippetArraysOption { for _, o := range opts { if v, ok := o.(*opt.RestrictHighlightAndSnippetArraysOption); ok { return v } } return nil }
[ "func", "ExtractRestrictHighlightAndSnippetArrays", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "RestrictHighlightAndSnippetArraysOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", ...
// ExtractRestrictHighlightAndSnippetArrays returns the first found RestrictHighlightAndSnippetArraysOption from the // given variadic arguments or nil otherwise.
[ "ExtractRestrictHighlightAndSnippetArrays", "returns", "the", "first", "found", "RestrictHighlightAndSnippetArraysOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/restrict_highlight_and_snippet_arrays.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/query.go
QueryEqual
func QueryEqual(o1, o2 *QueryOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func QueryEqual(o1, o2 *QueryOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "QueryEqual", "(", "o1", ",", "o2", "*", "QueryOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", "o1"...
// QueryEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "QueryEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "default"...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/query.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/length.go
ExtractLength
func ExtractLength(opts ...interface{}) *opt.LengthOption { for _, o := range opts { if v, ok := o.(*opt.LengthOption); ok { return v } } return nil }
go
func ExtractLength(opts ...interface{}) *opt.LengthOption { for _, o := range opts { if v, ok := o.(*opt.LengthOption); ok { return v } } return nil }
[ "func", "ExtractLength", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "LengthOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "LengthOption", ")", ";",...
// ExtractLength returns the first found LengthOption from the // given variadic arguments or nil otherwise.
[ "ExtractLength", "returns", "the", "first", "found", "LengthOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/length.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/faceting_after_distinct.go
ExtractFacetingAfterDistinct
func ExtractFacetingAfterDistinct(opts ...interface{}) *opt.FacetingAfterDistinctOption { for _, o := range opts { if v, ok := o.(*opt.FacetingAfterDistinctOption); ok { return v } } return nil }
go
func ExtractFacetingAfterDistinct(opts ...interface{}) *opt.FacetingAfterDistinctOption { for _, o := range opts { if v, ok := o.(*opt.FacetingAfterDistinctOption); ok { return v } } return nil }
[ "func", "ExtractFacetingAfterDistinct", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "FacetingAfterDistinctOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", ...
// ExtractFacetingAfterDistinct returns the first found FacetingAfterDistinctOption from the // given variadic arguments or nil otherwise.
[ "ExtractFacetingAfterDistinct", "returns", "the", "first", "found", "FacetingAfterDistinctOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/faceting_after_distinct.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/max_values_per_facet.go
MaxValuesPerFacetEqual
func MaxValuesPerFacetEqual(o1, o2 *MaxValuesPerFacetOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func MaxValuesPerFacetEqual(o1, o2 *MaxValuesPerFacetOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "MaxValuesPerFacetEqual", "(", "o1", ",", "o2", "*", "MaxValuesPerFacetOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", ...
// MaxValuesPerFacetEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "MaxValuesPerFacetEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/max_values_per_facet.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/insights/client.go
NewClientWithConfig
func NewClientWithConfig(config Configuration) *Client { var hosts []*transport.StatefulHost if config.Hosts == nil { hosts = defaultHosts(config.Region) } else { for _, h := range config.Hosts { hosts = append(hosts, transport.NewStatefulHost(h, call.IsReadWrite)) } } return &Client{ appID: config.Ap...
go
func NewClientWithConfig(config Configuration) *Client { var hosts []*transport.StatefulHost if config.Hosts == nil { hosts = defaultHosts(config.Region) } else { for _, h := range config.Hosts { hosts = append(hosts, transport.NewStatefulHost(h, call.IsReadWrite)) } } return &Client{ appID: config.Ap...
[ "func", "NewClientWithConfig", "(", "config", "Configuration", ")", "*", "Client", "{", "var", "hosts", "[", "]", "*", "transport", ".", "StatefulHost", "\n\n", "if", "config", ".", "Hosts", "==", "nil", "{", "hosts", "=", "defaultHosts", "(", "config", "....
// NewClientWithConfig instantiates a new client able to interact with the // Algolia Insights API.
[ "NewClientWithConfig", "instantiates", "a", "new", "client", "able", "to", "interact", "with", "the", "Algolia", "Insights", "API", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/insights/client.go#L29-L53
train
algolia/algoliasearch-client-go
algolia/insights/client.go
User
func (c *Client) User(userToken string) *UserClient { return &UserClient{ UserToken: userToken, Client: *c, } }
go
func (c *Client) User(userToken string) *UserClient { return &UserClient{ UserToken: userToken, Client: *c, } }
[ "func", "(", "c", "*", "Client", ")", "User", "(", "userToken", "string", ")", "*", "UserClient", "{", "return", "&", "UserClient", "{", "UserToken", ":", "userToken", ",", "Client", ":", "*", "c", ",", "}", "\n", "}" ]
// User instantiates a new client able to interact with the Algolia Insights API // where all events will be sent with the userToken field preset according to // the given userToken.
[ "User", "instantiates", "a", "new", "client", "able", "to", "interact", "with", "the", "Algolia", "Insights", "API", "where", "all", "events", "will", "be", "sent", "with", "the", "userToken", "field", "preset", "according", "to", "the", "given", "userToken", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/insights/client.go#L58-L63
train
algolia/algoliasearch-client-go
algolia/insights/client.go
SendEvent
func (c *Client) SendEvent(event Event, opts ...interface{}) (res StatusMessageRes, err error) { return c.SendEvents([]Event{event}, opts...) }
go
func (c *Client) SendEvent(event Event, opts ...interface{}) (res StatusMessageRes, err error) { return c.SendEvents([]Event{event}, opts...) }
[ "func", "(", "c", "*", "Client", ")", "SendEvent", "(", "event", "Event", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "StatusMessageRes", ",", "err", "error", ")", "{", "return", "c", ".", "SendEvents", "(", "[", "]", "Event", "{", ...
// SendEvent sends a new raw event to the Algolia Insights API. This method // should only be used to send a custom event to the API. To send more common // and predefined events, please use methods from UserClient instead.
[ "SendEvent", "sends", "a", "new", "raw", "event", "to", "the", "Algolia", "Insights", "API", ".", "This", "method", "should", "only", "be", "used", "to", "send", "a", "custom", "event", "to", "the", "API", ".", "To", "send", "more", "common", "and", "p...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/insights/client.go#L68-L70
train
algolia/algoliasearch-client-go
algolia/insights/client.go
SendEvents
func (c *Client) SendEvents(events []Event, opts ...interface{}) (res StatusMessageRes, err error) { body := newSendEventsReq(events) err = c.transport.Request(&res, http.MethodPost, "/1/events", body, call.Write, opts...) return }
go
func (c *Client) SendEvents(events []Event, opts ...interface{}) (res StatusMessageRes, err error) { body := newSendEventsReq(events) err = c.transport.Request(&res, http.MethodPost, "/1/events", body, call.Write, opts...) return }
[ "func", "(", "c", "*", "Client", ")", "SendEvents", "(", "events", "[", "]", "Event", ",", "opts", "...", "interface", "{", "}", ")", "(", "res", "StatusMessageRes", ",", "err", "error", ")", "{", "body", ":=", "newSendEventsReq", "(", "events", ")", ...
// SendEvents sends new raw events to the Algolia Insights API. This method // should only be used to send custom events to the API. To send more common and // predefined events, please use methods from UserClient instead.
[ "SendEvents", "sends", "new", "raw", "events", "to", "the", "Algolia", "Insights", "API", ".", "This", "method", "should", "only", "be", "used", "to", "send", "custom", "events", "to", "the", "API", ".", "To", "send", "more", "common", "and", "predefined",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/insights/client.go#L75-L79
train
algolia/algoliasearch-client-go
algolia/opt/synonyms.go
SynonymsEqual
func SynonymsEqual(o1, o2 *SynonymsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func SynonymsEqual(o1, o2 *SynonymsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "SynonymsEqual", "(", "o1", ",", "o2", "*", "SynonymsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", ...
// SynonymsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "SynonymsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "defau...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/synonyms.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/opt/allow_typos_on_numeric_tokens.go
AllowTyposOnNumericTokensEqual
func AllowTyposOnNumericTokensEqual(o1, o2 *AllowTyposOnNumericTokensOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func AllowTyposOnNumericTokensEqual(o1, o2 *AllowTyposOnNumericTokensOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "AllowTyposOnNumericTokensEqual", "(", "o1", ",", "o2", "*", "AllowTyposOnNumericTokensOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return",...
// AllowTyposOnNumericTokensEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "AllowTyposOnNumericTokensEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/allow_typos_on_numeric_tokens.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/enable_rules.go
ExtractEnableRules
func ExtractEnableRules(opts ...interface{}) *opt.EnableRulesOption { for _, o := range opts { if v, ok := o.(*opt.EnableRulesOption); ok { return v } } return nil }
go
func ExtractEnableRules(opts ...interface{}) *opt.EnableRulesOption { for _, o := range opts { if v, ok := o.(*opt.EnableRulesOption); ok { return v } } return nil }
[ "func", "ExtractEnableRules", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "EnableRulesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "EnableRulesOption"...
// ExtractEnableRules returns the first found EnableRulesOption from the // given variadic arguments or nil otherwise.
[ "ExtractEnableRules", "returns", "the", "first", "found", "EnableRulesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/enable_rules.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/percentile_computation.go
ExtractPercentileComputation
func ExtractPercentileComputation(opts ...interface{}) *opt.PercentileComputationOption { for _, o := range opts { if v, ok := o.(*opt.PercentileComputationOption); ok { return v } } return nil }
go
func ExtractPercentileComputation(opts ...interface{}) *opt.PercentileComputationOption { for _, o := range opts { if v, ok := o.(*opt.PercentileComputationOption); ok { return v } } return nil }
[ "func", "ExtractPercentileComputation", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "PercentileComputationOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", ...
// ExtractPercentileComputation returns the first found PercentileComputationOption from the // given variadic arguments or nil otherwise.
[ "ExtractPercentileComputation", "returns", "the", "first", "found", "PercentileComputationOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/percentile_computation.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/page.go
PageEqual
func PageEqual(o1, o2 *PageOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func PageEqual(o1, o2 *PageOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "PageEqual", "(", "o1", ",", "o2", "*", "PageOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", "o1", ...
// PageEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "PageEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "default",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/page.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/analytics/client.go
NewClientWithConfig
func NewClientWithConfig(config Configuration) *Client { var hosts []*transport.StatefulHost if config.Hosts == nil { hosts = defaultHosts(config.Region) } else { for _, h := range config.Hosts { hosts = append(hosts, transport.NewStatefulHost(h, call.IsReadWrite)) } } searchConfig := search.Configurati...
go
func NewClientWithConfig(config Configuration) *Client { var hosts []*transport.StatefulHost if config.Hosts == nil { hosts = defaultHosts(config.Region) } else { for _, h := range config.Hosts { hosts = append(hosts, transport.NewStatefulHost(h, call.IsReadWrite)) } } searchConfig := search.Configurati...
[ "func", "NewClientWithConfig", "(", "config", "Configuration", ")", "*", "Client", "{", "var", "hosts", "[", "]", "*", "transport", ".", "StatefulHost", "\n\n", "if", "config", ".", "Hosts", "==", "nil", "{", "hosts", "=", "defaultHosts", "(", "config", "....
// NewClientWithConfig instantiates a new client able to interact with the // Algolia Analytics API.
[ "NewClientWithConfig", "instantiates", "a", "new", "client", "able", "to", "interact", "with", "the", "Algolia", "Analytics", "API", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/analytics/client.go#L29-L64
train
algolia/algoliasearch-client-go
algolia/internal/opt/attributes_to_retrieve.go
ExtractAttributesToRetrieve
func ExtractAttributesToRetrieve(opts ...interface{}) *opt.AttributesToRetrieveOption { for _, o := range opts { if v, ok := o.(*opt.AttributesToRetrieveOption); ok { return v } } return nil }
go
func ExtractAttributesToRetrieve(opts ...interface{}) *opt.AttributesToRetrieveOption { for _, o := range opts { if v, ok := o.(*opt.AttributesToRetrieveOption); ok { return v } } return nil }
[ "func", "ExtractAttributesToRetrieve", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "AttributesToRetrieveOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "...
// ExtractAttributesToRetrieve returns the first found AttributesToRetrieveOption from the // given variadic arguments or nil otherwise.
[ "ExtractAttributesToRetrieve", "returns", "the", "first", "found", "AttributesToRetrieveOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/attributes_to_retrieve.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/remove_stop_words.go
MarshalJSON
func (o RemoveStopWordsOption) MarshalJSON() ([]byte, error) { if len(o.languages) > 0 { return json.Marshal(o.languages) } return json.Marshal(o.removeStopWords) }
go
func (o RemoveStopWordsOption) MarshalJSON() ([]byte, error) { if len(o.languages) > 0 { return json.Marshal(o.languages) } return json.Marshal(o.removeStopWords) }
[ "func", "(", "o", "RemoveStopWordsOption", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "len", "(", "o", ".", "languages", ")", ">", "0", "{", "return", "json", ".", "Marshal", "(", "o", ".", "languages", ")", ...
// MarshalJSON implements the json.Marshaler interface for // RemoveStopWordsOption.
[ "MarshalJSON", "implements", "the", "json", ".", "Marshaler", "interface", "for", "RemoveStopWordsOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/remove_stop_words.go#L36-L41
train
algolia/algoliasearch-client-go
algolia/opt/remove_stop_words.go
UnmarshalJSON
func (o *RemoveStopWordsOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } if err := json.Unmarshal(data, &o.languages); err == nil { return nil } return json.Unmarshal(data, &o.removeStopWords) }
go
func (o *RemoveStopWordsOption) UnmarshalJSON(data []byte) error { if string(data) == "null" { return nil } if err := json.Unmarshal(data, &o.languages); err == nil { return nil } return json.Unmarshal(data, &o.removeStopWords) }
[ "func", "(", "o", "*", "RemoveStopWordsOption", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "string", "(", "data", ")", "==", "\"", "\"", "{", "return", "nil", "\n", "}", "\n\n", "if", "err", ":=", "json", ".", "Un...
// UnmarshalJSON implements the json.Unmarshaler interface for // RemoveStopWordsOption.
[ "UnmarshalJSON", "implements", "the", "json", ".", "Unmarshaler", "interface", "for", "RemoveStopWordsOption", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/remove_stop_words.go#L45-L55
train
algolia/algoliasearch-client-go
algolia/opt/remove_stop_words.go
RemoveStopWordsEqual
func RemoveStopWordsEqual(o1, o2 *RemoveStopWordsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func RemoveStopWordsEqual(o1, o2 *RemoveStopWordsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "RemoveStopWordsEqual", "(", "o1", ",", "o2", "*", "RemoveStopWordsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "E...
// RemoveStopWordsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "RemoveStopWordsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/remove_stop_words.go#L70-L78
train
algolia/algoliasearch-client-go
algolia/internal/opt/explain.go
ExtractExplain
func ExtractExplain(opts ...interface{}) *opt.ExplainOption { for _, o := range opts { if v, ok := o.(*opt.ExplainOption); ok { return v } } return nil }
go
func ExtractExplain(opts ...interface{}) *opt.ExplainOption { for _, o := range opts { if v, ok := o.(*opt.ExplainOption); ok { return v } } return nil }
[ "func", "ExtractExplain", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ExplainOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "ExplainOption", ")", "...
// ExtractExplain returns the first found ExplainOption from the // given variadic arguments or nil otherwise.
[ "ExtractExplain", "returns", "the", "first", "found", "ExplainOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/explain.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/internal/opt/restrict_searchable_attributes.go
ExtractRestrictSearchableAttributes
func ExtractRestrictSearchableAttributes(opts ...interface{}) *opt.RestrictSearchableAttributesOption { for _, o := range opts { if v, ok := o.(*opt.RestrictSearchableAttributesOption); ok { return v } } return nil }
go
func ExtractRestrictSearchableAttributes(opts ...interface{}) *opt.RestrictSearchableAttributesOption { for _, o := range opts { if v, ok := o.(*opt.RestrictSearchableAttributesOption); ok { return v } } return nil }
[ "func", "ExtractRestrictSearchableAttributes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "RestrictSearchableAttributesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "...
// ExtractRestrictSearchableAttributes returns the first found RestrictSearchableAttributesOption from the // given variadic arguments or nil otherwise.
[ "ExtractRestrictSearchableAttributes", "returns", "the", "first", "found", "RestrictSearchableAttributesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/restrict_searchable_attributes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/replace_existing_synonyms.go
ReplaceExistingSynonymsEqual
func ReplaceExistingSynonymsEqual(o1, o2 *ReplaceExistingSynonymsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func ReplaceExistingSynonymsEqual(o1, o2 *ReplaceExistingSynonymsOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "ReplaceExistingSynonymsEqual", "(", "o1", ",", "o2", "*", "ReplaceExistingSynonymsOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "...
// ReplaceExistingSynonymsEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "ReplaceExistingSynonymsEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", ...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/replace_existing_synonyms.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/internal/opt/scopes.go
ExtractScopes
func ExtractScopes(opts ...interface{}) *opt.ScopesOption { for _, o := range opts { if v, ok := o.(*opt.ScopesOption); ok { return v } } return nil }
go
func ExtractScopes(opts ...interface{}) *opt.ScopesOption { for _, o := range opts { if v, ok := o.(*opt.ScopesOption); ok { return v } } return nil }
[ "func", "ExtractScopes", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "ScopesOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "ScopesOption", ")", ";",...
// ExtractScopes returns the first found ScopesOption from the // given variadic arguments or nil otherwise.
[ "ExtractScopes", "returns", "the", "first", "found", "ScopesOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/scopes.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/search/client_operations.go
CopySynonyms
func (c *Client) CopySynonyms(source, destination string, opts ...interface{}) (UpdateTaskRes, error) { opts = opt.InsertOrReplaceOption(opts, opt.Scopes("synonyms")) return c.CopyIndex(source, destination, opts...) }
go
func (c *Client) CopySynonyms(source, destination string, opts ...interface{}) (UpdateTaskRes, error) { opts = opt.InsertOrReplaceOption(opts, opt.Scopes("synonyms")) return c.CopyIndex(source, destination, opts...) }
[ "func", "(", "c", "*", "Client", ")", "CopySynonyms", "(", "source", ",", "destination", "string", ",", "opts", "...", "interface", "{", "}", ")", "(", "UpdateTaskRes", ",", "error", ")", "{", "opts", "=", "opt", ".", "InsertOrReplaceOption", "(", "opts"...
// CopySynonyms copies the synonyms from the given source index into the destination one. // // This method can only be used with indices which belong to the same Algolia application.
[ "CopySynonyms", "copies", "the", "synonyms", "from", "the", "given", "source", "index", "into", "the", "destination", "one", ".", "This", "method", "can", "only", "be", "used", "with", "indices", "which", "belong", "to", "the", "same", "Algolia", "application"...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/client_operations.go#L26-L29
train
algolia/algoliasearch-client-go
algolia/internal/opt/synonyms.go
ExtractSynonyms
func ExtractSynonyms(opts ...interface{}) *opt.SynonymsOption { for _, o := range opts { if v, ok := o.(*opt.SynonymsOption); ok { return v } } return nil }
go
func ExtractSynonyms(opts ...interface{}) *opt.SynonymsOption { for _, o := range opts { if v, ok := o.(*opt.SynonymsOption); ok { return v } } return nil }
[ "func", "ExtractSynonyms", "(", "opts", "...", "interface", "{", "}", ")", "*", "opt", ".", "SynonymsOption", "{", "for", "_", ",", "o", ":=", "range", "opts", "{", "if", "v", ",", "ok", ":=", "o", ".", "(", "*", "opt", ".", "SynonymsOption", ")", ...
// ExtractSynonyms returns the first found SynonymsOption from the // given variadic arguments or nil otherwise.
[ "ExtractSynonyms", "returns", "the", "first", "found", "SynonymsOption", "from", "the", "given", "variadic", "arguments", "or", "nil", "otherwise", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/internal/opt/synonyms.go#L11-L18
train
algolia/algoliasearch-client-go
algolia/opt/safe.go
SafeEqual
func SafeEqual(o1, o2 *SafeOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
go
func SafeEqual(o1, o2 *SafeOption) bool { if o1 != nil { return o1.Equal(o2) } if o2 != nil { return o2.Equal(o1) } return true }
[ "func", "SafeEqual", "(", "o1", ",", "o2", "*", "SafeOption", ")", "bool", "{", "if", "o1", "!=", "nil", "{", "return", "o1", ".", "Equal", "(", "o2", ")", "\n", "}", "\n", "if", "o2", "!=", "nil", "{", "return", "o2", ".", "Equal", "(", "o1", ...
// SafeEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "SafeEqual", "returns", "true", "if", "the", "two", "options", "are", "equal", ".", "In", "case", "of", "one", "option", "being", "nil", "the", "value", "of", "the", "other", "must", "be", "nil", "as", "well", "or", "be", "set", "to", "the", "default",...
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/opt/safe.go#L55-L63
train
algolia/algoliasearch-client-go
algolia/search/index.go
WaitTask
func (i *Index) WaitTask(taskID int) error { return waitWithRetry(func() (bool, error) { res, err := i.GetStatus(taskID) if err != nil { return true, err } if res.Status == "published" { return true, nil } return false, nil }) }
go
func (i *Index) WaitTask(taskID int) error { return waitWithRetry(func() (bool, error) { res, err := i.GetStatus(taskID) if err != nil { return true, err } if res.Status == "published" { return true, nil } return false, nil }) }
[ "func", "(", "i", "*", "Index", ")", "WaitTask", "(", "taskID", "int", ")", "error", "{", "return", "waitWithRetry", "(", "func", "(", ")", "(", "bool", ",", "error", ")", "{", "res", ",", "err", ":=", "i", ".", "GetStatus", "(", "taskID", ")", "...
// WaitTask blocks until the task identified by the given taskID is completed on // Algolia engine.
[ "WaitTask", "blocks", "until", "the", "task", "identified", "by", "the", "given", "taskID", "is", "completed", "on", "Algolia", "engine", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index.go#L40-L51
train
algolia/algoliasearch-client-go
algolia/search/index.go
ClearObjects
func (i *Index) ClearObjects(opts ...interface{}) (res UpdateTaskRes, err error) { path := i.path("/clear") err = i.transport.Request(&res, http.MethodPost, path, nil, call.Write, opts...) res.wait = i.WaitTask return }
go
func (i *Index) ClearObjects(opts ...interface{}) (res UpdateTaskRes, err error) { path := i.path("/clear") err = i.transport.Request(&res, http.MethodPost, path, nil, call.Write, opts...) res.wait = i.WaitTask return }
[ "func", "(", "i", "*", "Index", ")", "ClearObjects", "(", "opts", "...", "interface", "{", "}", ")", "(", "res", "UpdateTaskRes", ",", "err", "error", ")", "{", "path", ":=", "i", ".", "path", "(", "\"", "\"", ")", "\n", "err", "=", "i", ".", "...
// ClearObjects deletes all the records of the index.
[ "ClearObjects", "deletes", "all", "the", "records", "of", "the", "index", "." ]
dc059c0414d8c06e2b2bb47412b2130799bfcc9f
https://github.com/algolia/algoliasearch-client-go/blob/dc059c0414d8c06e2b2bb47412b2130799bfcc9f/algolia/search/index.go#L76-L81
train