chain_admin.pb.go 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.26.0
  4. // protoc v3.20.0
  5. // source: chain_admin.proto
  6. package pb
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  13. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  14. reflect "reflect"
  15. sync "sync"
  16. )
  17. const (
  18. // Verify that this generated code is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  20. // Verify that runtime/protoimpl is sufficiently up-to-date.
  21. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  22. )
  23. type Body struct {
  24. state protoimpl.MessageState
  25. sizeCache protoimpl.SizeCache
  26. unknownFields protoimpl.UnknownFields
  27. //子链唯一标识
  28. ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  29. //子链名称
  30. ChainName string `protobuf:"bytes,2,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"`
  31. //子链介绍
  32. ChainIntro string `protobuf:"bytes,3,opt,name=chain_intro,json=chainIntro,proto3" json:"chain_intro,omitempty"`
  33. //子链状态
  34. Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=pb.Status" json:"status,omitempty"`
  35. }
  36. func (x *Body) Reset() {
  37. *x = Body{}
  38. if protoimpl.UnsafeEnabled {
  39. mi := &file_chain_admin_proto_msgTypes[0]
  40. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  41. ms.StoreMessageInfo(mi)
  42. }
  43. }
  44. func (x *Body) String() string {
  45. return protoimpl.X.MessageStringOf(x)
  46. }
  47. func (*Body) ProtoMessage() {}
  48. func (x *Body) ProtoReflect() protoreflect.Message {
  49. mi := &file_chain_admin_proto_msgTypes[0]
  50. if protoimpl.UnsafeEnabled && x != nil {
  51. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  52. if ms.LoadMessageInfo() == nil {
  53. ms.StoreMessageInfo(mi)
  54. }
  55. return ms
  56. }
  57. return mi.MessageOf(x)
  58. }
  59. // Deprecated: Use Body.ProtoReflect.Descriptor instead.
  60. func (*Body) Descriptor() ([]byte, []int) {
  61. return file_chain_admin_proto_rawDescGZIP(), []int{0}
  62. }
  63. func (x *Body) GetChainId() string {
  64. if x != nil {
  65. return x.ChainId
  66. }
  67. return ""
  68. }
  69. func (x *Body) GetChainName() string {
  70. if x != nil {
  71. return x.ChainName
  72. }
  73. return ""
  74. }
  75. func (x *Body) GetChainIntro() string {
  76. if x != nil {
  77. return x.ChainIntro
  78. }
  79. return ""
  80. }
  81. func (x *Body) GetStatus() Status {
  82. if x != nil {
  83. return x.Status
  84. }
  85. return Status_DISABLED
  86. }
  87. type GetAllChainsReq struct {
  88. state protoimpl.MessageState
  89. sizeCache protoimpl.SizeCache
  90. unknownFields protoimpl.UnknownFields
  91. //页数,默认为1
  92. Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
  93. //分页大小
  94. Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
  95. //排序字段
  96. Sort string `protobuf:"bytes,3,opt,name=sort,proto3" json:"sort,omitempty"`
  97. //排序类型
  98. Order OrderType `protobuf:"varint,4,opt,name=order,proto3,enum=pb.OrderType" json:"order,omitempty"`
  99. }
  100. func (x *GetAllChainsReq) Reset() {
  101. *x = GetAllChainsReq{}
  102. if protoimpl.UnsafeEnabled {
  103. mi := &file_chain_admin_proto_msgTypes[1]
  104. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  105. ms.StoreMessageInfo(mi)
  106. }
  107. }
  108. func (x *GetAllChainsReq) String() string {
  109. return protoimpl.X.MessageStringOf(x)
  110. }
  111. func (*GetAllChainsReq) ProtoMessage() {}
  112. func (x *GetAllChainsReq) ProtoReflect() protoreflect.Message {
  113. mi := &file_chain_admin_proto_msgTypes[1]
  114. if protoimpl.UnsafeEnabled && x != nil {
  115. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  116. if ms.LoadMessageInfo() == nil {
  117. ms.StoreMessageInfo(mi)
  118. }
  119. return ms
  120. }
  121. return mi.MessageOf(x)
  122. }
  123. // Deprecated: Use GetAllChainsReq.ProtoReflect.Descriptor instead.
  124. func (*GetAllChainsReq) Descriptor() ([]byte, []int) {
  125. return file_chain_admin_proto_rawDescGZIP(), []int{1}
  126. }
  127. func (x *GetAllChainsReq) GetPage() int64 {
  128. if x != nil {
  129. return x.Page
  130. }
  131. return 0
  132. }
  133. func (x *GetAllChainsReq) GetSize() int64 {
  134. if x != nil {
  135. return x.Size
  136. }
  137. return 0
  138. }
  139. func (x *GetAllChainsReq) GetSort() string {
  140. if x != nil {
  141. return x.Sort
  142. }
  143. return ""
  144. }
  145. func (x *GetAllChainsReq) GetOrder() OrderType {
  146. if x != nil {
  147. return x.Order
  148. }
  149. return OrderType_ASC
  150. }
  151. type ChainsList struct {
  152. state protoimpl.MessageState
  153. sizeCache protoimpl.SizeCache
  154. unknownFields protoimpl.UnknownFields
  155. Data []*Chain `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
  156. }
  157. func (x *ChainsList) Reset() {
  158. *x = ChainsList{}
  159. if protoimpl.UnsafeEnabled {
  160. mi := &file_chain_admin_proto_msgTypes[2]
  161. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  162. ms.StoreMessageInfo(mi)
  163. }
  164. }
  165. func (x *ChainsList) String() string {
  166. return protoimpl.X.MessageStringOf(x)
  167. }
  168. func (*ChainsList) ProtoMessage() {}
  169. func (x *ChainsList) ProtoReflect() protoreflect.Message {
  170. mi := &file_chain_admin_proto_msgTypes[2]
  171. if protoimpl.UnsafeEnabled && x != nil {
  172. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  173. if ms.LoadMessageInfo() == nil {
  174. ms.StoreMessageInfo(mi)
  175. }
  176. return ms
  177. }
  178. return mi.MessageOf(x)
  179. }
  180. // Deprecated: Use ChainsList.ProtoReflect.Descriptor instead.
  181. func (*ChainsList) Descriptor() ([]byte, []int) {
  182. return file_chain_admin_proto_rawDescGZIP(), []int{2}
  183. }
  184. func (x *ChainsList) GetData() []*Chain {
  185. if x != nil {
  186. return x.Data
  187. }
  188. return nil
  189. }
  190. type Chain struct {
  191. state protoimpl.MessageState
  192. sizeCache protoimpl.SizeCache
  193. unknownFields protoimpl.UnknownFields
  194. //子链id
  195. ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  196. //子链名称
  197. ChainName string `protobuf:"bytes,2,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"`
  198. //子链介绍
  199. ChainIntro string `protobuf:"bytes,3,opt,name=chain_intro,json=chainIntro,proto3" json:"chain_intro,omitempty"`
  200. //子链状态
  201. Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=pb.Status" json:"status,omitempty"`
  202. //子链创建时间
  203. CreatedAt string `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
  204. //子链最后修改时间
  205. UpdatedAt string `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
  206. }
  207. func (x *Chain) Reset() {
  208. *x = Chain{}
  209. if protoimpl.UnsafeEnabled {
  210. mi := &file_chain_admin_proto_msgTypes[3]
  211. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  212. ms.StoreMessageInfo(mi)
  213. }
  214. }
  215. func (x *Chain) String() string {
  216. return protoimpl.X.MessageStringOf(x)
  217. }
  218. func (*Chain) ProtoMessage() {}
  219. func (x *Chain) ProtoReflect() protoreflect.Message {
  220. mi := &file_chain_admin_proto_msgTypes[3]
  221. if protoimpl.UnsafeEnabled && x != nil {
  222. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  223. if ms.LoadMessageInfo() == nil {
  224. ms.StoreMessageInfo(mi)
  225. }
  226. return ms
  227. }
  228. return mi.MessageOf(x)
  229. }
  230. // Deprecated: Use Chain.ProtoReflect.Descriptor instead.
  231. func (*Chain) Descriptor() ([]byte, []int) {
  232. return file_chain_admin_proto_rawDescGZIP(), []int{3}
  233. }
  234. func (x *Chain) GetChainId() string {
  235. if x != nil {
  236. return x.ChainId
  237. }
  238. return ""
  239. }
  240. func (x *Chain) GetChainName() string {
  241. if x != nil {
  242. return x.ChainName
  243. }
  244. return ""
  245. }
  246. func (x *Chain) GetChainIntro() string {
  247. if x != nil {
  248. return x.ChainIntro
  249. }
  250. return ""
  251. }
  252. func (x *Chain) GetStatus() Status {
  253. if x != nil {
  254. return x.Status
  255. }
  256. return Status_DISABLED
  257. }
  258. func (x *Chain) GetCreatedAt() string {
  259. if x != nil {
  260. return x.CreatedAt
  261. }
  262. return ""
  263. }
  264. func (x *Chain) GetUpdatedAt() string {
  265. if x != nil {
  266. return x.UpdatedAt
  267. }
  268. return ""
  269. }
  270. type GetChainReq struct {
  271. state protoimpl.MessageState
  272. sizeCache protoimpl.SizeCache
  273. unknownFields protoimpl.UnknownFields
  274. //请求查询的子链id
  275. ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  276. }
  277. func (x *GetChainReq) Reset() {
  278. *x = GetChainReq{}
  279. if protoimpl.UnsafeEnabled {
  280. mi := &file_chain_admin_proto_msgTypes[4]
  281. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  282. ms.StoreMessageInfo(mi)
  283. }
  284. }
  285. func (x *GetChainReq) String() string {
  286. return protoimpl.X.MessageStringOf(x)
  287. }
  288. func (*GetChainReq) ProtoMessage() {}
  289. func (x *GetChainReq) ProtoReflect() protoreflect.Message {
  290. mi := &file_chain_admin_proto_msgTypes[4]
  291. if protoimpl.UnsafeEnabled && x != nil {
  292. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  293. if ms.LoadMessageInfo() == nil {
  294. ms.StoreMessageInfo(mi)
  295. }
  296. return ms
  297. }
  298. return mi.MessageOf(x)
  299. }
  300. // Deprecated: Use GetChainReq.ProtoReflect.Descriptor instead.
  301. func (*GetChainReq) Descriptor() ([]byte, []int) {
  302. return file_chain_admin_proto_rawDescGZIP(), []int{4}
  303. }
  304. func (x *GetChainReq) GetChainId() string {
  305. if x != nil {
  306. return x.ChainId
  307. }
  308. return ""
  309. }
  310. var File_chain_admin_proto protoreflect.FileDescriptor
  311. var file_chain_admin_proto_rawDesc = []byte{
  312. 0x0a, 0x11, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72,
  313. 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
  314. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x19,
  315. 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
  316. 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61,
  317. 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,
  318. 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x69,
  319. 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63,
  320. 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x74, 0x61,
  321. 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53,
  322. 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x72, 0x0a,
  323. 0x0f, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71,
  324. 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
  325. 0x70, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01,
  326. 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74,
  327. 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x05,
  328. 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x70, 0x62,
  329. 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65,
  330. 0x72, 0x22, 0x2b, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12,
  331. 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e,
  332. 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc4,
  333. 0x01, 0x0a, 0x05, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69,
  334. 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69,
  335. 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d,
  336. 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61,
  337. 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72,
  338. 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e,
  339. 0x74, 0x72, 0x6f, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20,
  340. 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
  341. 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74,
  342. 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65,
  343. 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
  344. 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61,
  345. 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x28, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69,
  346. 0x6e, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64,
  347. 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x32,
  348. 0xc0, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e,
  349. 0x12, 0x2a, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69,
  350. 0x6e, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c,
  351. 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0c,
  352. 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x13, 0x2e, 0x70,
  353. 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65,
  354. 0x71, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
  355. 0x29, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x0f, 0x2e, 0x70, 0x62,
  356. 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x70,
  357. 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x45, 0x64,
  358. 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71,
  359. 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
  360. 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
  361. 0x6f, 0x33,
  362. }
  363. var (
  364. file_chain_admin_proto_rawDescOnce sync.Once
  365. file_chain_admin_proto_rawDescData = file_chain_admin_proto_rawDesc
  366. )
  367. func file_chain_admin_proto_rawDescGZIP() []byte {
  368. file_chain_admin_proto_rawDescOnce.Do(func() {
  369. file_chain_admin_proto_rawDescData = protoimpl.X.CompressGZIP(file_chain_admin_proto_rawDescData)
  370. })
  371. return file_chain_admin_proto_rawDescData
  372. }
  373. var file_chain_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
  374. var file_chain_admin_proto_goTypes = []interface{}{
  375. (*Body)(nil), // 0: pb.Body
  376. (*GetAllChainsReq)(nil), // 1: pb.GetAllChainsReq
  377. (*ChainsList)(nil), // 2: pb.ChainsList
  378. (*Chain)(nil), // 3: pb.Chain
  379. (*GetChainReq)(nil), // 4: pb.GetChainReq
  380. (Status)(0), // 5: pb.Status
  381. (OrderType)(0), // 6: pb.OrderType
  382. (*Request)(nil), // 7: pb.Request
  383. (*Response)(nil), // 8: pb.Response
  384. }
  385. var file_chain_admin_proto_depIdxs = []int32{
  386. 5, // 0: pb.Body.status:type_name -> pb.Status
  387. 6, // 1: pb.GetAllChainsReq.order:type_name -> pb.OrderType
  388. 3, // 2: pb.ChainsList.data:type_name -> pb.Chain
  389. 5, // 3: pb.Chain.status:type_name -> pb.Status
  390. 7, // 4: pb.ServiceChain.RegisterChain:input_type -> pb.Request
  391. 1, // 5: pb.ServiceChain.GetAllChains:input_type -> pb.GetAllChainsReq
  392. 4, // 6: pb.ServiceChain.GetChain:input_type -> pb.GetChainReq
  393. 7, // 7: pb.ServiceChain.EditChain:input_type -> pb.Request
  394. 8, // 8: pb.ServiceChain.RegisterChain:output_type -> pb.Response
  395. 8, // 9: pb.ServiceChain.GetAllChains:output_type -> pb.Response
  396. 8, // 10: pb.ServiceChain.GetChain:output_type -> pb.Response
  397. 8, // 11: pb.ServiceChain.EditChain:output_type -> pb.Response
  398. 8, // [8:12] is the sub-list for method output_type
  399. 4, // [4:8] is the sub-list for method input_type
  400. 4, // [4:4] is the sub-list for extension type_name
  401. 4, // [4:4] is the sub-list for extension extendee
  402. 0, // [0:4] is the sub-list for field type_name
  403. }
  404. func init() { file_chain_admin_proto_init() }
  405. func file_chain_admin_proto_init() {
  406. if File_chain_admin_proto != nil {
  407. return
  408. }
  409. file_common_proto_init()
  410. if !protoimpl.UnsafeEnabled {
  411. file_chain_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  412. switch v := v.(*Body); i {
  413. case 0:
  414. return &v.state
  415. case 1:
  416. return &v.sizeCache
  417. case 2:
  418. return &v.unknownFields
  419. default:
  420. return nil
  421. }
  422. }
  423. file_chain_admin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  424. switch v := v.(*GetAllChainsReq); i {
  425. case 0:
  426. return &v.state
  427. case 1:
  428. return &v.sizeCache
  429. case 2:
  430. return &v.unknownFields
  431. default:
  432. return nil
  433. }
  434. }
  435. file_chain_admin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  436. switch v := v.(*ChainsList); i {
  437. case 0:
  438. return &v.state
  439. case 1:
  440. return &v.sizeCache
  441. case 2:
  442. return &v.unknownFields
  443. default:
  444. return nil
  445. }
  446. }
  447. file_chain_admin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  448. switch v := v.(*Chain); i {
  449. case 0:
  450. return &v.state
  451. case 1:
  452. return &v.sizeCache
  453. case 2:
  454. return &v.unknownFields
  455. default:
  456. return nil
  457. }
  458. }
  459. file_chain_admin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
  460. switch v := v.(*GetChainReq); i {
  461. case 0:
  462. return &v.state
  463. case 1:
  464. return &v.sizeCache
  465. case 2:
  466. return &v.unknownFields
  467. default:
  468. return nil
  469. }
  470. }
  471. }
  472. type x struct{}
  473. out := protoimpl.TypeBuilder{
  474. File: protoimpl.DescBuilder{
  475. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  476. RawDescriptor: file_chain_admin_proto_rawDesc,
  477. NumEnums: 0,
  478. NumMessages: 5,
  479. NumExtensions: 0,
  480. NumServices: 1,
  481. },
  482. GoTypes: file_chain_admin_proto_goTypes,
  483. DependencyIndexes: file_chain_admin_proto_depIdxs,
  484. MessageInfos: file_chain_admin_proto_msgTypes,
  485. }.Build()
  486. File_chain_admin_proto = out.File
  487. file_chain_admin_proto_rawDesc = nil
  488. file_chain_admin_proto_goTypes = nil
  489. file_chain_admin_proto_depIdxs = nil
  490. }
  491. // Reference imports to suppress errors if they are not otherwise used.
  492. var _ context.Context
  493. var _ grpc.ClientConnInterface
  494. // This is a compile-time assertion to ensure that this generated file
  495. // is compatible with the grpc package it is being compiled against.
  496. const _ = grpc.SupportPackageIsVersion6
  497. // ServiceChainClient is the client API for ServiceChain service.
  498. //
  499. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  500. type ServiceChainClient interface {
  501. RegisterChain(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
  502. GetAllChains(ctx context.Context, in *GetAllChainsReq, opts ...grpc.CallOption) (*Response, error)
  503. GetChain(ctx context.Context, in *GetChainReq, opts ...grpc.CallOption) (*Response, error)
  504. EditChain(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
  505. }
  506. type serviceChainClient struct {
  507. cc grpc.ClientConnInterface
  508. }
  509. func NewServiceChainClient(cc grpc.ClientConnInterface) ServiceChainClient {
  510. return &serviceChainClient{cc}
  511. }
  512. func (c *serviceChainClient) RegisterChain(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
  513. out := new(Response)
  514. err := c.cc.Invoke(ctx, "/pb.ServiceChain/RegisterChain", in, out, opts...)
  515. if err != nil {
  516. return nil, err
  517. }
  518. return out, nil
  519. }
  520. func (c *serviceChainClient) GetAllChains(ctx context.Context, in *GetAllChainsReq, opts ...grpc.CallOption) (*Response, error) {
  521. out := new(Response)
  522. err := c.cc.Invoke(ctx, "/pb.ServiceChain/GetAllChains", in, out, opts...)
  523. if err != nil {
  524. return nil, err
  525. }
  526. return out, nil
  527. }
  528. func (c *serviceChainClient) GetChain(ctx context.Context, in *GetChainReq, opts ...grpc.CallOption) (*Response, error) {
  529. out := new(Response)
  530. err := c.cc.Invoke(ctx, "/pb.ServiceChain/GetChain", in, out, opts...)
  531. if err != nil {
  532. return nil, err
  533. }
  534. return out, nil
  535. }
  536. func (c *serviceChainClient) EditChain(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
  537. out := new(Response)
  538. err := c.cc.Invoke(ctx, "/pb.ServiceChain/EditChain", in, out, opts...)
  539. if err != nil {
  540. return nil, err
  541. }
  542. return out, nil
  543. }
  544. // ServiceChainServer is the server API for ServiceChain service.
  545. type ServiceChainServer interface {
  546. RegisterChain(context.Context, *Request) (*Response, error)
  547. GetAllChains(context.Context, *GetAllChainsReq) (*Response, error)
  548. GetChain(context.Context, *GetChainReq) (*Response, error)
  549. EditChain(context.Context, *Request) (*Response, error)
  550. }
  551. // UnimplementedServiceChainServer can be embedded to have forward compatible implementations.
  552. type UnimplementedServiceChainServer struct {
  553. }
  554. func (*UnimplementedServiceChainServer) RegisterChain(context.Context, *Request) (*Response, error) {
  555. return nil, status.Errorf(codes.Unimplemented, "method RegisterChain not implemented")
  556. }
  557. func (*UnimplementedServiceChainServer) GetAllChains(context.Context, *GetAllChainsReq) (*Response, error) {
  558. return nil, status.Errorf(codes.Unimplemented, "method GetAllChains not implemented")
  559. }
  560. func (*UnimplementedServiceChainServer) GetChain(context.Context, *GetChainReq) (*Response, error) {
  561. return nil, status.Errorf(codes.Unimplemented, "method GetChain not implemented")
  562. }
  563. func (*UnimplementedServiceChainServer) EditChain(context.Context, *Request) (*Response, error) {
  564. return nil, status.Errorf(codes.Unimplemented, "method EditChain not implemented")
  565. }
  566. func RegisterServiceChainServer(s *grpc.Server, srv ServiceChainServer) {
  567. s.RegisterService(&_ServiceChain_serviceDesc, srv)
  568. }
  569. func _ServiceChain_RegisterChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  570. in := new(Request)
  571. if err := dec(in); err != nil {
  572. return nil, err
  573. }
  574. if interceptor == nil {
  575. return srv.(ServiceChainServer).RegisterChain(ctx, in)
  576. }
  577. info := &grpc.UnaryServerInfo{
  578. Server: srv,
  579. FullMethod: "/pb.ServiceChain/RegisterChain",
  580. }
  581. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  582. return srv.(ServiceChainServer).RegisterChain(ctx, req.(*Request))
  583. }
  584. return interceptor(ctx, in, info, handler)
  585. }
  586. func _ServiceChain_GetAllChains_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  587. in := new(GetAllChainsReq)
  588. if err := dec(in); err != nil {
  589. return nil, err
  590. }
  591. if interceptor == nil {
  592. return srv.(ServiceChainServer).GetAllChains(ctx, in)
  593. }
  594. info := &grpc.UnaryServerInfo{
  595. Server: srv,
  596. FullMethod: "/pb.ServiceChain/GetAllChains",
  597. }
  598. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  599. return srv.(ServiceChainServer).GetAllChains(ctx, req.(*GetAllChainsReq))
  600. }
  601. return interceptor(ctx, in, info, handler)
  602. }
  603. func _ServiceChain_GetChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  604. in := new(GetChainReq)
  605. if err := dec(in); err != nil {
  606. return nil, err
  607. }
  608. if interceptor == nil {
  609. return srv.(ServiceChainServer).GetChain(ctx, in)
  610. }
  611. info := &grpc.UnaryServerInfo{
  612. Server: srv,
  613. FullMethod: "/pb.ServiceChain/GetChain",
  614. }
  615. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  616. return srv.(ServiceChainServer).GetChain(ctx, req.(*GetChainReq))
  617. }
  618. return interceptor(ctx, in, info, handler)
  619. }
  620. func _ServiceChain_EditChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  621. in := new(Request)
  622. if err := dec(in); err != nil {
  623. return nil, err
  624. }
  625. if interceptor == nil {
  626. return srv.(ServiceChainServer).EditChain(ctx, in)
  627. }
  628. info := &grpc.UnaryServerInfo{
  629. Server: srv,
  630. FullMethod: "/pb.ServiceChain/EditChain",
  631. }
  632. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  633. return srv.(ServiceChainServer).EditChain(ctx, req.(*Request))
  634. }
  635. return interceptor(ctx, in, info, handler)
  636. }
  637. var _ServiceChain_serviceDesc = grpc.ServiceDesc{
  638. ServiceName: "pb.ServiceChain",
  639. HandlerType: (*ServiceChainServer)(nil),
  640. Methods: []grpc.MethodDesc{
  641. {
  642. MethodName: "RegisterChain",
  643. Handler: _ServiceChain_RegisterChain_Handler,
  644. },
  645. {
  646. MethodName: "GetAllChains",
  647. Handler: _ServiceChain_GetAllChains_Handler,
  648. },
  649. {
  650. MethodName: "GetChain",
  651. Handler: _ServiceChain_GetChain_Handler,
  652. },
  653. {
  654. MethodName: "EditChain",
  655. Handler: _ServiceChain_EditChain_Handler,
  656. },
  657. },
  658. Streams: []grpc.StreamDesc{},
  659. Metadata: "chain_admin.proto",
  660. }