-
Notifications
You must be signed in to change notification settings - Fork 625
/
Copy pathapi._.go
317 lines (306 loc) · 10.7 KB
/
api._.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
package esapi
// API contains the Elasticsearch APIs
//
type API struct {
Cat *Cat
Cluster *Cluster
Indices *Indices
Ingest *Ingest
Nodes *Nodes
Remote *Remote
Snapshot *Snapshot
Tasks *Tasks
Bulk Bulk
ClearScroll ClearScroll
Count Count
Create Create
Delete Delete
DeleteByQuery DeleteByQuery
DeleteByQueryRethrottle DeleteByQueryRethrottle
DeleteScript DeleteScript
Exists Exists
ExistsSource ExistsSource
Explain Explain
FieldCaps FieldCaps
Get Get
GetScript GetScript
GetSource GetSource
Index Index
Info Info
Mget Mget
Msearch Msearch
MsearchTemplate MsearchTemplate
Mtermvectors Mtermvectors
Ping Ping
PutScript PutScript
RankEval RankEval
Reindex Reindex
ReindexRethrottle ReindexRethrottle
RenderSearchTemplate RenderSearchTemplate
ScriptsPainlessExecute ScriptsPainlessExecute
Scroll Scroll
Search Search
SearchShards SearchShards
SearchTemplate SearchTemplate
Termvectors Termvectors
Update Update
UpdateByQuery UpdateByQuery
UpdateByQueryRethrottle UpdateByQueryRethrottle
}
// Cat contains the Cat APIs
type Cat struct {
Aliases CatAliases
Allocation CatAllocation
Count CatCount
Fielddata CatFielddata
Health CatHealth
Help CatHelp
Indices CatIndices
Master CatMaster
Nodeattrs CatNodeattrs
Nodes CatNodes
PendingTasks CatPendingTasks
Plugins CatPlugins
Recovery CatRecovery
Repositories CatRepositories
Segments CatSegments
Shards CatShards
Snapshots CatSnapshots
Tasks CatTasks
Templates CatTemplates
ThreadPool CatThreadPool
}
// Cluster contains the Cluster APIs
type Cluster struct {
AllocationExplain ClusterAllocationExplain
GetSettings ClusterGetSettings
Health ClusterHealth
PendingTasks ClusterPendingTasks
PutSettings ClusterPutSettings
RemoteInfo ClusterRemoteInfo
Reroute ClusterReroute
State ClusterState
Stats ClusterStats
}
// Indices contains the Indices APIs
type Indices struct {
Analyze IndicesAnalyze
ClearCache IndicesClearCache
Close IndicesClose
Create IndicesCreate
Delete IndicesDelete
DeleteAlias IndicesDeleteAlias
DeleteTemplate IndicesDeleteTemplate
Exists IndicesExists
ExistsAlias IndicesExistsAlias
ExistsTemplate IndicesExistsTemplate
ExistsType IndicesExistsType
Flush IndicesFlush
FlushSynced IndicesFlushSynced
Forcemerge IndicesForcemerge
Get IndicesGet
GetAlias IndicesGetAlias
GetFieldMapping IndicesGetFieldMapping
GetMapping IndicesGetMapping
GetSettings IndicesGetSettings
GetTemplate IndicesGetTemplate
GetUpgrade IndicesGetUpgrade
Open IndicesOpen
PutAlias IndicesPutAlias
PutMapping IndicesPutMapping
PutSettings IndicesPutSettings
PutTemplate IndicesPutTemplate
Recovery IndicesRecovery
Refresh IndicesRefresh
Rollover IndicesRollover
Segments IndicesSegments
ShardStores IndicesShardStores
Shrink IndicesShrink
Split IndicesSplit
Stats IndicesStats
UpdateAliases IndicesUpdateAliases
Upgrade IndicesUpgrade
ValidateQuery IndicesValidateQuery
}
// Ingest contains the Ingest APIs
type Ingest struct {
DeletePipeline IngestDeletePipeline
GetPipeline IngestGetPipeline
ProcessorGrok IngestProcessorGrok
PutPipeline IngestPutPipeline
Simulate IngestSimulate
}
// Nodes contains the Nodes APIs
type Nodes struct {
HotThreads NodesHotThreads
Info NodesInfo
ReloadSecureSettings NodesReloadSecureSettings
Stats NodesStats
Usage NodesUsage
}
// Remote contains the Remote APIs
type Remote struct {
}
// Snapshot contains the Snapshot APIs
type Snapshot struct {
Create SnapshotCreate
CreateRepository SnapshotCreateRepository
Delete SnapshotDelete
DeleteRepository SnapshotDeleteRepository
Get SnapshotGet
GetRepository SnapshotGetRepository
Restore SnapshotRestore
Status SnapshotStatus
VerifyRepository SnapshotVerifyRepository
}
// Tasks contains the Tasks APIs
type Tasks struct {
Cancel TasksCancel
Get TasksGet
List TasksList
}
// New creates new API
//
func New(t Transport) *API {
return &API{
Bulk: newBulkFunc(t),
ClearScroll: newClearScrollFunc(t),
Count: newCountFunc(t),
Create: newCreateFunc(t),
Delete: newDeleteFunc(t),
DeleteByQuery: newDeleteByQueryFunc(t),
DeleteByQueryRethrottle: newDeleteByQueryRethrottleFunc(t),
DeleteScript: newDeleteScriptFunc(t),
Exists: newExistsFunc(t),
ExistsSource: newExistsSourceFunc(t),
Explain: newExplainFunc(t),
FieldCaps: newFieldCapsFunc(t),
Get: newGetFunc(t),
GetScript: newGetScriptFunc(t),
GetSource: newGetSourceFunc(t),
Index: newIndexFunc(t),
Info: newInfoFunc(t),
Mget: newMgetFunc(t),
Msearch: newMsearchFunc(t),
MsearchTemplate: newMsearchTemplateFunc(t),
Mtermvectors: newMtermvectorsFunc(t),
Ping: newPingFunc(t),
PutScript: newPutScriptFunc(t),
RankEval: newRankEvalFunc(t),
Reindex: newReindexFunc(t),
ReindexRethrottle: newReindexRethrottleFunc(t),
RenderSearchTemplate: newRenderSearchTemplateFunc(t),
ScriptsPainlessExecute: newScriptsPainlessExecuteFunc(t),
Scroll: newScrollFunc(t),
Search: newSearchFunc(t),
SearchShards: newSearchShardsFunc(t),
SearchTemplate: newSearchTemplateFunc(t),
Termvectors: newTermvectorsFunc(t),
Update: newUpdateFunc(t),
UpdateByQuery: newUpdateByQueryFunc(t),
UpdateByQueryRethrottle: newUpdateByQueryRethrottleFunc(t),
Cat: &Cat{
Aliases: newCatAliasesFunc(t),
Allocation: newCatAllocationFunc(t),
Count: newCatCountFunc(t),
Fielddata: newCatFielddataFunc(t),
Health: newCatHealthFunc(t),
Help: newCatHelpFunc(t),
Indices: newCatIndicesFunc(t),
Master: newCatMasterFunc(t),
Nodeattrs: newCatNodeattrsFunc(t),
Nodes: newCatNodesFunc(t),
PendingTasks: newCatPendingTasksFunc(t),
Plugins: newCatPluginsFunc(t),
Recovery: newCatRecoveryFunc(t),
Repositories: newCatRepositoriesFunc(t),
Segments: newCatSegmentsFunc(t),
Shards: newCatShardsFunc(t),
Snapshots: newCatSnapshotsFunc(t),
Tasks: newCatTasksFunc(t),
Templates: newCatTemplatesFunc(t),
ThreadPool: newCatThreadPoolFunc(t),
},
Cluster: &Cluster{
AllocationExplain: newClusterAllocationExplainFunc(t),
GetSettings: newClusterGetSettingsFunc(t),
Health: newClusterHealthFunc(t),
PendingTasks: newClusterPendingTasksFunc(t),
PutSettings: newClusterPutSettingsFunc(t),
RemoteInfo: newClusterRemoteInfoFunc(t),
Reroute: newClusterRerouteFunc(t),
State: newClusterStateFunc(t),
Stats: newClusterStatsFunc(t),
},
Indices: &Indices{
Analyze: newIndicesAnalyzeFunc(t),
ClearCache: newIndicesClearCacheFunc(t),
Close: newIndicesCloseFunc(t),
Create: newIndicesCreateFunc(t),
Delete: newIndicesDeleteFunc(t),
DeleteAlias: newIndicesDeleteAliasFunc(t),
DeleteTemplate: newIndicesDeleteTemplateFunc(t),
Exists: newIndicesExistsFunc(t),
ExistsAlias: newIndicesExistsAliasFunc(t),
ExistsTemplate: newIndicesExistsTemplateFunc(t),
ExistsType: newIndicesExistsTypeFunc(t),
Flush: newIndicesFlushFunc(t),
FlushSynced: newIndicesFlushSyncedFunc(t),
Forcemerge: newIndicesForcemergeFunc(t),
Get: newIndicesGetFunc(t),
GetAlias: newIndicesGetAliasFunc(t),
GetFieldMapping: newIndicesGetFieldMappingFunc(t),
GetMapping: newIndicesGetMappingFunc(t),
GetSettings: newIndicesGetSettingsFunc(t),
GetTemplate: newIndicesGetTemplateFunc(t),
GetUpgrade: newIndicesGetUpgradeFunc(t),
Open: newIndicesOpenFunc(t),
PutAlias: newIndicesPutAliasFunc(t),
PutMapping: newIndicesPutMappingFunc(t),
PutSettings: newIndicesPutSettingsFunc(t),
PutTemplate: newIndicesPutTemplateFunc(t),
Recovery: newIndicesRecoveryFunc(t),
Refresh: newIndicesRefreshFunc(t),
Rollover: newIndicesRolloverFunc(t),
Segments: newIndicesSegmentsFunc(t),
ShardStores: newIndicesShardStoresFunc(t),
Shrink: newIndicesShrinkFunc(t),
Split: newIndicesSplitFunc(t),
Stats: newIndicesStatsFunc(t),
UpdateAliases: newIndicesUpdateAliasesFunc(t),
Upgrade: newIndicesUpgradeFunc(t),
ValidateQuery: newIndicesValidateQueryFunc(t),
},
Ingest: &Ingest{
DeletePipeline: newIngestDeletePipelineFunc(t),
GetPipeline: newIngestGetPipelineFunc(t),
ProcessorGrok: newIngestProcessorGrokFunc(t),
PutPipeline: newIngestPutPipelineFunc(t),
Simulate: newIngestSimulateFunc(t),
},
Nodes: &Nodes{
HotThreads: newNodesHotThreadsFunc(t),
Info: newNodesInfoFunc(t),
ReloadSecureSettings: newNodesReloadSecureSettingsFunc(t),
Stats: newNodesStatsFunc(t),
Usage: newNodesUsageFunc(t),
},
Remote: &Remote{},
Snapshot: &Snapshot{
Create: newSnapshotCreateFunc(t),
CreateRepository: newSnapshotCreateRepositoryFunc(t),
Delete: newSnapshotDeleteFunc(t),
DeleteRepository: newSnapshotDeleteRepositoryFunc(t),
Get: newSnapshotGetFunc(t),
GetRepository: newSnapshotGetRepositoryFunc(t),
Restore: newSnapshotRestoreFunc(t),
Status: newSnapshotStatusFunc(t),
VerifyRepository: newSnapshotVerifyRepositoryFunc(t),
},
Tasks: &Tasks{
Cancel: newTasksCancelFunc(t),
Get: newTasksGetFunc(t),
List: newTasksListFunc(t),
},
}
}