This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
messages.go
447 lines (381 loc) · 13.7 KB
/
messages.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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
package messages
type Attachment struct {
Body string `json:"body"`
ContentEncoding AttachmentContentEncoding `json:"contentEncoding"`
FileName string `json:"fileName,omitempty"`
MediaType string `json:"mediaType"`
Source *Source `json:"source,omitempty"`
TestCaseStartedId string `json:"testCaseStartedId,omitempty"`
TestStepId string `json:"testStepId,omitempty"`
Url string `json:"url,omitempty"`
}
type Duration struct {
Seconds int64 `json:"seconds"`
Nanos int64 `json:"nanos"`
}
type Envelope struct {
Attachment *Attachment `json:"attachment,omitempty"`
GherkinDocument *GherkinDocument `json:"gherkinDocument,omitempty"`
Hook *Hook `json:"hook,omitempty"`
Meta *Meta `json:"meta,omitempty"`
ParameterType *ParameterType `json:"parameterType,omitempty"`
ParseError *ParseError `json:"parseError,omitempty"`
Pickle *Pickle `json:"pickle,omitempty"`
Source *Source `json:"source,omitempty"`
StepDefinition *StepDefinition `json:"stepDefinition,omitempty"`
TestCase *TestCase `json:"testCase,omitempty"`
TestCaseFinished *TestCaseFinished `json:"testCaseFinished,omitempty"`
TestCaseStarted *TestCaseStarted `json:"testCaseStarted,omitempty"`
TestRunFinished *TestRunFinished `json:"testRunFinished,omitempty"`
TestRunStarted *TestRunStarted `json:"testRunStarted,omitempty"`
TestStepFinished *TestStepFinished `json:"testStepFinished,omitempty"`
TestStepStarted *TestStepStarted `json:"testStepStarted,omitempty"`
UndefinedParameterType *UndefinedParameterType `json:"undefinedParameterType,omitempty"`
}
type GherkinDocument struct {
Uri string `json:"uri,omitempty"`
Feature *Feature `json:"feature,omitempty"`
Comments []*Comment `json:"comments"`
}
type Background struct {
Location *Location `json:"location"`
Keyword string `json:"keyword"`
Name string `json:"name"`
Description string `json:"description"`
Steps []*Step `json:"steps"`
Id string `json:"id"`
}
type Comment struct {
Location *Location `json:"location"`
Text string `json:"text"`
}
type DataTable struct {
Location *Location `json:"location"`
Rows []*TableRow `json:"rows"`
}
type DocString struct {
Location *Location `json:"location"`
MediaType string `json:"mediaType,omitempty"`
Content string `json:"content"`
Delimiter string `json:"delimiter"`
}
type Examples struct {
Location *Location `json:"location"`
Tags []*Tag `json:"tags"`
Keyword string `json:"keyword"`
Name string `json:"name"`
Description string `json:"description"`
TableHeader *TableRow `json:"tableHeader,omitempty"`
TableBody []*TableRow `json:"tableBody"`
Id string `json:"id"`
}
type Feature struct {
Location *Location `json:"location"`
Tags []*Tag `json:"tags"`
Language string `json:"language"`
Keyword string `json:"keyword"`
Name string `json:"name"`
Description string `json:"description"`
Children []*FeatureChild `json:"children"`
}
type FeatureChild struct {
Rule *Rule `json:"rule,omitempty"`
Background *Background `json:"background,omitempty"`
Scenario *Scenario `json:"scenario,omitempty"`
}
type Rule struct {
Location *Location `json:"location"`
Tags []*Tag `json:"tags"`
Keyword string `json:"keyword"`
Name string `json:"name"`
Description string `json:"description"`
Children []*RuleChild `json:"children"`
Id string `json:"id"`
}
type RuleChild struct {
Background *Background `json:"background,omitempty"`
Scenario *Scenario `json:"scenario,omitempty"`
}
type Scenario struct {
Location *Location `json:"location"`
Tags []*Tag `json:"tags"`
Keyword string `json:"keyword"`
Name string `json:"name"`
Description string `json:"description"`
Steps []*Step `json:"steps"`
Examples []*Examples `json:"examples"`
Id string `json:"id"`
}
type Step struct {
Location *Location `json:"location"`
Keyword string `json:"keyword"`
Text string `json:"text"`
DocString *DocString `json:"docString,omitempty"`
DataTable *DataTable `json:"dataTable,omitempty"`
Id string `json:"id"`
}
type TableCell struct {
Location *Location `json:"location"`
Value string `json:"value"`
}
type TableRow struct {
Location *Location `json:"location"`
Cells []*TableCell `json:"cells"`
Id string `json:"id"`
}
type Tag struct {
Location *Location `json:"location"`
Name string `json:"name"`
Id string `json:"id"`
}
type Hook struct {
Id string `json:"id"`
SourceReference *SourceReference `json:"sourceReference"`
TagExpression string `json:"tagExpression,omitempty"`
}
type Location struct {
Line int64 `json:"line"`
Column int64 `json:"column,omitempty"`
}
type Meta struct {
ProtocolVersion string `json:"protocolVersion"`
Implementation *Product `json:"implementation"`
Runtime *Product `json:"runtime"`
Os *Product `json:"os"`
Cpu *Product `json:"cpu"`
Ci *Ci `json:"ci,omitempty"`
}
type Ci struct {
Name string `json:"name"`
Url string `json:"url,omitempty"`
Git *Git `json:"git,omitempty"`
}
type Git struct {
Remote string `json:"remote"`
Revision string `json:"revision"`
Branch string `json:"branch,omitempty"`
Tag string `json:"tag,omitempty"`
}
type Product struct {
Name string `json:"name"`
Version string `json:"version,omitempty"`
}
type ParameterType struct {
Name string `json:"name"`
RegularExpressions []string `json:"regularExpressions"`
PreferForRegularExpressionMatch bool `json:"preferForRegularExpressionMatch"`
UseForSnippets bool `json:"useForSnippets"`
Id string `json:"id"`
}
type ParseError struct {
Source *SourceReference `json:"source"`
Message string `json:"message"`
}
type Pickle struct {
Id string `json:"id"`
Uri string `json:"uri"`
Name string `json:"name"`
Language string `json:"language"`
Steps []*PickleStep `json:"steps"`
Tags []*PickleTag `json:"tags"`
AstNodeIds []string `json:"astNodeIds"`
}
type PickleDocString struct {
MediaType string `json:"mediaType,omitempty"`
Content string `json:"content"`
}
type PickleStep struct {
Argument *PickleStepArgument `json:"argument,omitempty"`
AstNodeIds []string `json:"astNodeIds"`
Id string `json:"id"`
Text string `json:"text"`
}
type PickleStepArgument struct {
DocString *PickleDocString `json:"docString,omitempty"`
DataTable *PickleTable `json:"dataTable,omitempty"`
}
type PickleTable struct {
Rows []*PickleTableRow `json:"rows"`
}
type PickleTableCell struct {
Value string `json:"value"`
}
type PickleTableRow struct {
Cells []*PickleTableCell `json:"cells"`
}
type PickleTag struct {
Name string `json:"name"`
AstNodeId string `json:"astNodeId"`
}
type Source struct {
Uri string `json:"uri"`
Data string `json:"data"`
MediaType SourceMediaType `json:"mediaType"`
}
type SourceReference struct {
Uri string `json:"uri,omitempty"`
JavaMethod *JavaMethod `json:"javaMethod,omitempty"`
JavaStackTraceElement *JavaStackTraceElement `json:"javaStackTraceElement,omitempty"`
Location *Location `json:"location,omitempty"`
}
type JavaMethod struct {
ClassName string `json:"className"`
MethodName string `json:"methodName"`
MethodParameterTypes []string `json:"methodParameterTypes"`
}
type JavaStackTraceElement struct {
ClassName string `json:"className"`
FileName string `json:"fileName"`
MethodName string `json:"methodName"`
}
type StepDefinition struct {
Id string `json:"id"`
Pattern *StepDefinitionPattern `json:"pattern"`
SourceReference *SourceReference `json:"sourceReference"`
}
type StepDefinitionPattern struct {
Source string `json:"source"`
Type StepDefinitionPatternType `json:"type"`
}
type TestCase struct {
Id string `json:"id"`
PickleId string `json:"pickleId"`
TestSteps []*TestStep `json:"testSteps"`
}
type Group struct {
Children []*Group `json:"children"`
Start int64 `json:"start,omitempty"`
Value string `json:"value,omitempty"`
}
type StepMatchArgument struct {
Group *Group `json:"group"`
ParameterTypeName string `json:"parameterTypeName,omitempty"`
}
type StepMatchArgumentsList struct {
StepMatchArguments []*StepMatchArgument `json:"stepMatchArguments"`
}
type TestStep struct {
HookId string `json:"hookId,omitempty"`
Id string `json:"id"`
PickleStepId string `json:"pickleStepId,omitempty"`
StepDefinitionIds []string `json:"stepDefinitionIds,omitempty"`
StepMatchArgumentsLists []*StepMatchArgumentsList `json:"stepMatchArgumentsLists,omitempty"`
}
type TestCaseFinished struct {
TestCaseStartedId string `json:"testCaseStartedId"`
Timestamp *Timestamp `json:"timestamp"`
}
type TestCaseStarted struct {
Attempt int64 `json:"attempt"`
Id string `json:"id"`
TestCaseId string `json:"testCaseId"`
Timestamp *Timestamp `json:"timestamp"`
}
type TestRunFinished struct {
Message string `json:"message,omitempty"`
Success bool `json:"success"`
Timestamp *Timestamp `json:"timestamp"`
}
type TestRunStarted struct {
Timestamp *Timestamp `json:"timestamp"`
}
type TestStepFinished struct {
TestCaseStartedId string `json:"testCaseStartedId"`
TestStepId string `json:"testStepId"`
TestStepResult *TestStepResult `json:"testStepResult"`
Timestamp *Timestamp `json:"timestamp"`
}
type TestStepResult struct {
Duration *Duration `json:"duration"`
Message string `json:"message,omitempty"`
Status TestStepResultStatus `json:"status"`
WillBeRetried bool `json:"willBeRetried"`
}
type TestStepStarted struct {
TestCaseStartedId string `json:"testCaseStartedId"`
TestStepId string `json:"testStepId"`
Timestamp *Timestamp `json:"timestamp"`
}
type Timestamp struct {
Seconds int64 `json:"seconds"`
Nanos int64 `json:"nanos"`
}
type UndefinedParameterType struct {
Expression string `json:"expression"`
Name string `json:"name"`
}
type AttachmentContentEncoding string
const (
AttachmentContentEncoding_IDENTITY AttachmentContentEncoding = "IDENTITY"
AttachmentContentEncoding_BASE64 AttachmentContentEncoding = "BASE64"
)
func (e AttachmentContentEncoding) String() string {
switch e {
case AttachmentContentEncoding_IDENTITY:
return "IDENTITY"
case AttachmentContentEncoding_BASE64:
return "BASE64"
default:
panic("Bad enum value for AttachmentContentEncoding")
}
}
type SourceMediaType string
const (
SourceMediaType_TEXT_X_CUCUMBER_GHERKIN_PLAIN SourceMediaType = "text/x.cucumber.gherkin+plain"
SourceMediaType_TEXT_X_CUCUMBER_GHERKIN_MARKDOWN SourceMediaType = "text/x.cucumber.gherkin+markdown"
)
func (e SourceMediaType) String() string {
switch e {
case SourceMediaType_TEXT_X_CUCUMBER_GHERKIN_PLAIN:
return "text/x.cucumber.gherkin+plain"
case SourceMediaType_TEXT_X_CUCUMBER_GHERKIN_MARKDOWN:
return "text/x.cucumber.gherkin+markdown"
default:
panic("Bad enum value for SourceMediaType")
}
}
type StepDefinitionPatternType string
const (
StepDefinitionPatternType_CUCUMBER_EXPRESSION StepDefinitionPatternType = "CUCUMBER_EXPRESSION"
StepDefinitionPatternType_REGULAR_EXPRESSION StepDefinitionPatternType = "REGULAR_EXPRESSION"
)
func (e StepDefinitionPatternType) String() string {
switch e {
case StepDefinitionPatternType_CUCUMBER_EXPRESSION:
return "CUCUMBER_EXPRESSION"
case StepDefinitionPatternType_REGULAR_EXPRESSION:
return "REGULAR_EXPRESSION"
default:
panic("Bad enum value for StepDefinitionPatternType")
}
}
type TestStepResultStatus string
const (
TestStepResultStatus_UNKNOWN TestStepResultStatus = "UNKNOWN"
TestStepResultStatus_PASSED TestStepResultStatus = "PASSED"
TestStepResultStatus_SKIPPED TestStepResultStatus = "SKIPPED"
TestStepResultStatus_PENDING TestStepResultStatus = "PENDING"
TestStepResultStatus_UNDEFINED TestStepResultStatus = "UNDEFINED"
TestStepResultStatus_AMBIGUOUS TestStepResultStatus = "AMBIGUOUS"
TestStepResultStatus_FAILED TestStepResultStatus = "FAILED"
)
func (e TestStepResultStatus) String() string {
switch e {
case TestStepResultStatus_UNKNOWN:
return "UNKNOWN"
case TestStepResultStatus_PASSED:
return "PASSED"
case TestStepResultStatus_SKIPPED:
return "SKIPPED"
case TestStepResultStatus_PENDING:
return "PENDING"
case TestStepResultStatus_UNDEFINED:
return "UNDEFINED"
case TestStepResultStatus_AMBIGUOUS:
return "AMBIGUOUS"
case TestStepResultStatus_FAILED:
return "FAILED"
default:
panic("Bad enum value for TestStepResultStatus")
}
}