github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/api/meta/proto/api.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: github.com/micro/go-micro/examples/api/meta/proto/api.proto
     3  
     4  /*
     5  Package api is a generated protocol buffer package.
     6  
     7  It is generated from these files:
     8  	github.com/micro/go-micro/examples/api/meta/proto/api.proto
     9  
    10  It has these top-level messages:
    11  	CallRequest
    12  	CallResponse
    13  	EmptyRequest
    14  	EmptyResponse
    15  */
    16  package api
    17  
    18  import proto "github.com/golang/protobuf/proto"
    19  import fmt "fmt"
    20  import math "math"
    21  
    22  import (
    23  	context "golang.org/x/net/context"
    24  	grpc "google.golang.org/grpc"
    25  )
    26  
    27  // Reference imports to suppress errors if they are not otherwise used.
    28  var _ = proto.Marshal
    29  var _ = fmt.Errorf
    30  var _ = math.Inf
    31  
    32  // This is a compile-time assertion to ensure that this generated file
    33  // is compatible with the proto package it is being compiled against.
    34  // A compilation error at this line likely means your copy of the
    35  // proto package needs to be updated.
    36  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    37  
    38  type CallRequest struct {
    39  	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
    40  }
    41  
    42  func (m *CallRequest) Reset()                    { *m = CallRequest{} }
    43  func (m *CallRequest) String() string            { return proto.CompactTextString(m) }
    44  func (*CallRequest) ProtoMessage()               {}
    45  func (*CallRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    46  
    47  func (m *CallRequest) GetName() string {
    48  	if m != nil {
    49  		return m.Name
    50  	}
    51  	return ""
    52  }
    53  
    54  type CallResponse struct {
    55  	Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
    56  }
    57  
    58  func (m *CallResponse) Reset()                    { *m = CallResponse{} }
    59  func (m *CallResponse) String() string            { return proto.CompactTextString(m) }
    60  func (*CallResponse) ProtoMessage()               {}
    61  func (*CallResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
    62  
    63  func (m *CallResponse) GetMessage() string {
    64  	if m != nil {
    65  		return m.Message
    66  	}
    67  	return ""
    68  }
    69  
    70  type EmptyRequest struct {
    71  }
    72  
    73  func (m *EmptyRequest) Reset()                    { *m = EmptyRequest{} }
    74  func (m *EmptyRequest) String() string            { return proto.CompactTextString(m) }
    75  func (*EmptyRequest) ProtoMessage()               {}
    76  func (*EmptyRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
    77  
    78  type EmptyResponse struct {
    79  }
    80  
    81  func (m *EmptyResponse) Reset()                    { *m = EmptyResponse{} }
    82  func (m *EmptyResponse) String() string            { return proto.CompactTextString(m) }
    83  func (*EmptyResponse) ProtoMessage()               {}
    84  func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
    85  
    86  func init() {
    87  	proto.RegisterType((*CallRequest)(nil), "CallRequest")
    88  	proto.RegisterType((*CallResponse)(nil), "CallResponse")
    89  	proto.RegisterType((*EmptyRequest)(nil), "EmptyRequest")
    90  	proto.RegisterType((*EmptyResponse)(nil), "EmptyResponse")
    91  }
    92  
    93  // Reference imports to suppress errors if they are not otherwise used.
    94  var _ context.Context
    95  var _ grpc.ClientConn
    96  
    97  // This is a compile-time assertion to ensure that this generated file
    98  // is compatible with the grpc package it is being compiled against.
    99  const _ = grpc.SupportPackageIsVersion4
   100  
   101  // Client API for Example service
   102  
   103  type ExampleClient interface {
   104  	Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error)
   105  }
   106  
   107  type exampleClient struct {
   108  	cc *grpc.ClientConn
   109  }
   110  
   111  func NewExampleClient(cc *grpc.ClientConn) ExampleClient {
   112  	return &exampleClient{cc}
   113  }
   114  
   115  func (c *exampleClient) Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error) {
   116  	out := new(CallResponse)
   117  	err := grpc.Invoke(ctx, "/Example/Call", in, out, c.cc, opts...)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	return out, nil
   122  }
   123  
   124  // Server API for Example service
   125  
   126  type ExampleServer interface {
   127  	Call(context.Context, *CallRequest) (*CallResponse, error)
   128  }
   129  
   130  func RegisterExampleServer(s *grpc.Server, srv ExampleServer) {
   131  	s.RegisterService(&_Example_serviceDesc, srv)
   132  }
   133  
   134  func _Example_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   135  	in := new(CallRequest)
   136  	if err := dec(in); err != nil {
   137  		return nil, err
   138  	}
   139  	if interceptor == nil {
   140  		return srv.(ExampleServer).Call(ctx, in)
   141  	}
   142  	info := &grpc.UnaryServerInfo{
   143  		Server:     srv,
   144  		FullMethod: "/Example/Call",
   145  	}
   146  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   147  		return srv.(ExampleServer).Call(ctx, req.(*CallRequest))
   148  	}
   149  	return interceptor(ctx, in, info, handler)
   150  }
   151  
   152  var _Example_serviceDesc = grpc.ServiceDesc{
   153  	ServiceName: "Example",
   154  	HandlerType: (*ExampleServer)(nil),
   155  	Methods: []grpc.MethodDesc{
   156  		{
   157  			MethodName: "Call",
   158  			Handler:    _Example_Call_Handler,
   159  		},
   160  	},
   161  	Streams:  []grpc.StreamDesc{},
   162  	Metadata: "github.com/micro/go-micro/examples/api/meta/proto/api.proto",
   163  }
   164  
   165  // Client API for Foo service
   166  
   167  type FooClient interface {
   168  	Bar(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
   169  }
   170  
   171  type fooClient struct {
   172  	cc *grpc.ClientConn
   173  }
   174  
   175  func NewFooClient(cc *grpc.ClientConn) FooClient {
   176  	return &fooClient{cc}
   177  }
   178  
   179  func (c *fooClient) Bar(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*EmptyResponse, error) {
   180  	out := new(EmptyResponse)
   181  	err := grpc.Invoke(ctx, "/Foo/Bar", in, out, c.cc, opts...)
   182  	if err != nil {
   183  		return nil, err
   184  	}
   185  	return out, nil
   186  }
   187  
   188  // Server API for Foo service
   189  
   190  type FooServer interface {
   191  	Bar(context.Context, *EmptyRequest) (*EmptyResponse, error)
   192  }
   193  
   194  func RegisterFooServer(s *grpc.Server, srv FooServer) {
   195  	s.RegisterService(&_Foo_serviceDesc, srv)
   196  }
   197  
   198  func _Foo_Bar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   199  	in := new(EmptyRequest)
   200  	if err := dec(in); err != nil {
   201  		return nil, err
   202  	}
   203  	if interceptor == nil {
   204  		return srv.(FooServer).Bar(ctx, in)
   205  	}
   206  	info := &grpc.UnaryServerInfo{
   207  		Server:     srv,
   208  		FullMethod: "/Foo/Bar",
   209  	}
   210  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   211  		return srv.(FooServer).Bar(ctx, req.(*EmptyRequest))
   212  	}
   213  	return interceptor(ctx, in, info, handler)
   214  }
   215  
   216  var _Foo_serviceDesc = grpc.ServiceDesc{
   217  	ServiceName: "Foo",
   218  	HandlerType: (*FooServer)(nil),
   219  	Methods: []grpc.MethodDesc{
   220  		{
   221  			MethodName: "Bar",
   222  			Handler:    _Foo_Bar_Handler,
   223  		},
   224  	},
   225  	Streams:  []grpc.StreamDesc{},
   226  	Metadata: "github.com/micro/go-micro/examples/api/meta/proto/api.proto",
   227  }
   228  
   229  func init() { proto.RegisterFile("github.com/micro/go-micro/examples/api/meta/proto/api.proto", fileDescriptor0) }
   230  
   231  var fileDescriptor0 = []byte{
   232  	// 203 bytes of a gzipped FileDescriptorProto
   233  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0xd1, 0x6a, 0x83, 0x30,
   234  	0x14, 0x86, 0x75, 0xca, 0x64, 0x67, 0xea, 0x20, 0x57, 0xe2, 0xd5, 0x16, 0xd8, 0xf0, 0x66, 0xc9,
   235  	0x70, 0x6f, 0xd0, 0x62, 0x1f, 0xc0, 0x37, 0x88, 0x72, 0xb0, 0x82, 0x31, 0xa9, 0x89, 0xd0, 0xbe,
   236  	0x7d, 0x31, 0x5a, 0xb0, 0x77, 0xff, 0x07, 0x7f, 0xbe, 0x3f, 0x07, 0xca, 0xae, 0xb7, 0xe7, 0xb9,
   237  	0x61, 0xad, 0x92, 0x5c, 0xf6, 0xed, 0xa4, 0x38, 0x5e, 0x85, 0xd4, 0x03, 0x1a, 0x2e, 0x74, 0xcf,
   238  	0x25, 0x5a, 0xc1, 0xf5, 0xa4, 0xac, 0x5a, 0x90, 0xb9, 0x44, 0xbf, 0xe0, 0xfd, 0x28, 0x86, 0xa1,
   239  	0xc6, 0xcb, 0x8c, 0xc6, 0x12, 0x02, 0xe1, 0x28, 0x24, 0x66, 0xfe, 0xa7, 0x5f, 0xbc, 0xd5, 0x2e,
   240  	0xd3, 0x02, 0xe2, 0xb5, 0x62, 0xb4, 0x1a, 0x0d, 0x92, 0x0c, 0x22, 0x89, 0xc6, 0x88, 0x0e, 0xb3,
   241  	0x17, 0x57, 0x7b, 0x20, 0x4d, 0x21, 0xae, 0xa4, 0xb6, 0xb7, 0xcd, 0x46, 0x3f, 0x20, 0xd9, 0x78,
   242  	0x7d, 0x5a, 0xfe, 0x41, 0x54, 0xad, 0x5f, 0x22, 0xdf, 0x10, 0x2e, 0x56, 0x12, 0xb3, 0xdd, 0x7e,
   243  	0x9e, 0xb0, 0xfd, 0x14, 0xf5, 0xca, 0x5f, 0x08, 0x4e, 0x4a, 0x91, 0x1f, 0x08, 0x0e, 0x62, 0x22,
   244  	0x09, 0xdb, 0xfb, 0xf3, 0x94, 0x3d, 0xe9, 0xa9, 0xd7, 0xbc, 0xba, 0xab, 0xfe, 0xef, 0x01, 0x00,
   245  	0x00, 0xff, 0xff, 0x14, 0x42, 0xb8, 0x1d, 0x0b, 0x01, 0x00, 0x00,
   246  }