-
Notifications
You must be signed in to change notification settings - Fork 1
/
generated.go
868 lines (714 loc) · 27.9 KB
/
generated.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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
package cloudclient
import (
"context"
"encoding/json"
"fmt"
"time"
"github.com/Khan/genqlient/graphql"
)
// AuthActorAuth includes the requested fields of the GraphQL type Auth.
type AuthActorAuth struct {
Actor AuthActorAuthActor `json:"-"`
}
// GetActor returns AuthActorAuth.Actor, and is useful for accessing the field via an interface.
func (v *AuthActorAuth) GetActor() AuthActorAuthActor { return v.Actor }
func (v *AuthActorAuth) UnmarshalJSON(b []byte) error {
if string(b) == "null" {
return nil
}
var firstPass struct {
*AuthActorAuth
Actor json.RawMessage `json:"actor"`
graphql.NoUnmarshalJSON
}
firstPass.AuthActorAuth = v
err := json.Unmarshal(b, &firstPass)
if err != nil {
return err
}
{
dst := &v.Actor
src := firstPass.Actor
if len(src) != 0 && string(src) != "null" {
err = __unmarshalAuthActorAuthActor(
src, dst)
if err != nil {
return fmt.Errorf(
"Unable to unmarshal AuthActorAuth.Actor: %w", err)
}
}
}
return nil
}
type __premarshalAuthActorAuth struct {
Actor json.RawMessage `json:"actor"`
}
func (v *AuthActorAuth) MarshalJSON() ([]byte, error) {
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
return json.Marshal(premarshaled)
}
func (v *AuthActorAuth) __premarshalJSON() (*__premarshalAuthActorAuth, error) {
var retval __premarshalAuthActorAuth
{
dst := &retval.Actor
src := v.Actor
var err error
*dst, err = __marshalAuthActorAuthActor(
&src)
if err != nil {
return nil, fmt.Errorf(
"Unable to marshal AuthActorAuth.Actor: %w", err)
}
}
return &retval, nil
}
// AuthActorAuthActor includes the requested fields of the GraphQL interface Actor.
//
// AuthActorAuthActor is implemented by the following types:
// AuthActorAuthActorAnonymousActor
// AuthActorAuthActorOrganizationToken
// AuthActorAuthActorUser
type AuthActorAuthActor interface {
implementsGraphQLInterfaceAuthActorAuthActor()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
GetTypename() string
// GetActor_type returns the interface-field "actor_type" from its implementation.
GetActor_type() string
// GetActor_id returns the interface-field "actor_id" from its implementation.
GetActor_id() string
}
func (v *AuthActorAuthActorAnonymousActor) implementsGraphQLInterfaceAuthActorAuthActor() {}
func (v *AuthActorAuthActorOrganizationToken) implementsGraphQLInterfaceAuthActorAuthActor() {}
func (v *AuthActorAuthActorUser) implementsGraphQLInterfaceAuthActorAuthActor() {}
func __unmarshalAuthActorAuthActor(b []byte, v *AuthActorAuthActor) error {
if string(b) == "null" {
return nil
}
var tn struct {
TypeName string `json:"__typename"`
}
err := json.Unmarshal(b, &tn)
if err != nil {
return err
}
switch tn.TypeName {
case "AnonymousActor":
*v = new(AuthActorAuthActorAnonymousActor)
return json.Unmarshal(b, *v)
case "OrganizationToken":
*v = new(AuthActorAuthActorOrganizationToken)
return json.Unmarshal(b, *v)
case "User":
*v = new(AuthActorAuthActorUser)
return json.Unmarshal(b, *v)
case "":
return fmt.Errorf(
"response was missing Actor.__typename")
default:
return fmt.Errorf(
`unexpected concrete type for AuthActorAuthActor: "%v"`, tn.TypeName)
}
}
func __marshalAuthActorAuthActor(v *AuthActorAuthActor) ([]byte, error) {
var typename string
switch v := (*v).(type) {
case *AuthActorAuthActorAnonymousActor:
typename = "AnonymousActor"
result := struct {
TypeName string `json:"__typename"`
*AuthActorAuthActorAnonymousActor
}{typename, v}
return json.Marshal(result)
case *AuthActorAuthActorOrganizationToken:
typename = "OrganizationToken"
result := struct {
TypeName string `json:"__typename"`
*AuthActorAuthActorOrganizationToken
}{typename, v}
return json.Marshal(result)
case *AuthActorAuthActorUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*AuthActorAuthActorUser
}{typename, v}
return json.Marshal(result)
case nil:
return []byte("null"), nil
default:
return nil, fmt.Errorf(
`unexpected concrete type for AuthActorAuthActor: "%T"`, v)
}
}
// AuthActorAuthActorAnonymousActor includes the requested fields of the GraphQL type AnonymousActor.
type AuthActorAuthActorAnonymousActor struct {
Typename string `json:"__typename"`
Actor_type string `json:"actor_type"`
Actor_id string `json:"actor_id"`
}
// GetTypename returns AuthActorAuthActorAnonymousActor.Typename, and is useful for accessing the field via an interface.
func (v *AuthActorAuthActorAnonymousActor) GetTypename() string { return v.Typename }
// GetActor_type returns AuthActorAuthActorAnonymousActor.Actor_type, and is useful for accessing the field via an interface.
func (v *AuthActorAuthActorAnonymousActor) GetActor_type() string { return v.Actor_type }
// GetActor_id returns AuthActorAuthActorAnonymousActor.Actor_id, and is useful for accessing the field via an interface.
func (v *AuthActorAuthActorAnonymousActor) GetActor_id() string { return v.Actor_id }
// AuthActorAuthActorOrganizationToken includes the requested fields of the GraphQL type OrganizationToken.
type AuthActorAuthActorOrganizationToken struct {
Typename string `json:"__typename"`
Actor_type string `json:"actor_type"`
Actor_id string `json:"actor_id"`
}
// GetTypename returns AuthActorAuthActorOrganizationToken.Typename, and is useful for accessing the field via an interface.
func (v *AuthActorAuthActorOrganizationToken) GetTypename() string { return v.Typename }
// GetActor_type returns AuthActorAuthActorOrganizationToken.Actor_type, and is useful for accessing the field via an interface.
func (v *AuthActorAuthActorOrganizationToken) GetActor_type() string { return v.Actor_type }
// GetActor_id returns AuthActorAuthActorOrganizationToken.Actor_id, and is useful for accessing the field via an interface.
func (v *AuthActorAuthActorOrganizationToken) GetActor_id() string { return v.Actor_id }
// AuthActorAuthActorUser includes the requested fields of the GraphQL type User.
type AuthActorAuthActorUser struct {
Typename string `json:"__typename"`
Actor_type string `json:"actor_type"`
Actor_id string `json:"actor_id"`
}
// GetTypename returns AuthActorAuthActorUser.Typename, and is useful for accessing the field via an interface.
func (v *AuthActorAuthActorUser) GetTypename() string { return v.Typename }
// GetActor_type returns AuthActorAuthActorUser.Actor_type, and is useful for accessing the field via an interface.
func (v *AuthActorAuthActorUser) GetActor_type() string { return v.Actor_type }
// GetActor_id returns AuthActorAuthActorUser.Actor_id, and is useful for accessing the field via an interface.
func (v *AuthActorAuthActorUser) GetActor_id() string { return v.Actor_id }
// AuthActorResponse is returned by AuthActor on success.
type AuthActorResponse struct {
Auth AuthActorAuth `json:"auth"`
}
// GetAuth returns AuthActorResponse.Auth, and is useful for accessing the field via an interface.
func (v *AuthActorResponse) GetAuth() AuthActorAuth { return v.Auth }
type FlowInput struct {
Name string `json:"name"`
Metas []FlowMetaInput `json:"metas"`
}
// GetName returns FlowInput.Name, and is useful for accessing the field via an interface.
func (v *FlowInput) GetName() string { return v.Name }
// GetMetas returns FlowInput.Metas, and is useful for accessing the field via an interface.
func (v *FlowInput) GetMetas() []FlowMetaInput { return v.Metas }
type FlowMetaInput struct {
Key string `json:"key"`
Value string `json:"value"`
}
// GetKey returns FlowMetaInput.Key, and is useful for accessing the field via an interface.
func (v *FlowMetaInput) GetKey() string { return v.Key }
// GetValue returns FlowMetaInput.Value, and is useful for accessing the field via an interface.
func (v *FlowMetaInput) GetValue() string { return v.Value }
type InvocationEndInput struct {
InvocationId string `json:"invocationId"`
Error bool `json:"error"`
}
// GetInvocationId returns InvocationEndInput.InvocationId, and is useful for accessing the field via an interface.
func (v *InvocationEndInput) GetInvocationId() string { return v.InvocationId }
// GetError returns InvocationEndInput.Error, and is useful for accessing the field via an interface.
func (v *InvocationEndInput) GetError() bool { return v.Error }
type InvocationInput struct {
Args []string `json:"args"`
Config json.RawMessage `json:"config"`
StartTime time.Time `json:"startTime"`
}
// GetArgs returns InvocationInput.Args, and is useful for accessing the field via an interface.
func (v *InvocationInput) GetArgs() []string { return v.Args }
// GetConfig returns InvocationInput.Config, and is useful for accessing the field via an interface.
func (v *InvocationInput) GetConfig() json.RawMessage { return v.Config }
// GetStartTime returns InvocationInput.StartTime, and is useful for accessing the field via an interface.
func (v *InvocationInput) GetStartTime() time.Time { return v.StartTime }
// LoginLoginLoginPayload includes the requested fields of the GraphQL type LoginPayload.
type LoginLoginLoginPayload struct {
Token string `json:"token"`
User LoginLoginLoginPayloadUser `json:"user"`
}
// GetToken returns LoginLoginLoginPayload.Token, and is useful for accessing the field via an interface.
func (v *LoginLoginLoginPayload) GetToken() string { return v.Token }
// GetUser returns LoginLoginLoginPayload.User, and is useful for accessing the field via an interface.
func (v *LoginLoginLoginPayload) GetUser() LoginLoginLoginPayloadUser { return v.User }
// LoginLoginLoginPayloadUser includes the requested fields of the GraphQL type User.
type LoginLoginLoginPayloadUser struct {
Id string `json:"id"`
Email string `json:"email"`
}
// GetId returns LoginLoginLoginPayloadUser.Id, and is useful for accessing the field via an interface.
func (v *LoginLoginLoginPayloadUser) GetId() string { return v.Id }
// GetEmail returns LoginLoginLoginPayloadUser.Email, and is useful for accessing the field via an interface.
func (v *LoginLoginLoginPayloadUser) GetEmail() string { return v.Email }
// LoginResponse is returned by Login on success.
type LoginResponse struct {
Login LoginLoginLoginPayload `json:"login"`
}
// GetLogin returns LoginResponse.Login, and is useful for accessing the field via an interface.
func (v *LoginResponse) GetLogin() LoginLoginLoginPayload { return v.Login }
// RegisterFlowInvocationRegisterFlowInvocationFlow includes the requested fields of the GraphQL type Flow.
type RegisterFlowInvocationRegisterFlowInvocationFlow struct {
Id string `json:"id"`
Invocations RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnection `json:"invocations"`
}
// GetId returns RegisterFlowInvocationRegisterFlowInvocationFlow.Id, and is useful for accessing the field via an interface.
func (v *RegisterFlowInvocationRegisterFlowInvocationFlow) GetId() string { return v.Id }
// GetInvocations returns RegisterFlowInvocationRegisterFlowInvocationFlow.Invocations, and is useful for accessing the field via an interface.
func (v *RegisterFlowInvocationRegisterFlowInvocationFlow) GetInvocations() RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnection {
return v.Invocations
}
// RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnection includes the requested fields of the GraphQL type InvocationConnection.
type RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnection struct {
Edges []RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdge `json:"edges"`
}
// GetEdges returns RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnection.Edges, and is useful for accessing the field via an interface.
func (v *RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnection) GetEdges() []RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdge {
return v.Edges
}
// RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdge includes the requested fields of the GraphQL type InvocationEdge.
type RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdge struct {
Node RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdgeNodeInvocation `json:"node"`
}
// GetNode returns RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdge.Node, and is useful for accessing the field via an interface.
func (v *RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdge) GetNode() RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdgeNodeInvocation {
return v.Node
}
// RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdgeNodeInvocation includes the requested fields of the GraphQL type Invocation.
type RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdgeNodeInvocation struct {
Id string `json:"id"`
}
// GetId returns RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdgeNodeInvocation.Id, and is useful for accessing the field via an interface.
func (v *RegisterFlowInvocationRegisterFlowInvocationFlowInvocationsInvocationConnectionEdgesInvocationEdgeNodeInvocation) GetId() string {
return v.Id
}
// RegisterFlowInvocationResponse is returned by RegisterFlowInvocation on success.
type RegisterFlowInvocationResponse struct {
RegisterFlowInvocation RegisterFlowInvocationRegisterFlowInvocationFlow `json:"registerFlowInvocation"`
}
// GetRegisterFlowInvocation returns RegisterFlowInvocationResponse.RegisterFlowInvocation, and is useful for accessing the field via an interface.
func (v *RegisterFlowInvocationResponse) GetRegisterFlowInvocation() RegisterFlowInvocationRegisterFlowInvocationFlow {
return v.RegisterFlowInvocation
}
// RegisterFlowRegisterFlow includes the requested fields of the GraphQL type Flow.
type RegisterFlowRegisterFlow struct {
Id string `json:"id"`
Url string `json:"url"`
}
// GetId returns RegisterFlowRegisterFlow.Id, and is useful for accessing the field via an interface.
func (v *RegisterFlowRegisterFlow) GetId() string { return v.Id }
// GetUrl returns RegisterFlowRegisterFlow.Url, and is useful for accessing the field via an interface.
func (v *RegisterFlowRegisterFlow) GetUrl() string { return v.Url }
// RegisterFlowResponse is returned by RegisterFlow on success.
type RegisterFlowResponse struct {
RegisterFlow RegisterFlowRegisterFlow `json:"registerFlow"`
}
// GetRegisterFlow returns RegisterFlowResponse.RegisterFlow, and is useful for accessing the field via an interface.
func (v *RegisterFlowResponse) GetRegisterFlow() RegisterFlowRegisterFlow { return v.RegisterFlow }
// RegisterInvocationRegisterInvocation includes the requested fields of the GraphQL type Invocation.
type RegisterInvocationRegisterInvocation struct {
Id string `json:"id"`
}
// GetId returns RegisterInvocationRegisterInvocation.Id, and is useful for accessing the field via an interface.
func (v *RegisterInvocationRegisterInvocation) GetId() string { return v.Id }
// RegisterInvocationResponse is returned by RegisterInvocation on success.
type RegisterInvocationResponse struct {
RegisterInvocation RegisterInvocationRegisterInvocation `json:"registerInvocation"`
}
// GetRegisterInvocation returns RegisterInvocationResponse.RegisterInvocation, and is useful for accessing the field via an interface.
func (v *RegisterInvocationResponse) GetRegisterInvocation() RegisterInvocationRegisterInvocation {
return v.RegisterInvocation
}
// SendEndInvocationEndInvocation includes the requested fields of the GraphQL type Invocation.
type SendEndInvocationEndInvocation struct {
Id string `json:"id"`
}
// GetId returns SendEndInvocationEndInvocation.Id, and is useful for accessing the field via an interface.
func (v *SendEndInvocationEndInvocation) GetId() string { return v.Id }
// SendEndInvocationResponse is returned by SendEndInvocation on success.
type SendEndInvocationResponse struct {
EndInvocation SendEndInvocationEndInvocation `json:"endInvocation"`
}
// GetEndInvocation returns SendEndInvocationResponse.EndInvocation, and is useful for accessing the field via an interface.
func (v *SendEndInvocationResponse) GetEndInvocation() SendEndInvocationEndInvocation {
return v.EndInvocation
}
// SendEventsIngestSpansTargetSpan includes the requested fields of the GraphQL type TargetSpan.
type SendEventsIngestSpansTargetSpan struct {
Id string `json:"id"`
SpanId string `json:"spanId"`
}
// GetId returns SendEventsIngestSpansTargetSpan.Id, and is useful for accessing the field via an interface.
func (v *SendEventsIngestSpansTargetSpan) GetId() string { return v.Id }
// GetSpanId returns SendEventsIngestSpansTargetSpan.SpanId, and is useful for accessing the field via an interface.
func (v *SendEventsIngestSpansTargetSpan) GetSpanId() string { return v.SpanId }
// SendEventsResponse is returned by SendEvents on success.
type SendEventsResponse struct {
IngestSpans []SendEventsIngestSpansTargetSpan `json:"ingestSpans"`
}
// GetIngestSpans returns SendEventsResponse.IngestSpans, and is useful for accessing the field via an interface.
func (v *SendEventsResponse) GetIngestSpans() []SendEventsIngestSpansTargetSpan { return v.IngestSpans }
// SendInvocationHeartbeatHeartbeatInvocation includes the requested fields of the GraphQL type Invocation.
type SendInvocationHeartbeatHeartbeatInvocation struct {
Id string `json:"id"`
}
// GetId returns SendInvocationHeartbeatHeartbeatInvocation.Id, and is useful for accessing the field via an interface.
func (v *SendInvocationHeartbeatHeartbeatInvocation) GetId() string { return v.Id }
// SendInvocationHeartbeatResponse is returned by SendInvocationHeartbeat on success.
type SendInvocationHeartbeatResponse struct {
HeartbeatInvocation SendInvocationHeartbeatHeartbeatInvocation `json:"heartbeatInvocation"`
}
// GetHeartbeatInvocation returns SendInvocationHeartbeatResponse.HeartbeatInvocation, and is useful for accessing the field via an interface.
func (v *SendInvocationHeartbeatResponse) GetHeartbeatInvocation() SendInvocationHeartbeatHeartbeatInvocation {
return v.HeartbeatInvocation
}
// SendLogsResponse is returned by SendLogs on success.
type SendLogsResponse struct {
IngestSpanLogs string `json:"ingestSpanLogs"`
}
// GetIngestSpanLogs returns SendLogsResponse.IngestSpanLogs, and is useful for accessing the field via an interface.
func (v *SendLogsResponse) GetIngestSpanLogs() string { return v.IngestSpanLogs }
// __LoginInput is used internally by genqlient
type __LoginInput struct {
Email string `json:"email"`
Pass string `json:"pass"`
}
// GetEmail returns __LoginInput.Email, and is useful for accessing the field via an interface.
func (v *__LoginInput) GetEmail() string { return v.Email }
// GetPass returns __LoginInput.Pass, and is useful for accessing the field via an interface.
func (v *__LoginInput) GetPass() string { return v.Pass }
// __RegisterFlowInput is used internally by genqlient
type __RegisterFlowInput struct {
ProjectId string `json:"projectId"`
Flow FlowInput `json:"flow"`
}
// GetProjectId returns __RegisterFlowInput.ProjectId, and is useful for accessing the field via an interface.
func (v *__RegisterFlowInput) GetProjectId() string { return v.ProjectId }
// GetFlow returns __RegisterFlowInput.Flow, and is useful for accessing the field via an interface.
func (v *__RegisterFlowInput) GetFlow() FlowInput { return v.Flow }
// __RegisterFlowInvocationInput is used internally by genqlient
type __RegisterFlowInvocationInput struct {
ProjectId string `json:"projectId"`
Flow FlowInput `json:"flow"`
Invocation InvocationInput `json:"invocation"`
}
// GetProjectId returns __RegisterFlowInvocationInput.ProjectId, and is useful for accessing the field via an interface.
func (v *__RegisterFlowInvocationInput) GetProjectId() string { return v.ProjectId }
// GetFlow returns __RegisterFlowInvocationInput.Flow, and is useful for accessing the field via an interface.
func (v *__RegisterFlowInvocationInput) GetFlow() FlowInput { return v.Flow }
// GetInvocation returns __RegisterFlowInvocationInput.Invocation, and is useful for accessing the field via an interface.
func (v *__RegisterFlowInvocationInput) GetInvocation() InvocationInput { return v.Invocation }
// __RegisterInvocationInput is used internally by genqlient
type __RegisterInvocationInput struct {
FlowId string `json:"flowId"`
Invocation InvocationInput `json:"invocation"`
}
// GetFlowId returns __RegisterInvocationInput.FlowId, and is useful for accessing the field via an interface.
func (v *__RegisterInvocationInput) GetFlowId() string { return v.FlowId }
// GetInvocation returns __RegisterInvocationInput.Invocation, and is useful for accessing the field via an interface.
func (v *__RegisterInvocationInput) GetInvocation() InvocationInput { return v.Invocation }
// __SendEndInvocationInput is used internally by genqlient
type __SendEndInvocationInput struct {
Idata InvocationEndInput `json:"idata"`
}
// GetIdata returns __SendEndInvocationInput.Idata, and is useful for accessing the field via an interface.
func (v *__SendEndInvocationInput) GetIdata() InvocationEndInput { return v.Idata }
// __SendEventsInput is used internally by genqlient
type __SendEventsInput struct {
InvocationId string `json:"invocationId"`
Spans []json.RawMessage `json:"spans"`
}
// GetInvocationId returns __SendEventsInput.InvocationId, and is useful for accessing the field via an interface.
func (v *__SendEventsInput) GetInvocationId() string { return v.InvocationId }
// GetSpans returns __SendEventsInput.Spans, and is useful for accessing the field via an interface.
func (v *__SendEventsInput) GetSpans() []json.RawMessage { return v.Spans }
// __SendInvocationHeartbeatInput is used internally by genqlient
type __SendInvocationHeartbeatInput struct {
InvocationId string `json:"invocationId"`
}
// GetInvocationId returns __SendInvocationHeartbeatInput.InvocationId, and is useful for accessing the field via an interface.
func (v *__SendInvocationHeartbeatInput) GetInvocationId() string { return v.InvocationId }
// __SendLogsInput is used internally by genqlient
type __SendLogsInput struct {
SpanId string `json:"spanId"`
Bdata string `json:"bdata"`
}
// GetSpanId returns __SendLogsInput.SpanId, and is useful for accessing the field via an interface.
func (v *__SendLogsInput) GetSpanId() string { return v.SpanId }
// GetBdata returns __SendLogsInput.Bdata, and is useful for accessing the field via an interface.
func (v *__SendLogsInput) GetBdata() string { return v.Bdata }
func AuthActor(
ctx context.Context,
client graphql.Client,
) (*AuthActorResponse, error) {
req := &graphql.Request{
OpName: "AuthActor",
Query: `
query AuthActor {
auth {
actor {
__typename
actor_type
actor_id
}
}
}
`,
}
var err error
var data AuthActorResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func Login(
ctx context.Context,
client graphql.Client,
email string,
pass string,
) (*LoginResponse, error) {
req := &graphql.Request{
OpName: "Login",
Query: `
mutation Login ($email: String!, $pass: String!) {
login(email: $email, password: $pass) {
token
user {
id
email
}
}
}
`,
Variables: &__LoginInput{
Email: email,
Pass: pass,
},
}
var err error
var data LoginResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func RegisterFlow(
ctx context.Context,
client graphql.Client,
projectId string,
flow FlowInput,
) (*RegisterFlowResponse, error) {
req := &graphql.Request{
OpName: "RegisterFlow",
Query: `
mutation RegisterFlow ($projectId: ID!, $flow: FlowInput!) {
registerFlow(projectId: $projectId, flow: $flow) {
id
url
}
}
`,
Variables: &__RegisterFlowInput{
ProjectId: projectId,
Flow: flow,
},
}
var err error
var data RegisterFlowResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func RegisterFlowInvocation(
ctx context.Context,
client graphql.Client,
projectId string,
flow FlowInput,
invocation InvocationInput,
) (*RegisterFlowInvocationResponse, error) {
req := &graphql.Request{
OpName: "RegisterFlowInvocation",
Query: `
mutation RegisterFlowInvocation ($projectId: ID!, $flow: FlowInput!, $invocation: InvocationInput!) {
registerFlowInvocation(projectId: $projectId, flow: $flow, invocation: $invocation) {
id
invocations {
edges {
node {
id
}
}
}
}
}
`,
Variables: &__RegisterFlowInvocationInput{
ProjectId: projectId,
Flow: flow,
Invocation: invocation,
},
}
var err error
var data RegisterFlowInvocationResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func RegisterInvocation(
ctx context.Context,
client graphql.Client,
flowId string,
invocation InvocationInput,
) (*RegisterInvocationResponse, error) {
req := &graphql.Request{
OpName: "RegisterInvocation",
Query: `
mutation RegisterInvocation ($flowId: ID!, $invocation: InvocationInput!) {
registerInvocation(flowId: $flowId, invocation: $invocation) {
id
}
}
`,
Variables: &__RegisterInvocationInput{
FlowId: flowId,
Invocation: invocation,
},
}
var err error
var data RegisterInvocationResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func SendEndInvocation(
ctx context.Context,
client graphql.Client,
idata InvocationEndInput,
) (*SendEndInvocationResponse, error) {
req := &graphql.Request{
OpName: "SendEndInvocation",
Query: `
mutation SendEndInvocation ($idata: InvocationEndInput!) {
endInvocation(data: $idata) {
id
}
}
`,
Variables: &__SendEndInvocationInput{
Idata: idata,
},
}
var err error
var data SendEndInvocationResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func SendEvents(
ctx context.Context,
client graphql.Client,
invocationId string,
spans []json.RawMessage,
) (*SendEventsResponse, error) {
req := &graphql.Request{
OpName: "SendEvents",
Query: `
mutation SendEvents ($invocationId: ID!, $spans: [JSON!]!) {
ingestSpans(invocationId: $invocationId, spans: $spans) {
id
spanId
}
}
`,
Variables: &__SendEventsInput{
InvocationId: invocationId,
Spans: spans,
},
}
var err error
var data SendEventsResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func SendInvocationHeartbeat(
ctx context.Context,
client graphql.Client,
invocationId string,
) (*SendInvocationHeartbeatResponse, error) {
req := &graphql.Request{
OpName: "SendInvocationHeartbeat",
Query: `
mutation SendInvocationHeartbeat ($invocationId: ID!) {
heartbeatInvocation(invocationId: $invocationId) {
id
}
}
`,
Variables: &__SendInvocationHeartbeatInput{
InvocationId: invocationId,
},
}
var err error
var data SendInvocationHeartbeatResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}
func SendLogs(
ctx context.Context,
client graphql.Client,
spanId string,
bdata string,
) (*SendLogsResponse, error) {
req := &graphql.Request{
OpName: "SendLogs",
Query: `
mutation SendLogs ($spanId: ID!, $bdata: Bytes!) {
ingestSpanLogs(spanId: $spanId, data: $bdata)
}
`,
Variables: &__SendLogsInput{
SpanId: spanId,
Bdata: bdata,
},
}
var err error
var data SendLogsResponse
resp := &graphql.Response{Data: &data}
err = client.MakeRequest(
ctx,
req,
resp,
)
return &data, err
}