| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: test.proto
- package rpc
- import (
- context "context"
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- anypb "google.golang.org/protobuf/types/known/anypb"
- math "math"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
- type TestAny struct {
- Title string `protobuf:"bytes,2,opt,name=Title,proto3" json:"Title,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
- func (m *TestAny) Reset() { *m = TestAny{} }
- func (m *TestAny) String() string { return proto.CompactTextString(m) }
- func (*TestAny) ProtoMessage() {}
- func (*TestAny) Descriptor() ([]byte, []int) {
- return fileDescriptor_c161fcfdc0c3ff1e, []int{0}
- }
- func (m *TestAny) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_TestAny.Unmarshal(m, b)
- }
- func (m *TestAny) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_TestAny.Marshal(b, m, deterministic)
- }
- func (m *TestAny) XXX_Merge(src proto.Message) {
- xxx_messageInfo_TestAny.Merge(m, src)
- }
- func (m *TestAny) XXX_Size() int {
- return xxx_messageInfo_TestAny.Size(m)
- }
- func (m *TestAny) XXX_DiscardUnknown() {
- xxx_messageInfo_TestAny.DiscardUnknown(m)
- }
- var xxx_messageInfo_TestAny proto.InternalMessageInfo
- func (m *TestAny) GetTitle() string {
- if m != nil {
- return m.Title
- }
- return ""
- }
- type Response struct {
- Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
- Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"`
- Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
- func (m *Response) Reset() { *m = Response{} }
- func (m *Response) String() string { return proto.CompactTextString(m) }
- func (*Response) ProtoMessage() {}
- func (*Response) Descriptor() ([]byte, []int) {
- return fileDescriptor_c161fcfdc0c3ff1e, []int{1}
- }
- func (m *Response) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Response.Unmarshal(m, b)
- }
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Response.Marshal(b, m, deterministic)
- }
- func (m *Response) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Response.Merge(m, src)
- }
- func (m *Response) XXX_Size() int {
- return xxx_messageInfo_Response.Size(m)
- }
- func (m *Response) XXX_DiscardUnknown() {
- xxx_messageInfo_Response.DiscardUnknown(m)
- }
- var xxx_messageInfo_Response proto.InternalMessageInfo
- func (m *Response) GetCode() uint32 {
- if m != nil {
- return m.Code
- }
- return 0
- }
- func (m *Response) GetMsg() string {
- if m != nil {
- return m.Msg
- }
- return ""
- }
- func (m *Response) GetData() *anypb.Any {
- if m != nil {
- return m.Data
- }
- return nil
- }
- func init() {
- proto.RegisterType((*TestAny)(nil), "rpc.TestAny")
- proto.RegisterType((*Response)(nil), "rpc.Response")
- }
- func init() { proto.RegisterFile("test.proto", fileDescriptor_c161fcfdc0c3ff1e) }
- var fileDescriptor_c161fcfdc0c3ff1e = []byte{
- // 199 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x8e, 0xbd, 0x6e, 0x84, 0x30,
- 0x10, 0x84, 0xe5, 0x40, 0xfe, 0x36, 0x77, 0x52, 0xb4, 0xba, 0x82, 0x5c, 0x13, 0x74, 0x69, 0x5c,
- 0xf9, 0x24, 0x78, 0x02, 0x44, 0x9d, 0xc6, 0xa1, 0x4a, 0x67, 0x60, 0x43, 0x90, 0x90, 0x6d, 0xd9,
- 0x4e, 0x24, 0xde, 0xfe, 0x84, 0x81, 0x6e, 0x66, 0x7f, 0x66, 0x3e, 0x80, 0x40, 0x3e, 0x08, 0xeb,
- 0x4c, 0x30, 0x98, 0x38, 0xdb, 0x9d, 0xdf, 0x06, 0x63, 0x86, 0x89, 0xae, 0x71, 0xd4, 0xfe, 0xfd,
- 0x5c, 0x95, 0x9e, 0xd7, 0xfd, 0xe5, 0x1d, 0x1e, 0x1b, 0xf2, 0xa1, 0xd2, 0x33, 0x9e, 0xe0, 0xbe,
- 0x19, 0xc3, 0x44, 0xd9, 0x5d, 0xce, 0xf8, 0xb3, 0x5c, 0xcd, 0xe5, 0x1b, 0x9e, 0x24, 0x79, 0x6b,
- 0xb4, 0x27, 0x44, 0x48, 0x6b, 0xd3, 0x53, 0xc6, 0x72, 0xc6, 0x8f, 0x32, 0x6a, 0x7c, 0x85, 0xe4,
- 0xd3, 0x0f, 0xdb, 0xcf, 0x22, 0x91, 0x43, 0xda, 0xab, 0xa0, 0xb2, 0x24, 0x67, 0xfc, 0xa5, 0x38,
- 0x89, 0xb5, 0x5c, 0xec, 0xe5, 0xa2, 0xd2, 0xb3, 0x8c, 0x17, 0x45, 0x09, 0x87, 0x2f, 0x72, 0xff,
- 0x63, 0x47, 0xf5, 0xaf, 0x1a, 0x35, 0x7e, 0x40, 0xba, 0xa0, 0xe3, 0x41, 0x38, 0xdb, 0x89, 0x8d,
- 0xeb, 0x7c, 0x8c, 0x6e, 0x87, 0x68, 0x1f, 0x62, 0x50, 0x79, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xfa,
- 0xc4, 0x6b, 0xb5, 0xe6, 0x00, 0x00, 0x00,
- }
- // Reference imports to suppress errors if they are not otherwise used.
- var _ context.Context
- var _ grpc.ClientConn
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion4
- // ServiceChainClient is the client API for ServiceChain service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type ServiceChainClient interface {
- Test(ctx context.Context, in *TestAny, opts ...grpc.CallOption) (*Response, error)
- }
- type serviceChainClient struct {
- cc *grpc.ClientConn
- }
- func NewServiceChainClient(cc *grpc.ClientConn) ServiceChainClient {
- return &serviceChainClient{cc}
- }
- func (c *serviceChainClient) Test(ctx context.Context, in *TestAny, opts ...grpc.CallOption) (*Response, error) {
- out := new(Response)
- err := c.cc.Invoke(ctx, "/rpc.ServiceChain/test", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // ServiceChainServer is the server_e API for ServiceChain service.
- type ServiceChainServer interface {
- Test(context.Context, *TestAny) (*Response, error)
- }
- // UnimplementedServiceChainServer can be embedded to have forward compatible implementations.
- type UnimplementedServiceChainServer struct {
- }
- func (*UnimplementedServiceChainServer) Test(ctx context.Context, req *TestAny) (*Response, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Test not implemented")
- }
- func RegisterServiceChainServer(s *grpc.Server, srv ServiceChainServer) {
- s.RegisterService(&_ServiceChain_serviceDesc, srv)
- }
- func _ServiceChain_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(TestAny)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(ServiceChainServer).Test(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/rpc.ServiceChain/Test",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ServiceChainServer).Test(ctx, req.(*TestAny))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _ServiceChain_serviceDesc = grpc.ServiceDesc{
- ServiceName: "rpc.ServiceChain",
- HandlerType: (*ServiceChainServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "test",
- Handler: _ServiceChain_Test_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "test.proto",
- }
|