You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

482 lines
14 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.32.0
  4. // protoc v4.25.3
  5. // source: schema.proto
  6. package schema_pb
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. reflect "reflect"
  11. sync "sync"
  12. )
  13. const (
  14. // Verify that this generated code is sufficiently up-to-date.
  15. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  16. // Verify that runtime/protoimpl is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  18. )
  19. type ScalarType int32
  20. const (
  21. ScalarType_BOOLEAN ScalarType = 0
  22. ScalarType_INTEGER ScalarType = 1
  23. ScalarType_LONG ScalarType = 3
  24. ScalarType_FLOAT ScalarType = 4
  25. ScalarType_DOUBLE ScalarType = 5
  26. ScalarType_BYTES ScalarType = 6
  27. ScalarType_STRING ScalarType = 7
  28. )
  29. // Enum value maps for ScalarType.
  30. var (
  31. ScalarType_name = map[int32]string{
  32. 0: "BOOLEAN",
  33. 1: "INTEGER",
  34. 3: "LONG",
  35. 4: "FLOAT",
  36. 5: "DOUBLE",
  37. 6: "BYTES",
  38. 7: "STRING",
  39. }
  40. ScalarType_value = map[string]int32{
  41. "BOOLEAN": 0,
  42. "INTEGER": 1,
  43. "LONG": 3,
  44. "FLOAT": 4,
  45. "DOUBLE": 5,
  46. "BYTES": 6,
  47. "STRING": 7,
  48. }
  49. )
  50. func (x ScalarType) Enum() *ScalarType {
  51. p := new(ScalarType)
  52. *p = x
  53. return p
  54. }
  55. func (x ScalarType) String() string {
  56. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  57. }
  58. func (ScalarType) Descriptor() protoreflect.EnumDescriptor {
  59. return file_schema_proto_enumTypes[0].Descriptor()
  60. }
  61. func (ScalarType) Type() protoreflect.EnumType {
  62. return &file_schema_proto_enumTypes[0]
  63. }
  64. func (x ScalarType) Number() protoreflect.EnumNumber {
  65. return protoreflect.EnumNumber(x)
  66. }
  67. // Deprecated: Use ScalarType.Descriptor instead.
  68. func (ScalarType) EnumDescriptor() ([]byte, []int) {
  69. return file_schema_proto_rawDescGZIP(), []int{0}
  70. }
  71. type RecordType struct {
  72. state protoimpl.MessageState
  73. sizeCache protoimpl.SizeCache
  74. unknownFields protoimpl.UnknownFields
  75. Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
  76. }
  77. func (x *RecordType) Reset() {
  78. *x = RecordType{}
  79. if protoimpl.UnsafeEnabled {
  80. mi := &file_schema_proto_msgTypes[0]
  81. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  82. ms.StoreMessageInfo(mi)
  83. }
  84. }
  85. func (x *RecordType) String() string {
  86. return protoimpl.X.MessageStringOf(x)
  87. }
  88. func (*RecordType) ProtoMessage() {}
  89. func (x *RecordType) ProtoReflect() protoreflect.Message {
  90. mi := &file_schema_proto_msgTypes[0]
  91. if protoimpl.UnsafeEnabled && x != nil {
  92. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  93. if ms.LoadMessageInfo() == nil {
  94. ms.StoreMessageInfo(mi)
  95. }
  96. return ms
  97. }
  98. return mi.MessageOf(x)
  99. }
  100. // Deprecated: Use RecordType.ProtoReflect.Descriptor instead.
  101. func (*RecordType) Descriptor() ([]byte, []int) {
  102. return file_schema_proto_rawDescGZIP(), []int{0}
  103. }
  104. func (x *RecordType) GetFields() []*Field {
  105. if x != nil {
  106. return x.Fields
  107. }
  108. return nil
  109. }
  110. type Field struct {
  111. state protoimpl.MessageState
  112. sizeCache protoimpl.SizeCache
  113. unknownFields protoimpl.UnknownFields
  114. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  115. Type *Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
  116. Index int32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
  117. IsRepeated bool `protobuf:"varint,4,opt,name=is_repeated,json=isRepeated,proto3" json:"is_repeated,omitempty"`
  118. }
  119. func (x *Field) Reset() {
  120. *x = Field{}
  121. if protoimpl.UnsafeEnabled {
  122. mi := &file_schema_proto_msgTypes[1]
  123. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  124. ms.StoreMessageInfo(mi)
  125. }
  126. }
  127. func (x *Field) String() string {
  128. return protoimpl.X.MessageStringOf(x)
  129. }
  130. func (*Field) ProtoMessage() {}
  131. func (x *Field) ProtoReflect() protoreflect.Message {
  132. mi := &file_schema_proto_msgTypes[1]
  133. if protoimpl.UnsafeEnabled && x != nil {
  134. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  135. if ms.LoadMessageInfo() == nil {
  136. ms.StoreMessageInfo(mi)
  137. }
  138. return ms
  139. }
  140. return mi.MessageOf(x)
  141. }
  142. // Deprecated: Use Field.ProtoReflect.Descriptor instead.
  143. func (*Field) Descriptor() ([]byte, []int) {
  144. return file_schema_proto_rawDescGZIP(), []int{1}
  145. }
  146. func (x *Field) GetName() string {
  147. if x != nil {
  148. return x.Name
  149. }
  150. return ""
  151. }
  152. func (x *Field) GetType() *Type {
  153. if x != nil {
  154. return x.Type
  155. }
  156. return nil
  157. }
  158. func (x *Field) GetIndex() int32 {
  159. if x != nil {
  160. return x.Index
  161. }
  162. return 0
  163. }
  164. func (x *Field) GetIsRepeated() bool {
  165. if x != nil {
  166. return x.IsRepeated
  167. }
  168. return false
  169. }
  170. type Type struct {
  171. state protoimpl.MessageState
  172. sizeCache protoimpl.SizeCache
  173. unknownFields protoimpl.UnknownFields
  174. // Types that are assignable to Kind:
  175. //
  176. // *Type_ScalarType
  177. // *Type_RecordType
  178. Kind isType_Kind `protobuf_oneof:"kind"`
  179. }
  180. func (x *Type) Reset() {
  181. *x = Type{}
  182. if protoimpl.UnsafeEnabled {
  183. mi := &file_schema_proto_msgTypes[2]
  184. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  185. ms.StoreMessageInfo(mi)
  186. }
  187. }
  188. func (x *Type) String() string {
  189. return protoimpl.X.MessageStringOf(x)
  190. }
  191. func (*Type) ProtoMessage() {}
  192. func (x *Type) ProtoReflect() protoreflect.Message {
  193. mi := &file_schema_proto_msgTypes[2]
  194. if protoimpl.UnsafeEnabled && x != nil {
  195. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  196. if ms.LoadMessageInfo() == nil {
  197. ms.StoreMessageInfo(mi)
  198. }
  199. return ms
  200. }
  201. return mi.MessageOf(x)
  202. }
  203. // Deprecated: Use Type.ProtoReflect.Descriptor instead.
  204. func (*Type) Descriptor() ([]byte, []int) {
  205. return file_schema_proto_rawDescGZIP(), []int{2}
  206. }
  207. func (m *Type) GetKind() isType_Kind {
  208. if m != nil {
  209. return m.Kind
  210. }
  211. return nil
  212. }
  213. func (x *Type) GetScalarType() ScalarType {
  214. if x, ok := x.GetKind().(*Type_ScalarType); ok {
  215. return x.ScalarType
  216. }
  217. return ScalarType_BOOLEAN
  218. }
  219. func (x *Type) GetRecordType() *RecordType {
  220. if x, ok := x.GetKind().(*Type_RecordType); ok {
  221. return x.RecordType
  222. }
  223. return nil
  224. }
  225. type isType_Kind interface {
  226. isType_Kind()
  227. }
  228. type Type_ScalarType struct {
  229. ScalarType ScalarType `protobuf:"varint,1,opt,name=scalar_type,json=scalarType,proto3,enum=schema_pb.ScalarType,oneof"`
  230. }
  231. type Type_RecordType struct {
  232. RecordType *RecordType `protobuf:"bytes,2,opt,name=record_type,json=recordType,proto3,oneof"` // MapType map_type = 3;
  233. }
  234. func (*Type_ScalarType) isType_Kind() {}
  235. func (*Type_RecordType) isType_Kind() {}
  236. type MapType struct {
  237. state protoimpl.MessageState
  238. sizeCache protoimpl.SizeCache
  239. unknownFields protoimpl.UnknownFields
  240. // key is always string
  241. Value *Type `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
  242. }
  243. func (x *MapType) Reset() {
  244. *x = MapType{}
  245. if protoimpl.UnsafeEnabled {
  246. mi := &file_schema_proto_msgTypes[3]
  247. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  248. ms.StoreMessageInfo(mi)
  249. }
  250. }
  251. func (x *MapType) String() string {
  252. return protoimpl.X.MessageStringOf(x)
  253. }
  254. func (*MapType) ProtoMessage() {}
  255. func (x *MapType) ProtoReflect() protoreflect.Message {
  256. mi := &file_schema_proto_msgTypes[3]
  257. if protoimpl.UnsafeEnabled && x != nil {
  258. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  259. if ms.LoadMessageInfo() == nil {
  260. ms.StoreMessageInfo(mi)
  261. }
  262. return ms
  263. }
  264. return mi.MessageOf(x)
  265. }
  266. // Deprecated: Use MapType.ProtoReflect.Descriptor instead.
  267. func (*MapType) Descriptor() ([]byte, []int) {
  268. return file_schema_proto_rawDescGZIP(), []int{3}
  269. }
  270. func (x *MapType) GetValue() *Type {
  271. if x != nil {
  272. return x.Value
  273. }
  274. return nil
  275. }
  276. var File_schema_proto protoreflect.FileDescriptor
  277. var file_schema_proto_rawDesc = []byte{
  278. 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09,
  279. 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x22, 0x36, 0x0a, 0x0a, 0x52, 0x65, 0x63,
  280. 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64,
  281. 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
  282. 0x5f, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64,
  283. 0x73, 0x22, 0x77, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
  284. 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23,
  285. 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73,
  286. 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74,
  287. 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01,
  288. 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f,
  289. 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
  290. 0x69, 0x73, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x04, 0x54,
  291. 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x5f, 0x74, 0x79,
  292. 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d,
  293. 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x54, 0x79, 0x70, 0x65, 0x48,
  294. 0x00, 0x52, 0x0a, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a,
  295. 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
  296. 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x52,
  297. 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x63,
  298. 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22,
  299. 0x30, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61,
  300. 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65,
  301. 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
  302. 0x65, 0x2a, 0x5e, 0x0a, 0x0a, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12,
  303. 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07,
  304. 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x4e,
  305. 0x47, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x04, 0x12, 0x0a,
  306. 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x59,
  307. 0x54, 0x45, 0x53, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10,
  308. 0x07, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
  309. 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65,
  310. 0x64, 0x66, 0x73, 0x2f, 0x77, 0x65, 0x65, 0x64, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x63, 0x68, 0x65,
  311. 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  312. }
  313. var (
  314. file_schema_proto_rawDescOnce sync.Once
  315. file_schema_proto_rawDescData = file_schema_proto_rawDesc
  316. )
  317. func file_schema_proto_rawDescGZIP() []byte {
  318. file_schema_proto_rawDescOnce.Do(func() {
  319. file_schema_proto_rawDescData = protoimpl.X.CompressGZIP(file_schema_proto_rawDescData)
  320. })
  321. return file_schema_proto_rawDescData
  322. }
  323. var file_schema_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  324. var file_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  325. var file_schema_proto_goTypes = []interface{}{
  326. (ScalarType)(0), // 0: schema_pb.ScalarType
  327. (*RecordType)(nil), // 1: schema_pb.RecordType
  328. (*Field)(nil), // 2: schema_pb.Field
  329. (*Type)(nil), // 3: schema_pb.Type
  330. (*MapType)(nil), // 4: schema_pb.MapType
  331. }
  332. var file_schema_proto_depIdxs = []int32{
  333. 2, // 0: schema_pb.RecordType.fields:type_name -> schema_pb.Field
  334. 3, // 1: schema_pb.Field.type:type_name -> schema_pb.Type
  335. 0, // 2: schema_pb.Type.scalar_type:type_name -> schema_pb.ScalarType
  336. 1, // 3: schema_pb.Type.record_type:type_name -> schema_pb.RecordType
  337. 3, // 4: schema_pb.MapType.value:type_name -> schema_pb.Type
  338. 5, // [5:5] is the sub-list for method output_type
  339. 5, // [5:5] is the sub-list for method input_type
  340. 5, // [5:5] is the sub-list for extension type_name
  341. 5, // [5:5] is the sub-list for extension extendee
  342. 0, // [0:5] is the sub-list for field type_name
  343. }
  344. func init() { file_schema_proto_init() }
  345. func file_schema_proto_init() {
  346. if File_schema_proto != nil {
  347. return
  348. }
  349. if !protoimpl.UnsafeEnabled {
  350. file_schema_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  351. switch v := v.(*RecordType); i {
  352. case 0:
  353. return &v.state
  354. case 1:
  355. return &v.sizeCache
  356. case 2:
  357. return &v.unknownFields
  358. default:
  359. return nil
  360. }
  361. }
  362. file_schema_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  363. switch v := v.(*Field); i {
  364. case 0:
  365. return &v.state
  366. case 1:
  367. return &v.sizeCache
  368. case 2:
  369. return &v.unknownFields
  370. default:
  371. return nil
  372. }
  373. }
  374. file_schema_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  375. switch v := v.(*Type); i {
  376. case 0:
  377. return &v.state
  378. case 1:
  379. return &v.sizeCache
  380. case 2:
  381. return &v.unknownFields
  382. default:
  383. return nil
  384. }
  385. }
  386. file_schema_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  387. switch v := v.(*MapType); i {
  388. case 0:
  389. return &v.state
  390. case 1:
  391. return &v.sizeCache
  392. case 2:
  393. return &v.unknownFields
  394. default:
  395. return nil
  396. }
  397. }
  398. }
  399. file_schema_proto_msgTypes[2].OneofWrappers = []interface{}{
  400. (*Type_ScalarType)(nil),
  401. (*Type_RecordType)(nil),
  402. }
  403. type x struct{}
  404. out := protoimpl.TypeBuilder{
  405. File: protoimpl.DescBuilder{
  406. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  407. RawDescriptor: file_schema_proto_rawDesc,
  408. NumEnums: 1,
  409. NumMessages: 4,
  410. NumExtensions: 0,
  411. NumServices: 0,
  412. },
  413. GoTypes: file_schema_proto_goTypes,
  414. DependencyIndexes: file_schema_proto_depIdxs,
  415. EnumInfos: file_schema_proto_enumTypes,
  416. MessageInfos: file_schema_proto_msgTypes,
  417. }.Build()
  418. File_schema_proto = out.File
  419. file_schema_proto_rawDesc = nil
  420. file_schema_proto_goTypes = nil
  421. file_schema_proto_depIdxs = nil
  422. }