-
Notifications
You must be signed in to change notification settings - Fork 73
/
types.go
326 lines (298 loc) · 11.7 KB
/
types.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
318
319
320
321
322
323
324
325
326
// Code generated by tutone: DO NOT EDIT
package types
// OpenInstallationOperatingSystem - Operating System of target environment
type OpenInstallationOperatingSystem string
var OpenInstallationOperatingSystemTypes = struct {
// MacOS operating system
DARWIN OpenInstallationOperatingSystem
// Linux-based operating system
LINUX OpenInstallationOperatingSystem
// Windows operating system
WINDOWS OpenInstallationOperatingSystem
}{
// MacOS operating system
DARWIN: "DARWIN",
// Linux-based operating system
LINUX: "LINUX",
// Windows operating system
WINDOWS: "WINDOWS",
}
// OpenInstallationPlatform - Operating System distribution
type OpenInstallationPlatform string
var OpenInstallationPlatformTypes = struct {
// Amazon Linux operating system
AMAZON OpenInstallationPlatform
// CentOS operating system
CENTOS OpenInstallationPlatform
// Debian operating system
DEBIAN OpenInstallationPlatform
// RedHat Enterprise Linux operating system
REDHAT OpenInstallationPlatform
// SUSE operating system
SUSE OpenInstallationPlatform
// Ubuntu operating system
UBUNTU OpenInstallationPlatform
}{
// Amazon Linux operating system
AMAZON: "AMAZON",
// CentOS operating system
CENTOS: "CENTOS",
// Debian operating system
DEBIAN: "DEBIAN",
// RedHat Enterprise Linux operating system
REDHAT: "REDHAT",
// SUSE operating system
SUSE: "SUSE",
// Ubuntu operating system
UBUNTU: "UBUNTU",
}
// OpenInstallationPlatformFamily - Operating System distribution family
type OpenInstallationPlatformFamily string
var OpenInstallationPlatformFamilyTypes = struct {
// Debian distribution family
DEBIAN OpenInstallationPlatformFamily
// RHEL distribution family
RHEL OpenInstallationPlatformFamily
// openSUSE distribution family
SUSE OpenInstallationPlatformFamily
}{
// Debian distribution family
DEBIAN: "DEBIAN",
// RHEL distribution family
RHEL: "RHEL",
// openSUSE distribution family
SUSE: "SUSE",
}
// OpenInstallationStability - Stability level of recipe
type OpenInstallationStability string
var OpenInstallationStabilityTypes = struct {
// Recipe is disabled
DISABLED OpenInstallationStability
// Recipe is experimental
EXPERIMENTAL OpenInstallationStability
// Recipe is stable
STABLE OpenInstallationStability
}{
// Recipe is disabled
DISABLED: "DISABLED",
// Recipe is experimental
EXPERIMENTAL: "EXPERIMENTAL",
// Recipe is stable
STABLE: "STABLE",
}
// OpenInstallationSuccessLinkType - Success link type
type OpenInstallationSuccessLinkType string
var OpenInstallationSuccessLinkTypeTypes = struct {
// Explorer link
EXPLORER OpenInstallationSuccessLinkType
// Host entity link
HOST OpenInstallationSuccessLinkType
}{
// Explorer link
EXPLORER: "EXPLORER",
// Host entity link
HOST: "HOST",
}
// OpenInstallationTargetType - Installation target type
type OpenInstallationTargetType string
var OpenInstallationTargetTypeTypes = struct {
// APM agent installation
APPLICATION OpenInstallationTargetType
// Cloud provider installation
CLOUD OpenInstallationTargetType
// Docker container installation
DOCKER OpenInstallationTargetType
// Bare metal, virtual machine, or host-based installation
HOST OpenInstallationTargetType
// Kubernetes installation
KUBERNETES OpenInstallationTargetType
// Serverless installation
SERVERLESS OpenInstallationTargetType
}{
// APM agent installation
APPLICATION: "APPLICATION",
// Cloud provider installation
CLOUD: "CLOUD",
// Docker container installation
DOCKER: "DOCKER",
// Bare metal, virtual machine, or host-based installation
HOST: "HOST",
// Kubernetes installation
KUBERNETES: "KUBERNETES",
// Serverless installation
SERVERLESS: "SERVERLESS",
}
// OpenInstallationAttributes - Custom event data attributes
type OpenInstallationAttributes struct {
// Built-in parsing rulesets
Logtype string `json:"logtype,omitempty"`
}
// OpenInstallationDocsStitchedFields - Search for and execute installation of additional instrumentation and integrations
type OpenInstallationDocsStitchedFields struct {
// Fetch a recipe by ID
Recipe OpenInstallationRecipe `json:"recipe,omitempty"`
// Search all recipes
RecipeSearch OpenInstallationRecipeListResult `json:"recipeSearch,omitempty"`
// Get recommendations on what instrumentation to add
Recommendations OpenInstallationRecommendationsResult `json:"recommendations,omitempty"`
}
// OpenInstallationInstallTarget - Unique set of attributes which represent an install target
type OpenInstallationInstallTarget struct {
// OS kernel architecture
KernelArch string `json:"kernelArch,omitempty"`
// OS kernel version
KernelVersion string `json:"kernelVersion,omitempty"`
// Operating system
Os OpenInstallationOperatingSystem `json:"os,omitempty"`
// OS distribution
Platform OpenInstallationPlatform `json:"platform,omitempty"`
// OS distribution family
PlatformFamily OpenInstallationPlatformFamily `json:"platformFamily,omitempty"`
// OS distribution version
PlatformVersion string `json:"platformVersion,omitempty"`
// Target type
Type OpenInstallationTargetType `json:"type,omitempty"`
}
// OpenInstallationLogMatch - Matches partial list of the Log forwarding parameters
type OpenInstallationLogMatch struct {
// List of custom attributes, as key-value pairs, that can be used to send additional data with the logs which you can then query.
Attributes OpenInstallationAttributes `json:"attributes,omitempty"`
// Path to the log file or files.
File string `json:"file,omitempty"`
// Name of the log or logs.
Name string `json:"name"`
// Regular expression for filtering records.
Pattern string `json:"pattern,omitempty"`
// Service name (Linux Only).
Systemd string `json:"systemd,omitempty"`
}
// OpenInstallationPostInstallConfiguration - Optional post-install configuration items
type OpenInstallationPostInstallConfiguration struct {
// Message/Docs notice displayed to user after running the recipe
Info string `json:"info,omitempty"`
}
// OpenInstallationPreInstallConfiguration - Optional pre-install configuration items
type OpenInstallationPreInstallConfiguration struct {
// Message/Docs notice displayed to user prior to running recipe
Info string `json:"info,omitempty"`
// Message/Docs notice displayed to user prior to running recipe
Prompt string `json:"prompt,omitempty"`
// Script block to be executed during system discovery, a successful exit status will mark the recipe for execution
RequireAtDiscovery string `json:"requireAtDiscovery,omitempty"`
}
// OpenInstallationProcessDetailInput - Process details
type OpenInstallationProcessDetailInput struct {
// Process name
Name string `json:"name,omitempty"`
}
// OpenInstallationRecipe - Installation instructions and definition of an instrumentation integration
type OpenInstallationRecipe struct {
// Named list of dependencies for this recipe
Dependencies []string `json:"dependencies"`
// Description of the recipe
Description string `json:"description"`
// Friendly name of the integration
DisplayName string `json:"displayName,omitempty"`
// The full contents of the recipe file (yaml)
File string `json:"file"`
// The ID
ID string `json:"id,omitempty"`
// List of variables to prompt for input from the user
InputVars []OpenInstallationRecipeInputVariable `json:"inputVars"`
// Go-task's taskfile definition (see https://taskfile.dev/#/usage)
Install string `json:"install"`
// Object representing the intended install target
InstallTargets []OpenInstallationRecipeInstallTarget `json:"installTargets"`
// Tags
Keywords []string `json:"keywords"`
// # Partial list of possible Log forwarding parameters
LogMatch []OpenInstallationLogMatch `json:"logMatch"`
// Short unique handle for the name of the integration
Name string `json:"name,omitempty"`
// Object representing optional post-install configuration items
PostInstall OpenInstallationPostInstallConfiguration `json:"postInstall,omitempty"`
// Object representing optional pre-install configuration items
PreInstall OpenInstallationPreInstallConfiguration `json:"preInstall,omitempty"`
// List of process definitions used to match CLI process detection
ProcessMatch []string `json:"processMatch"`
// Github repository url
Repository string `json:"repository"`
// Indicates stability level of recipe
Stability OpenInstallationStability `json:"stability,omitempty"`
// Metadata to support generating a URL after installation success
SuccessLinkConfig OpenInstallationSuccessLinkConfig `json:"successLinkConfig,omitempty"`
// NRQL the newrelic-cli uses to validate this recipe
// is successfully sending data to New Relic
ValidationNRQL NRQL `json:"validationNrql,omitempty"`
// validation url to validate with infra health endpoint
ValidationURL string `json:"validationUrl,omitempty"`
}
// OpenInstallationRecipeInputVariable - Recipe input variable prompts displayed to the user prior to execution
type OpenInstallationRecipeInputVariable struct {
// Default value of variable
Default string `json:"default,omitempty"`
// Name of the variable
Name string `json:"name"`
// Message to present to the user
Prompt string `json:"prompt,omitempty"`
// Indicates a password field
Secret bool `json:"secret,omitempty"`
}
// OpenInstallationRecipeInstallTarget - Matrix of supported installation criteria for this recipe
type OpenInstallationRecipeInstallTarget struct {
// OS kernel architecture
KernelArch string `json:"kernelArch,omitempty"`
// OS kernel version
KernelVersion string `json:"kernelVersion,omitempty"`
// Operating system
Os OpenInstallationOperatingSystem `json:"os,omitempty"`
// Operating System distribution
Platform OpenInstallationPlatform `json:"platform,omitempty"`
// Operating System distribution family
PlatformFamily OpenInstallationPlatformFamily `json:"platformFamily,omitempty"`
// OS distribution version
PlatformVersion string `json:"platformVersion,omitempty"`
// Target type
Type OpenInstallationTargetType `json:"type,omitempty"`
}
// OpenInstallationRecipeListResult - List of recipes
type OpenInstallationRecipeListResult struct {
// Number of recipes returned
Count int `json:"count,omitempty"`
// List of recipes
Results []OpenInstallationRecipe `json:"results,omitempty"`
}
// OpenInstallationRecipeSearchCriteria - Input for searching installable integration recipes
type OpenInstallationRecipeSearchCriteria struct {
// Friendly name of the integration
DisplayName string `json:"displayName,omitempty"`
// Object representing the intended install target
InstallTarget OpenInstallationInstallTarget `json:"installTarget,omitempty"`
// Short unique handle for the name of the integration
Name string `json:"name,omitempty"`
}
// OpenInstallationRecommendationsInput - Criteria for controlling recommendations
type OpenInstallationRecommendationsInput struct {
// Unique set of attributes which represent an install target
InstallTarget OpenInstallationInstallTarget `json:"installTarget,omitempty"`
// List of processes
ProcessDetails []OpenInstallationProcessDetailInput `json:"processDetails,omitempty"`
}
// OpenInstallationRecommendationsResult - List of instrumentation recommendations
type OpenInstallationRecommendationsResult struct {
// Number of recipes returned
Count int `json:"count,omitempty"`
// List of matching recipes
Results []OpenInstallationRecipe `json:"results"`
}
// OpenInstallationSuccessLinkConfig - Metadata to support generating a URL after installation success
type OpenInstallationSuccessLinkConfig struct {
// An optional filter for appending to the URL
Filter string `json:"filter,omitempty"`
// The type of the link to generate
Type OpenInstallationSuccessLinkType `json:"type"`
}
// NRQL - This scalar represents a NRQL query string.
//
// See the [NRQL Docs](https://docs.newrelic.com/docs/insights/nrql-new-relic-query-language/nrql-resources/nrql-syntax-components-functions) for more information about NRQL syntax.
type NRQL string