integral.pb.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0
  4. // protoc v3.15.3
  5. // source: integral.proto
  6. package integral
  7. import (
  8. context "context"
  9. proto "github.com/golang/protobuf/proto"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  14. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  15. reflect "reflect"
  16. sync "sync"
  17. )
  18. const (
  19. // Verify that this generated code is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  21. // Verify that runtime/protoimpl is sufficiently up-to-date.
  22. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  23. )
  24. // This is a compile-time assertion that a sufficiently up-to-date version
  25. // of the legacy proto package is being used.
  26. const _ = proto.ProtoPackageIsVersion4
  27. type AddReq struct {
  28. state protoimpl.MessageState
  29. sizeCache protoimpl.SizeCache
  30. unknownFields protoimpl.UnknownFields
  31. UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
  32. CountPoints int64 `protobuf:"varint,2,opt,name=countPoints,proto3" json:"countPoints,omitempty"`
  33. }
  34. func (x *AddReq) Reset() {
  35. *x = AddReq{}
  36. if protoimpl.UnsafeEnabled {
  37. mi := &file_integral_proto_msgTypes[0]
  38. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  39. ms.StoreMessageInfo(mi)
  40. }
  41. }
  42. func (x *AddReq) String() string {
  43. return protoimpl.X.MessageStringOf(x)
  44. }
  45. func (*AddReq) ProtoMessage() {}
  46. func (x *AddReq) ProtoReflect() protoreflect.Message {
  47. mi := &file_integral_proto_msgTypes[0]
  48. if protoimpl.UnsafeEnabled && x != nil {
  49. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  50. if ms.LoadMessageInfo() == nil {
  51. ms.StoreMessageInfo(mi)
  52. }
  53. return ms
  54. }
  55. return mi.MessageOf(x)
  56. }
  57. // Deprecated: Use AddReq.ProtoReflect.Descriptor instead.
  58. func (*AddReq) Descriptor() ([]byte, []int) {
  59. return file_integral_proto_rawDescGZIP(), []int{0}
  60. }
  61. func (x *AddReq) GetUserId() string {
  62. if x != nil {
  63. return x.UserId
  64. }
  65. return ""
  66. }
  67. func (x *AddReq) GetCountPoints() int64 {
  68. if x != nil {
  69. return x.CountPoints
  70. }
  71. return 0
  72. }
  73. type AddResp struct {
  74. state protoimpl.MessageState
  75. sizeCache protoimpl.SizeCache
  76. unknownFields protoimpl.UnknownFields
  77. Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
  78. }
  79. func (x *AddResp) Reset() {
  80. *x = AddResp{}
  81. if protoimpl.UnsafeEnabled {
  82. mi := &file_integral_proto_msgTypes[1]
  83. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  84. ms.StoreMessageInfo(mi)
  85. }
  86. }
  87. func (x *AddResp) String() string {
  88. return protoimpl.X.MessageStringOf(x)
  89. }
  90. func (*AddResp) ProtoMessage() {}
  91. func (x *AddResp) ProtoReflect() protoreflect.Message {
  92. mi := &file_integral_proto_msgTypes[1]
  93. if protoimpl.UnsafeEnabled && x != nil {
  94. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  95. if ms.LoadMessageInfo() == nil {
  96. ms.StoreMessageInfo(mi)
  97. }
  98. return ms
  99. }
  100. return mi.MessageOf(x)
  101. }
  102. // Deprecated: Use AddResp.ProtoReflect.Descriptor instead.
  103. func (*AddResp) Descriptor() ([]byte, []int) {
  104. return file_integral_proto_rawDescGZIP(), []int{1}
  105. }
  106. func (x *AddResp) GetStatus() bool {
  107. if x != nil {
  108. return x.Status
  109. }
  110. return false
  111. }
  112. type CheckReq struct {
  113. state protoimpl.MessageState
  114. sizeCache protoimpl.SizeCache
  115. unknownFields protoimpl.UnknownFields
  116. UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
  117. }
  118. func (x *CheckReq) Reset() {
  119. *x = CheckReq{}
  120. if protoimpl.UnsafeEnabled {
  121. mi := &file_integral_proto_msgTypes[2]
  122. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  123. ms.StoreMessageInfo(mi)
  124. }
  125. }
  126. func (x *CheckReq) String() string {
  127. return protoimpl.X.MessageStringOf(x)
  128. }
  129. func (*CheckReq) ProtoMessage() {}
  130. func (x *CheckReq) ProtoReflect() protoreflect.Message {
  131. mi := &file_integral_proto_msgTypes[2]
  132. if protoimpl.UnsafeEnabled && x != nil {
  133. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  134. if ms.LoadMessageInfo() == nil {
  135. ms.StoreMessageInfo(mi)
  136. }
  137. return ms
  138. }
  139. return mi.MessageOf(x)
  140. }
  141. // Deprecated: Use CheckReq.ProtoReflect.Descriptor instead.
  142. func (*CheckReq) Descriptor() ([]byte, []int) {
  143. return file_integral_proto_rawDescGZIP(), []int{2}
  144. }
  145. func (x *CheckReq) GetUserId() string {
  146. if x != nil {
  147. return x.UserId
  148. }
  149. return ""
  150. }
  151. type CheckResp struct {
  152. state protoimpl.MessageState
  153. sizeCache protoimpl.SizeCache
  154. unknownFields protoimpl.UnknownFields
  155. CountPoints int64 `protobuf:"varint,1,opt,name=countPoints,proto3" json:"countPoints,omitempty"`
  156. }
  157. func (x *CheckResp) Reset() {
  158. *x = CheckResp{}
  159. if protoimpl.UnsafeEnabled {
  160. mi := &file_integral_proto_msgTypes[3]
  161. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  162. ms.StoreMessageInfo(mi)
  163. }
  164. }
  165. func (x *CheckResp) String() string {
  166. return protoimpl.X.MessageStringOf(x)
  167. }
  168. func (*CheckResp) ProtoMessage() {}
  169. func (x *CheckResp) ProtoReflect() protoreflect.Message {
  170. mi := &file_integral_proto_msgTypes[3]
  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 CheckResp.ProtoReflect.Descriptor instead.
  181. func (*CheckResp) Descriptor() ([]byte, []int) {
  182. return file_integral_proto_rawDescGZIP(), []int{3}
  183. }
  184. func (x *CheckResp) GetCountPoints() int64 {
  185. if x != nil {
  186. return x.CountPoints
  187. }
  188. return 0
  189. }
  190. var File_integral_proto protoreflect.FileDescriptor
  191. var file_integral_proto_rawDesc = []byte{
  192. 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  193. 0x12, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x42, 0x0a, 0x06, 0x61, 0x64,
  194. 0x64, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01,
  195. 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b,
  196. 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
  197. 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x21,
  198. 0x0a, 0x07, 0x61, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61,
  199. 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
  200. 0x73, 0x22, 0x22, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a,
  201. 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
  202. 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
  203. 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74,
  204. 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x6f,
  205. 0x69, 0x6e, 0x74, 0x73, 0x32, 0xc8, 0x02, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
  206. 0x6c, 0x12, 0x2e, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x10, 0x2e, 0x69,
  207. 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11,
  208. 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x64, 0x64, 0x52, 0x65, 0x73,
  209. 0x70, 0x12, 0x34, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e,
  210. 0x63, 0x65, 0x12, 0x10, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x64,
  211. 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e,
  212. 0x61, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74,
  213. 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x10, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
  214. 0x6c, 0x2e, 0x61, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67,
  215. 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x69,
  216. 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x10,
  217. 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x64, 0x64, 0x52, 0x65, 0x71,
  218. 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x64, 0x64, 0x52,
  219. 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47,
  220. 0x75, 0x61, 0x72, 0x64, 0x12, 0x10, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e,
  221. 0x61, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
  222. 0x6c, 0x2e, 0x61, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0d, 0x69, 0x6e, 0x74,
  223. 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x2e, 0x69, 0x6e, 0x74,
  224. 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x69,
  225. 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x62,
  226. 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  227. }
  228. var (
  229. file_integral_proto_rawDescOnce sync.Once
  230. file_integral_proto_rawDescData = file_integral_proto_rawDesc
  231. )
  232. func file_integral_proto_rawDescGZIP() []byte {
  233. file_integral_proto_rawDescOnce.Do(func() {
  234. file_integral_proto_rawDescData = protoimpl.X.CompressGZIP(file_integral_proto_rawDescData)
  235. })
  236. return file_integral_proto_rawDescData
  237. }
  238. var file_integral_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  239. var file_integral_proto_goTypes = []interface{}{
  240. (*AddReq)(nil), // 0: integral.addReq
  241. (*AddResp)(nil), // 1: integral.addResp
  242. (*CheckReq)(nil), // 2: integral.checkReq
  243. (*CheckResp)(nil), // 3: integral.checkResp
  244. }
  245. var file_integral_proto_depIdxs = []int32{
  246. 0, // 0: integral.Integral.addFlow:input_type -> integral.addReq
  247. 0, // 1: integral.Integral.updateBalance:input_type -> integral.addReq
  248. 0, // 2: integral.Integral.updateTotal:input_type -> integral.addReq
  249. 0, // 3: integral.Integral.integralConsume:input_type -> integral.addReq
  250. 0, // 4: integral.Integral.integralGuard:input_type -> integral.addReq
  251. 0, // 5: integral.Integral.integralCheck:input_type -> integral.addReq
  252. 1, // 6: integral.Integral.addFlow:output_type -> integral.addResp
  253. 1, // 7: integral.Integral.updateBalance:output_type -> integral.addResp
  254. 1, // 8: integral.Integral.updateTotal:output_type -> integral.addResp
  255. 1, // 9: integral.Integral.integralConsume:output_type -> integral.addResp
  256. 1, // 10: integral.Integral.integralGuard:output_type -> integral.addResp
  257. 1, // 11: integral.Integral.integralCheck:output_type -> integral.addResp
  258. 6, // [6:12] is the sub-list for method output_type
  259. 0, // [0:6] is the sub-list for method input_type
  260. 0, // [0:0] is the sub-list for extension type_name
  261. 0, // [0:0] is the sub-list for extension extendee
  262. 0, // [0:0] is the sub-list for field type_name
  263. }
  264. func init() { file_integral_proto_init() }
  265. func file_integral_proto_init() {
  266. if File_integral_proto != nil {
  267. return
  268. }
  269. if !protoimpl.UnsafeEnabled {
  270. file_integral_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  271. switch v := v.(*AddReq); i {
  272. case 0:
  273. return &v.state
  274. case 1:
  275. return &v.sizeCache
  276. case 2:
  277. return &v.unknownFields
  278. default:
  279. return nil
  280. }
  281. }
  282. file_integral_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  283. switch v := v.(*AddResp); i {
  284. case 0:
  285. return &v.state
  286. case 1:
  287. return &v.sizeCache
  288. case 2:
  289. return &v.unknownFields
  290. default:
  291. return nil
  292. }
  293. }
  294. file_integral_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  295. switch v := v.(*CheckReq); i {
  296. case 0:
  297. return &v.state
  298. case 1:
  299. return &v.sizeCache
  300. case 2:
  301. return &v.unknownFields
  302. default:
  303. return nil
  304. }
  305. }
  306. file_integral_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  307. switch v := v.(*CheckResp); i {
  308. case 0:
  309. return &v.state
  310. case 1:
  311. return &v.sizeCache
  312. case 2:
  313. return &v.unknownFields
  314. default:
  315. return nil
  316. }
  317. }
  318. }
  319. type x struct{}
  320. out := protoimpl.TypeBuilder{
  321. File: protoimpl.DescBuilder{
  322. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  323. RawDescriptor: file_integral_proto_rawDesc,
  324. NumEnums: 0,
  325. NumMessages: 4,
  326. NumExtensions: 0,
  327. NumServices: 1,
  328. },
  329. GoTypes: file_integral_proto_goTypes,
  330. DependencyIndexes: file_integral_proto_depIdxs,
  331. MessageInfos: file_integral_proto_msgTypes,
  332. }.Build()
  333. File_integral_proto = out.File
  334. file_integral_proto_rawDesc = nil
  335. file_integral_proto_goTypes = nil
  336. file_integral_proto_depIdxs = nil
  337. }
  338. // Reference imports to suppress errors if they are not otherwise used.
  339. var _ context.Context
  340. var _ grpc.ClientConnInterface
  341. // This is a compile-time assertion to ensure that this generated file
  342. // is compatible with the grpc package it is being compiled against.
  343. const _ = grpc.SupportPackageIsVersion6
  344. // IntegralClient is the client API for Integral service.
  345. //
  346. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  347. type IntegralClient interface {
  348. //新增积分
  349. AddFlow(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error)
  350. //调整结存
  351. UpdateBalance(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error)
  352. //调整余额
  353. UpdateTotal(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error)
  354. //消耗积分
  355. IntegralConsume(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error)
  356. //积分守护
  357. IntegralGuard(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error)
  358. //到期积分查询
  359. IntegralCheck(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error)
  360. }
  361. type integralClient struct {
  362. cc grpc.ClientConnInterface
  363. }
  364. func NewIntegralClient(cc grpc.ClientConnInterface) IntegralClient {
  365. return &integralClient{cc}
  366. }
  367. func (c *integralClient) AddFlow(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error) {
  368. out := new(AddResp)
  369. err := c.cc.Invoke(ctx, "/integral.Integral/addFlow", in, out, opts...)
  370. if err != nil {
  371. return nil, err
  372. }
  373. return out, nil
  374. }
  375. func (c *integralClient) UpdateBalance(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error) {
  376. out := new(AddResp)
  377. err := c.cc.Invoke(ctx, "/integral.Integral/updateBalance", in, out, opts...)
  378. if err != nil {
  379. return nil, err
  380. }
  381. return out, nil
  382. }
  383. func (c *integralClient) UpdateTotal(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error) {
  384. out := new(AddResp)
  385. err := c.cc.Invoke(ctx, "/integral.Integral/updateTotal", in, out, opts...)
  386. if err != nil {
  387. return nil, err
  388. }
  389. return out, nil
  390. }
  391. func (c *integralClient) IntegralConsume(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error) {
  392. out := new(AddResp)
  393. err := c.cc.Invoke(ctx, "/integral.Integral/integralConsume", in, out, opts...)
  394. if err != nil {
  395. return nil, err
  396. }
  397. return out, nil
  398. }
  399. func (c *integralClient) IntegralGuard(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error) {
  400. out := new(AddResp)
  401. err := c.cc.Invoke(ctx, "/integral.Integral/integralGuard", in, out, opts...)
  402. if err != nil {
  403. return nil, err
  404. }
  405. return out, nil
  406. }
  407. func (c *integralClient) IntegralCheck(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error) {
  408. out := new(AddResp)
  409. err := c.cc.Invoke(ctx, "/integral.Integral/integralCheck", in, out, opts...)
  410. if err != nil {
  411. return nil, err
  412. }
  413. return out, nil
  414. }
  415. // IntegralServer is the server API for Integral service.
  416. type IntegralServer interface {
  417. //新增积分
  418. AddFlow(context.Context, *AddReq) (*AddResp, error)
  419. //调整结存
  420. UpdateBalance(context.Context, *AddReq) (*AddResp, error)
  421. //调整余额
  422. UpdateTotal(context.Context, *AddReq) (*AddResp, error)
  423. //消耗积分
  424. IntegralConsume(context.Context, *AddReq) (*AddResp, error)
  425. //积分守护
  426. IntegralGuard(context.Context, *AddReq) (*AddResp, error)
  427. //到期积分查询
  428. IntegralCheck(context.Context, *AddReq) (*AddResp, error)
  429. }
  430. // UnimplementedIntegralServer can be embedded to have forward compatible implementations.
  431. type UnimplementedIntegralServer struct {
  432. }
  433. func (*UnimplementedIntegralServer) AddFlow(context.Context, *AddReq) (*AddResp, error) {
  434. return nil, status.Errorf(codes.Unimplemented, "method AddFlow not implemented")
  435. }
  436. func (*UnimplementedIntegralServer) UpdateBalance(context.Context, *AddReq) (*AddResp, error) {
  437. return nil, status.Errorf(codes.Unimplemented, "method UpdateBalance not implemented")
  438. }
  439. func (*UnimplementedIntegralServer) UpdateTotal(context.Context, *AddReq) (*AddResp, error) {
  440. return nil, status.Errorf(codes.Unimplemented, "method UpdateTotal not implemented")
  441. }
  442. func (*UnimplementedIntegralServer) IntegralConsume(context.Context, *AddReq) (*AddResp, error) {
  443. return nil, status.Errorf(codes.Unimplemented, "method IntegralConsume not implemented")
  444. }
  445. func (*UnimplementedIntegralServer) IntegralGuard(context.Context, *AddReq) (*AddResp, error) {
  446. return nil, status.Errorf(codes.Unimplemented, "method IntegralGuard not implemented")
  447. }
  448. func (*UnimplementedIntegralServer) IntegralCheck(context.Context, *AddReq) (*AddResp, error) {
  449. return nil, status.Errorf(codes.Unimplemented, "method IntegralCheck not implemented")
  450. }
  451. func RegisterIntegralServer(s *grpc.Server, srv IntegralServer) {
  452. s.RegisterService(&_Integral_serviceDesc, srv)
  453. }
  454. func _Integral_AddFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  455. in := new(AddReq)
  456. if err := dec(in); err != nil {
  457. return nil, err
  458. }
  459. if interceptor == nil {
  460. return srv.(IntegralServer).AddFlow(ctx, in)
  461. }
  462. info := &grpc.UnaryServerInfo{
  463. Server: srv,
  464. FullMethod: "/integral.Integral/AddFlow",
  465. }
  466. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  467. return srv.(IntegralServer).AddFlow(ctx, req.(*AddReq))
  468. }
  469. return interceptor(ctx, in, info, handler)
  470. }
  471. func _Integral_UpdateBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  472. in := new(AddReq)
  473. if err := dec(in); err != nil {
  474. return nil, err
  475. }
  476. if interceptor == nil {
  477. return srv.(IntegralServer).UpdateBalance(ctx, in)
  478. }
  479. info := &grpc.UnaryServerInfo{
  480. Server: srv,
  481. FullMethod: "/integral.Integral/UpdateBalance",
  482. }
  483. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  484. return srv.(IntegralServer).UpdateBalance(ctx, req.(*AddReq))
  485. }
  486. return interceptor(ctx, in, info, handler)
  487. }
  488. func _Integral_UpdateTotal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  489. in := new(AddReq)
  490. if err := dec(in); err != nil {
  491. return nil, err
  492. }
  493. if interceptor == nil {
  494. return srv.(IntegralServer).UpdateTotal(ctx, in)
  495. }
  496. info := &grpc.UnaryServerInfo{
  497. Server: srv,
  498. FullMethod: "/integral.Integral/UpdateTotal",
  499. }
  500. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  501. return srv.(IntegralServer).UpdateTotal(ctx, req.(*AddReq))
  502. }
  503. return interceptor(ctx, in, info, handler)
  504. }
  505. func _Integral_IntegralConsume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  506. in := new(AddReq)
  507. if err := dec(in); err != nil {
  508. return nil, err
  509. }
  510. if interceptor == nil {
  511. return srv.(IntegralServer).IntegralConsume(ctx, in)
  512. }
  513. info := &grpc.UnaryServerInfo{
  514. Server: srv,
  515. FullMethod: "/integral.Integral/IntegralConsume",
  516. }
  517. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  518. return srv.(IntegralServer).IntegralConsume(ctx, req.(*AddReq))
  519. }
  520. return interceptor(ctx, in, info, handler)
  521. }
  522. func _Integral_IntegralGuard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  523. in := new(AddReq)
  524. if err := dec(in); err != nil {
  525. return nil, err
  526. }
  527. if interceptor == nil {
  528. return srv.(IntegralServer).IntegralGuard(ctx, in)
  529. }
  530. info := &grpc.UnaryServerInfo{
  531. Server: srv,
  532. FullMethod: "/integral.Integral/IntegralGuard",
  533. }
  534. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  535. return srv.(IntegralServer).IntegralGuard(ctx, req.(*AddReq))
  536. }
  537. return interceptor(ctx, in, info, handler)
  538. }
  539. func _Integral_IntegralCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  540. in := new(AddReq)
  541. if err := dec(in); err != nil {
  542. return nil, err
  543. }
  544. if interceptor == nil {
  545. return srv.(IntegralServer).IntegralCheck(ctx, in)
  546. }
  547. info := &grpc.UnaryServerInfo{
  548. Server: srv,
  549. FullMethod: "/integral.Integral/IntegralCheck",
  550. }
  551. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  552. return srv.(IntegralServer).IntegralCheck(ctx, req.(*AddReq))
  553. }
  554. return interceptor(ctx, in, info, handler)
  555. }
  556. var _Integral_serviceDesc = grpc.ServiceDesc{
  557. ServiceName: "integral.Integral",
  558. HandlerType: (*IntegralServer)(nil),
  559. Methods: []grpc.MethodDesc{
  560. {
  561. MethodName: "addFlow",
  562. Handler: _Integral_AddFlow_Handler,
  563. },
  564. {
  565. MethodName: "updateBalance",
  566. Handler: _Integral_UpdateBalance_Handler,
  567. },
  568. {
  569. MethodName: "updateTotal",
  570. Handler: _Integral_UpdateTotal_Handler,
  571. },
  572. {
  573. MethodName: "integralConsume",
  574. Handler: _Integral_IntegralConsume_Handler,
  575. },
  576. {
  577. MethodName: "integralGuard",
  578. Handler: _Integral_IntegralGuard_Handler,
  579. },
  580. {
  581. MethodName: "integralCheck",
  582. Handler: _Integral_IntegralCheck_Handler,
  583. },
  584. },
  585. Streams: []grpc.StreamDesc{},
  586. Metadata: "integral.proto",
  587. }