-
Notifications
You must be signed in to change notification settings - Fork 231
/
schema.pb.go
1767 lines (1562 loc) · 60.2 KB
/
schema.pb.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
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.23.4
// source: encore/parser/schema/v1/schema.proto
package v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Builtin represents a type which Encore (and Go) have inbuilt support for and so can be represented by Encore's tooling
// directly, rather than needing to understand the full implementation details of how the type is structured.
type Builtin int32
const (
// Inbuilt Go Types
Builtin_ANY Builtin = 0
Builtin_BOOL Builtin = 1
Builtin_INT8 Builtin = 2
Builtin_INT16 Builtin = 3
Builtin_INT32 Builtin = 4
Builtin_INT64 Builtin = 5
Builtin_UINT8 Builtin = 6
Builtin_UINT16 Builtin = 7
Builtin_UINT32 Builtin = 8
Builtin_UINT64 Builtin = 9
Builtin_FLOAT32 Builtin = 10
Builtin_FLOAT64 Builtin = 11
Builtin_STRING Builtin = 12
Builtin_BYTES Builtin = 13
// Additional Encore Types
Builtin_TIME Builtin = 14
Builtin_UUID Builtin = 15
Builtin_JSON Builtin = 16
Builtin_USER_ID Builtin = 17
Builtin_INT Builtin = 18
Builtin_UINT Builtin = 19
)
// Enum value maps for Builtin.
var (
Builtin_name = map[int32]string{
0: "ANY",
1: "BOOL",
2: "INT8",
3: "INT16",
4: "INT32",
5: "INT64",
6: "UINT8",
7: "UINT16",
8: "UINT32",
9: "UINT64",
10: "FLOAT32",
11: "FLOAT64",
12: "STRING",
13: "BYTES",
14: "TIME",
15: "UUID",
16: "JSON",
17: "USER_ID",
18: "INT",
19: "UINT",
}
Builtin_value = map[string]int32{
"ANY": 0,
"BOOL": 1,
"INT8": 2,
"INT16": 3,
"INT32": 4,
"INT64": 5,
"UINT8": 6,
"UINT16": 7,
"UINT32": 8,
"UINT64": 9,
"FLOAT32": 10,
"FLOAT64": 11,
"STRING": 12,
"BYTES": 13,
"TIME": 14,
"UUID": 15,
"JSON": 16,
"USER_ID": 17,
"INT": 18,
"UINT": 19,
}
)
func (x Builtin) Enum() *Builtin {
p := new(Builtin)
*p = x
return p
}
func (x Builtin) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Builtin) Descriptor() protoreflect.EnumDescriptor {
return file_encore_parser_schema_v1_schema_proto_enumTypes[0].Descriptor()
}
func (Builtin) Type() protoreflect.EnumType {
return &file_encore_parser_schema_v1_schema_proto_enumTypes[0]
}
func (x Builtin) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Builtin.Descriptor instead.
func (Builtin) EnumDescriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{0}
}
// Type represents the base of our schema on which everything else is built on-top of. It has to be one, and only one,
// thing from our list of meta types.
//
// A type may be concrete or abstract, however to determine if a type is abstract you need to recursive through the
// structures looking for any uses of the TypeParameterPtr type
type Type struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Typ:
//
// *Type_Named
// *Type_Struct
// *Type_Map
// *Type_List
// *Type_Builtin
// *Type_Pointer
// *Type_TypeParameter
// *Type_Config
Typ isType_Typ `protobuf_oneof:"typ"`
}
func (x *Type) Reset() {
*x = Type{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Type) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Type) ProtoMessage() {}
func (x *Type) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Type.ProtoReflect.Descriptor instead.
func (*Type) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{0}
}
func (m *Type) GetTyp() isType_Typ {
if m != nil {
return m.Typ
}
return nil
}
func (x *Type) GetNamed() *Named {
if x, ok := x.GetTyp().(*Type_Named); ok {
return x.Named
}
return nil
}
func (x *Type) GetStruct() *Struct {
if x, ok := x.GetTyp().(*Type_Struct); ok {
return x.Struct
}
return nil
}
func (x *Type) GetMap() *Map {
if x, ok := x.GetTyp().(*Type_Map); ok {
return x.Map
}
return nil
}
func (x *Type) GetList() *List {
if x, ok := x.GetTyp().(*Type_List); ok {
return x.List
}
return nil
}
func (x *Type) GetBuiltin() Builtin {
if x, ok := x.GetTyp().(*Type_Builtin); ok {
return x.Builtin
}
return Builtin_ANY
}
func (x *Type) GetPointer() *Pointer {
if x, ok := x.GetTyp().(*Type_Pointer); ok {
return x.Pointer
}
return nil
}
func (x *Type) GetTypeParameter() *TypeParameterRef {
if x, ok := x.GetTyp().(*Type_TypeParameter); ok {
return x.TypeParameter
}
return nil
}
func (x *Type) GetConfig() *ConfigValue {
if x, ok := x.GetTyp().(*Type_Config); ok {
return x.Config
}
return nil
}
type isType_Typ interface {
isType_Typ()
}
type Type_Named struct {
// Concrete / non-parameterized Types
Named *Named `protobuf:"bytes,1,opt,name=named,proto3,oneof"` // A "named" type (https://tip.golang.org/ref/spec#Types)
}
type Type_Struct struct {
Struct *Struct `protobuf:"bytes,2,opt,name=struct,proto3,oneof"` // The type is a struct definition
}
type Type_Map struct {
Map *Map `protobuf:"bytes,3,opt,name=map,proto3,oneof"` // The type is a map
}
type Type_List struct {
List *List `protobuf:"bytes,4,opt,name=list,proto3,oneof"` // The type is a slice
}
type Type_Builtin struct {
Builtin Builtin `protobuf:"varint,5,opt,name=builtin,proto3,enum=encore.parser.schema.v1.Builtin,oneof"` // The type is one of the base built in types within Go
}
type Type_Pointer struct {
Pointer *Pointer `protobuf:"bytes,8,opt,name=pointer,proto3,oneof"` // The type is a pointer
}
type Type_TypeParameter struct {
// Abstract Types
TypeParameter *TypeParameterRef `protobuf:"bytes,6,opt,name=type_parameter,json=typeParameter,proto3,oneof"` // This is placeholder for a unknown type within the declaration block
}
type Type_Config struct {
// Encore Special Types
Config *ConfigValue `protobuf:"bytes,7,opt,name=config,proto3,oneof"` // This value is a config value
}
func (*Type_Named) isType_Typ() {}
func (*Type_Struct) isType_Typ() {}
func (*Type_Map) isType_Typ() {}
func (*Type_List) isType_Typ() {}
func (*Type_Builtin) isType_Typ() {}
func (*Type_Pointer) isType_Typ() {}
func (*Type_TypeParameter) isType_Typ() {}
func (*Type_Config) isType_Typ() {}
// TypeParameterRef is a reference to a `TypeParameter` within a declaration block
type TypeParameterRef struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DeclId uint32 `protobuf:"varint,1,opt,name=decl_id,json=declId,proto3" json:"decl_id,omitempty"` // The ID of the declaration block
ParamIdx uint32 `protobuf:"varint,2,opt,name=param_idx,json=paramIdx,proto3" json:"param_idx,omitempty"` // The index of the type parameter within the declaration block
}
func (x *TypeParameterRef) Reset() {
*x = TypeParameterRef{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TypeParameterRef) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TypeParameterRef) ProtoMessage() {}
func (x *TypeParameterRef) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TypeParameterRef.ProtoReflect.Descriptor instead.
func (*TypeParameterRef) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{1}
}
func (x *TypeParameterRef) GetDeclId() uint32 {
if x != nil {
return x.DeclId
}
return 0
}
func (x *TypeParameterRef) GetParamIdx() uint32 {
if x != nil {
return x.ParamIdx
}
return 0
}
// Decl represents the declaration of a type within the Go code which is either concrete or _parameterized_. The type is
// concrete when there are zero type parameters assigned.
//
// For example the Go Code:
// ```go
// // Set[A] represents our set type
// type Set[A any] = map[A]struct{}
// ```
//
// Would become:
// ```go
//
// _ = &Decl{
// id: 1,
// name: "Set",
// type: &Type{
// typ_map: &Map{
// key: &Type { typ_type_parameter: ... reference to "A" type parameter below ... },
// value: &Type { typ_struct: ... empty struct type ... },
// },
// },
// typeParameters: []*TypeParameter{ { name: "A" } },
// doc: "Set[A] represents our set type",
// loc: &Loc { ... },
// }
//
// ```
type Decl struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // A internal ID which we can refer to this declaration by
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // The name of the type as assigned in the code
Type *Type `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // The underlying type of this declaration
TypeParams []*TypeParameter `protobuf:"bytes,6,rep,name=type_params,json=typeParams,proto3" json:"type_params,omitempty"` // Any type parameters on this declaration (note; instantiated types used within this declaration would not be captured here)
Doc string `protobuf:"bytes,4,opt,name=doc,proto3" json:"doc,omitempty"` // The comment block on the type
Loc *Loc `protobuf:"bytes,5,opt,name=loc,proto3" json:"loc,omitempty"` // The location of the declaration within the project
}
func (x *Decl) Reset() {
*x = Decl{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Decl) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Decl) ProtoMessage() {}
func (x *Decl) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Decl.ProtoReflect.Descriptor instead.
func (*Decl) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{2}
}
func (x *Decl) GetId() uint32 {
if x != nil {
return x.Id
}
return 0
}
func (x *Decl) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Decl) GetType() *Type {
if x != nil {
return x.Type
}
return nil
}
func (x *Decl) GetTypeParams() []*TypeParameter {
if x != nil {
return x.TypeParams
}
return nil
}
func (x *Decl) GetDoc() string {
if x != nil {
return x.Doc
}
return ""
}
func (x *Decl) GetLoc() *Loc {
if x != nil {
return x.Loc
}
return nil
}
// TypeParameter acts as a place holder for an (as of yet) unknown type in the declaration; the type parameter is
// replaced with a type argument upon instantiation of the parameterized function or type.
type TypeParameter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The identifier given to the type parameter
}
func (x *TypeParameter) Reset() {
*x = TypeParameter{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TypeParameter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TypeParameter) ProtoMessage() {}
func (x *TypeParameter) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TypeParameter.ProtoReflect.Descriptor instead.
func (*TypeParameter) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{3}
}
func (x *TypeParameter) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// Loc is the location of a declaration within the code base
type Loc struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PkgPath string `protobuf:"bytes,1,opt,name=pkg_path,json=pkgPath,proto3" json:"pkg_path,omitempty"` // The package path within the repo (i.e. `users/signup`)
PkgName string `protobuf:"bytes,2,opt,name=pkg_name,json=pkgName,proto3" json:"pkg_name,omitempty"` // The package name (i.e. `signup`)
Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"` // The file name (i.e. `signup.go`)
StartPos int32 `protobuf:"varint,4,opt,name=start_pos,json=startPos,proto3" json:"start_pos,omitempty"` // The starting index within the file for this node
EndPos int32 `protobuf:"varint,5,opt,name=end_pos,json=endPos,proto3" json:"end_pos,omitempty"` // The ending index within the file for this node
SrcLineStart int32 `protobuf:"varint,6,opt,name=src_line_start,json=srcLineStart,proto3" json:"src_line_start,omitempty"` // The starting line within the file for this node
SrcLineEnd int32 `protobuf:"varint,7,opt,name=src_line_end,json=srcLineEnd,proto3" json:"src_line_end,omitempty"` // The ending line within the file for this node
SrcColStart int32 `protobuf:"varint,8,opt,name=src_col_start,json=srcColStart,proto3" json:"src_col_start,omitempty"` // The starting column on the starting line for this node
SrcColEnd int32 `protobuf:"varint,9,opt,name=src_col_end,json=srcColEnd,proto3" json:"src_col_end,omitempty"` // The ending column on the ending line for this node
}
func (x *Loc) Reset() {
*x = Loc{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Loc) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Loc) ProtoMessage() {}
func (x *Loc) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Loc.ProtoReflect.Descriptor instead.
func (*Loc) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{4}
}
func (x *Loc) GetPkgPath() string {
if x != nil {
return x.PkgPath
}
return ""
}
func (x *Loc) GetPkgName() string {
if x != nil {
return x.PkgName
}
return ""
}
func (x *Loc) GetFilename() string {
if x != nil {
return x.Filename
}
return ""
}
func (x *Loc) GetStartPos() int32 {
if x != nil {
return x.StartPos
}
return 0
}
func (x *Loc) GetEndPos() int32 {
if x != nil {
return x.EndPos
}
return 0
}
func (x *Loc) GetSrcLineStart() int32 {
if x != nil {
return x.SrcLineStart
}
return 0
}
func (x *Loc) GetSrcLineEnd() int32 {
if x != nil {
return x.SrcLineEnd
}
return 0
}
func (x *Loc) GetSrcColStart() int32 {
if x != nil {
return x.SrcColStart
}
return 0
}
func (x *Loc) GetSrcColEnd() int32 {
if x != nil {
return x.SrcColEnd
}
return 0
}
// Named references declaration block by name
type Named struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // The `Decl.id` this name refers to
TypeArguments []*Type `protobuf:"bytes,2,rep,name=type_arguments,json=typeArguments,proto3" json:"type_arguments,omitempty"` // The type arguments used to instantiate this parameterised declaration
}
func (x *Named) Reset() {
*x = Named{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Named) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Named) ProtoMessage() {}
func (x *Named) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Named.ProtoReflect.Descriptor instead.
func (*Named) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{5}
}
func (x *Named) GetId() uint32 {
if x != nil {
return x.Id
}
return 0
}
func (x *Named) GetTypeArguments() []*Type {
if x != nil {
return x.TypeArguments
}
return nil
}
// Struct contains a list of fields which make up the struct
type Struct struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
}
func (x *Struct) Reset() {
*x = Struct{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Struct) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Struct) ProtoMessage() {}
func (x *Struct) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Struct.ProtoReflect.Descriptor instead.
func (*Struct) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{6}
}
func (x *Struct) GetFields() []*Field {
if x != nil {
return x.Fields
}
return nil
}
// Field represents a field within a struct
type Field struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Typ *Type `protobuf:"bytes,1,opt,name=typ,proto3" json:"typ,omitempty"` // The type of the field
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // The name of the field
Doc string `protobuf:"bytes,3,opt,name=doc,proto3" json:"doc,omitempty"` // The comment for the field
JsonName string `protobuf:"bytes,4,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"` // The optional json name if it's different from the field name. (The value "-" indicates to omit the field.)
Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"` // Whether the field is optional.
QueryStringName string `protobuf:"bytes,6,opt,name=query_string_name,json=queryStringName,proto3" json:"query_string_name,omitempty"` // The query string name to use in GET/HEAD/DELETE requests. (The value "-" indicates to omit the field.)
RawTag string `protobuf:"bytes,7,opt,name=raw_tag,json=rawTag,proto3" json:"raw_tag,omitempty"` // The original Go struct tag; should not be parsed individually
Tags []*Tag `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` // Parsed go struct tags. Used for marshalling hints
Wire *WireSpec `protobuf:"bytes,9,opt,name=wire,proto3,oneof" json:"wire,omitempty"` // The explicitly set wire location of the field.
}
func (x *Field) Reset() {
*x = Field{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Field) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Field) ProtoMessage() {}
func (x *Field) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Field.ProtoReflect.Descriptor instead.
func (*Field) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{7}
}
func (x *Field) GetTyp() *Type {
if x != nil {
return x.Typ
}
return nil
}
func (x *Field) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Field) GetDoc() string {
if x != nil {
return x.Doc
}
return ""
}
func (x *Field) GetJsonName() string {
if x != nil {
return x.JsonName
}
return ""
}
func (x *Field) GetOptional() bool {
if x != nil {
return x.Optional
}
return false
}
func (x *Field) GetQueryStringName() string {
if x != nil {
return x.QueryStringName
}
return ""
}
func (x *Field) GetRawTag() string {
if x != nil {
return x.RawTag
}
return ""
}
func (x *Field) GetTags() []*Tag {
if x != nil {
return x.Tags
}
return nil
}
func (x *Field) GetWire() *WireSpec {
if x != nil {
return x.Wire
}
return nil
}
// WireLocation provides information about how a field should be encoded on the wire.
type WireSpec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Location:
//
// *WireSpec_Header_
// *WireSpec_Query_
Location isWireSpec_Location `protobuf_oneof:"location"`
}
func (x *WireSpec) Reset() {
*x = WireSpec{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WireSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WireSpec) ProtoMessage() {}
func (x *WireSpec) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WireSpec.ProtoReflect.Descriptor instead.
func (*WireSpec) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{8}
}
func (m *WireSpec) GetLocation() isWireSpec_Location {
if m != nil {
return m.Location
}
return nil
}
func (x *WireSpec) GetHeader() *WireSpec_Header {
if x, ok := x.GetLocation().(*WireSpec_Header_); ok {
return x.Header
}
return nil
}
func (x *WireSpec) GetQuery() *WireSpec_Query {
if x, ok := x.GetLocation().(*WireSpec_Query_); ok {
return x.Query
}
return nil
}
type isWireSpec_Location interface {
isWireSpec_Location()
}
type WireSpec_Header_ struct {
Header *WireSpec_Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"`
}
type WireSpec_Query_ struct {
Query *WireSpec_Query `protobuf:"bytes,2,opt,name=query,proto3,oneof"`
}
func (*WireSpec_Header_) isWireSpec_Location() {}
func (*WireSpec_Query_) isWireSpec_Location() {}
type Tag struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The tag key (e.g. json, query, header ...)
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // The tag name (e.g. first_name, firstName, ...)
Options []string `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` // Key Options (e.g. omitempty, optional ...)
}
func (x *Tag) Reset() {
*x = Tag{}
if protoimpl.UnsafeEnabled {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Tag) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Tag) ProtoMessage() {}
func (x *Tag) ProtoReflect() protoreflect.Message {
mi := &file_encore_parser_schema_v1_schema_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Tag.ProtoReflect.Descriptor instead.
func (*Tag) Descriptor() ([]byte, []int) {
return file_encore_parser_schema_v1_schema_proto_rawDescGZIP(), []int{9}
}
func (x *Tag) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *Tag) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Tag) GetOptions() []string {
if x != nil {
return x.Options
}
return nil
}
// Map represents a map Type
type Map struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key *Type `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The type of the key for this map
Value *Type `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // The type of the value of this map
}