test.pb.go 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: test.proto
  3. package rpc
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. anypb "google.golang.org/protobuf/types/known/anypb"
  12. math "math"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  23. type TestAny struct {
  24. Title string `protobuf:"bytes,2,opt,name=Title,proto3" json:"Title,omitempty"`
  25. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  26. XXX_unrecognized []byte `json:"-"`
  27. XXX_sizecache int32 `json:"-"`
  28. }
  29. func (m *TestAny) Reset() { *m = TestAny{} }
  30. func (m *TestAny) String() string { return proto.CompactTextString(m) }
  31. func (*TestAny) ProtoMessage() {}
  32. func (*TestAny) Descriptor() ([]byte, []int) {
  33. return fileDescriptor_c161fcfdc0c3ff1e, []int{0}
  34. }
  35. func (m *TestAny) XXX_Unmarshal(b []byte) error {
  36. return xxx_messageInfo_TestAny.Unmarshal(m, b)
  37. }
  38. func (m *TestAny) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  39. return xxx_messageInfo_TestAny.Marshal(b, m, deterministic)
  40. }
  41. func (m *TestAny) XXX_Merge(src proto.Message) {
  42. xxx_messageInfo_TestAny.Merge(m, src)
  43. }
  44. func (m *TestAny) XXX_Size() int {
  45. return xxx_messageInfo_TestAny.Size(m)
  46. }
  47. func (m *TestAny) XXX_DiscardUnknown() {
  48. xxx_messageInfo_TestAny.DiscardUnknown(m)
  49. }
  50. var xxx_messageInfo_TestAny proto.InternalMessageInfo
  51. func (m *TestAny) GetTitle() string {
  52. if m != nil {
  53. return m.Title
  54. }
  55. return ""
  56. }
  57. type Response struct {
  58. Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
  59. Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"`
  60. Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
  61. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  62. XXX_unrecognized []byte `json:"-"`
  63. XXX_sizecache int32 `json:"-"`
  64. }
  65. func (m *Response) Reset() { *m = Response{} }
  66. func (m *Response) String() string { return proto.CompactTextString(m) }
  67. func (*Response) ProtoMessage() {}
  68. func (*Response) Descriptor() ([]byte, []int) {
  69. return fileDescriptor_c161fcfdc0c3ff1e, []int{1}
  70. }
  71. func (m *Response) XXX_Unmarshal(b []byte) error {
  72. return xxx_messageInfo_Response.Unmarshal(m, b)
  73. }
  74. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  75. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  76. }
  77. func (m *Response) XXX_Merge(src proto.Message) {
  78. xxx_messageInfo_Response.Merge(m, src)
  79. }
  80. func (m *Response) XXX_Size() int {
  81. return xxx_messageInfo_Response.Size(m)
  82. }
  83. func (m *Response) XXX_DiscardUnknown() {
  84. xxx_messageInfo_Response.DiscardUnknown(m)
  85. }
  86. var xxx_messageInfo_Response proto.InternalMessageInfo
  87. func (m *Response) GetCode() uint32 {
  88. if m != nil {
  89. return m.Code
  90. }
  91. return 0
  92. }
  93. func (m *Response) GetMsg() string {
  94. if m != nil {
  95. return m.Msg
  96. }
  97. return ""
  98. }
  99. func (m *Response) GetData() *anypb.Any {
  100. if m != nil {
  101. return m.Data
  102. }
  103. return nil
  104. }
  105. func init() {
  106. proto.RegisterType((*TestAny)(nil), "rpc.TestAny")
  107. proto.RegisterType((*Response)(nil), "rpc.Response")
  108. }
  109. func init() { proto.RegisterFile("test.proto", fileDescriptor_c161fcfdc0c3ff1e) }
  110. var fileDescriptor_c161fcfdc0c3ff1e = []byte{
  111. // 199 bytes of a gzipped FileDescriptorProto
  112. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x8e, 0xbd, 0x6e, 0x84, 0x30,
  113. 0x10, 0x84, 0xe5, 0x40, 0xfe, 0x36, 0x77, 0x52, 0xb4, 0xba, 0x82, 0x5c, 0x13, 0x74, 0x69, 0x5c,
  114. 0xf9, 0x24, 0x78, 0x02, 0x44, 0x9d, 0xc6, 0xa1, 0x4a, 0x67, 0x60, 0x43, 0x90, 0x90, 0x6d, 0xd9,
  115. 0x4e, 0x24, 0xde, 0xfe, 0x84, 0x81, 0x6e, 0x66, 0x7f, 0x66, 0x3e, 0x80, 0x40, 0x3e, 0x08, 0xeb,
  116. 0x4c, 0x30, 0x98, 0x38, 0xdb, 0x9d, 0xdf, 0x06, 0x63, 0x86, 0x89, 0xae, 0x71, 0xd4, 0xfe, 0xfd,
  117. 0x5c, 0x95, 0x9e, 0xd7, 0xfd, 0xe5, 0x1d, 0x1e, 0x1b, 0xf2, 0xa1, 0xd2, 0x33, 0x9e, 0xe0, 0xbe,
  118. 0x19, 0xc3, 0x44, 0xd9, 0x5d, 0xce, 0xf8, 0xb3, 0x5c, 0xcd, 0xe5, 0x1b, 0x9e, 0x24, 0x79, 0x6b,
  119. 0xb4, 0x27, 0x44, 0x48, 0x6b, 0xd3, 0x53, 0xc6, 0x72, 0xc6, 0x8f, 0x32, 0x6a, 0x7c, 0x85, 0xe4,
  120. 0xd3, 0x0f, 0xdb, 0xcf, 0x22, 0x91, 0x43, 0xda, 0xab, 0xa0, 0xb2, 0x24, 0x67, 0xfc, 0xa5, 0x38,
  121. 0x89, 0xb5, 0x5c, 0xec, 0xe5, 0xa2, 0xd2, 0xb3, 0x8c, 0x17, 0x45, 0x09, 0x87, 0x2f, 0x72, 0xff,
  122. 0x63, 0x47, 0xf5, 0xaf, 0x1a, 0x35, 0x7e, 0x40, 0xba, 0xa0, 0xe3, 0x41, 0x38, 0xdb, 0x89, 0x8d,
  123. 0xeb, 0x7c, 0x8c, 0x6e, 0x87, 0x68, 0x1f, 0x62, 0x50, 0x79, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xfa,
  124. 0xc4, 0x6b, 0xb5, 0xe6, 0x00, 0x00, 0x00,
  125. }
  126. // Reference imports to suppress errors if they are not otherwise used.
  127. var _ context.Context
  128. var _ grpc.ClientConn
  129. // This is a compile-time assertion to ensure that this generated file
  130. // is compatible with the grpc package it is being compiled against.
  131. const _ = grpc.SupportPackageIsVersion4
  132. // ServiceChainClient is the client API for ServiceChain service.
  133. //
  134. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  135. type ServiceChainClient interface {
  136. Test(ctx context.Context, in *TestAny, opts ...grpc.CallOption) (*Response, error)
  137. }
  138. type serviceChainClient struct {
  139. cc *grpc.ClientConn
  140. }
  141. func NewServiceChainClient(cc *grpc.ClientConn) ServiceChainClient {
  142. return &serviceChainClient{cc}
  143. }
  144. func (c *serviceChainClient) Test(ctx context.Context, in *TestAny, opts ...grpc.CallOption) (*Response, error) {
  145. out := new(Response)
  146. err := c.cc.Invoke(ctx, "/rpc.ServiceChain/test", in, out, opts...)
  147. if err != nil {
  148. return nil, err
  149. }
  150. return out, nil
  151. }
  152. // ServiceChainServer is the server_e API for ServiceChain service.
  153. type ServiceChainServer interface {
  154. Test(context.Context, *TestAny) (*Response, error)
  155. }
  156. // UnimplementedServiceChainServer can be embedded to have forward compatible implementations.
  157. type UnimplementedServiceChainServer struct {
  158. }
  159. func (*UnimplementedServiceChainServer) Test(ctx context.Context, req *TestAny) (*Response, error) {
  160. return nil, status.Errorf(codes.Unimplemented, "method Test not implemented")
  161. }
  162. func RegisterServiceChainServer(s *grpc.Server, srv ServiceChainServer) {
  163. s.RegisterService(&_ServiceChain_serviceDesc, srv)
  164. }
  165. func _ServiceChain_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  166. in := new(TestAny)
  167. if err := dec(in); err != nil {
  168. return nil, err
  169. }
  170. if interceptor == nil {
  171. return srv.(ServiceChainServer).Test(ctx, in)
  172. }
  173. info := &grpc.UnaryServerInfo{
  174. Server: srv,
  175. FullMethod: "/rpc.ServiceChain/Test",
  176. }
  177. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  178. return srv.(ServiceChainServer).Test(ctx, req.(*TestAny))
  179. }
  180. return interceptor(ctx, in, info, handler)
  181. }
  182. var _ServiceChain_serviceDesc = grpc.ServiceDesc{
  183. ServiceName: "rpc.ServiceChain",
  184. HandlerType: (*ServiceChainServer)(nil),
  185. Methods: []grpc.MethodDesc{
  186. {
  187. MethodName: "test",
  188. Handler: _ServiceChain_Test_Handler,
  189. },
  190. },
  191. Streams: []grpc.StreamDesc{},
  192. Metadata: "test.proto",
  193. }