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

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: hello.proto
     3  
     4  /*
     5  Package greeter is a generated protocol buffer package.
     6  
     7  It is generated from these files:
     8  	hello.proto
     9  
    10  It has these top-level messages:
    11  	Request
    12  	Response
    13  */
    14  package greeter
    15  
    16  import proto "github.com/golang/protobuf/proto"
    17  import fmt "fmt"
    18  import math "math"
    19  import _ "google.golang.org/genproto/googleapis/api/annotations"
    20  
    21  import (
    22  	context "golang.org/x/net/context"
    23  	grpc "google.golang.org/grpc"
    24  )
    25  
    26  // Reference imports to suppress errors if they are not otherwise used.
    27  var _ = proto.Marshal
    28  var _ = fmt.Errorf
    29  var _ = math.Inf
    30  
    31  // This is a compile-time assertion to ensure that this generated file
    32  // is compatible with the proto package it is being compiled against.
    33  // A compilation error at this line likely means your copy of the
    34  // proto package needs to be updated.
    35  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    36  
    37  type Request struct {
    38  	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
    39  }
    40  
    41  func (m *Request) Reset()                    { *m = Request{} }
    42  func (m *Request) String() string            { return proto.CompactTextString(m) }
    43  func (*Request) ProtoMessage()               {}
    44  func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    45  
    46  func (m *Request) GetName() string {
    47  	if m != nil {
    48  		return m.Name
    49  	}
    50  	return ""
    51  }
    52  
    53  type Response struct {
    54  	Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
    55  }
    56  
    57  func (m *Response) Reset()                    { *m = Response{} }
    58  func (m *Response) String() string            { return proto.CompactTextString(m) }
    59  func (*Response) ProtoMessage()               {}
    60  func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
    61  
    62  func (m *Response) GetMsg() string {
    63  	if m != nil {
    64  		return m.Msg
    65  	}
    66  	return ""
    67  }
    68  
    69  func init() {
    70  	proto.RegisterType((*Request)(nil), "greeter.Request")
    71  	proto.RegisterType((*Response)(nil), "greeter.Response")
    72  }
    73  
    74  // Reference imports to suppress errors if they are not otherwise used.
    75  var _ context.Context
    76  var _ grpc.ClientConn
    77  
    78  // This is a compile-time assertion to ensure that this generated file
    79  // is compatible with the grpc package it is being compiled against.
    80  const _ = grpc.SupportPackageIsVersion4
    81  
    82  // Client API for Say service
    83  
    84  type SayClient interface {
    85  	Hello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
    86  }
    87  
    88  type sayClient struct {
    89  	cc *grpc.ClientConn
    90  }
    91  
    92  func NewSayClient(cc *grpc.ClientConn) SayClient {
    93  	return &sayClient{cc}
    94  }
    95  
    96  func (c *sayClient) Hello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
    97  	out := new(Response)
    98  	err := grpc.Invoke(ctx, "/greeter.Say/Hello", in, out, c.cc, opts...)
    99  	if err != nil {
   100  		return nil, err
   101  	}
   102  	return out, nil
   103  }
   104  
   105  // Server API for Say service
   106  
   107  type SayServer interface {
   108  	Hello(context.Context, *Request) (*Response, error)
   109  }
   110  
   111  func RegisterSayServer(s *grpc.Server, srv SayServer) {
   112  	s.RegisterService(&_Say_serviceDesc, srv)
   113  }
   114  
   115  func _Say_Hello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   116  	in := new(Request)
   117  	if err := dec(in); err != nil {
   118  		return nil, err
   119  	}
   120  	if interceptor == nil {
   121  		return srv.(SayServer).Hello(ctx, in)
   122  	}
   123  	info := &grpc.UnaryServerInfo{
   124  		Server:     srv,
   125  		FullMethod: "/greeter.Say/Hello",
   126  	}
   127  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   128  		return srv.(SayServer).Hello(ctx, req.(*Request))
   129  	}
   130  	return interceptor(ctx, in, info, handler)
   131  }
   132  
   133  var _Say_serviceDesc = grpc.ServiceDesc{
   134  	ServiceName: "greeter.Say",
   135  	HandlerType: (*SayServer)(nil),
   136  	Methods: []grpc.MethodDesc{
   137  		{
   138  			MethodName: "Hello",
   139  			Handler:    _Say_Hello_Handler,
   140  		},
   141  	},
   142  	Streams:  []grpc.StreamDesc{},
   143  	Metadata: "hello.proto",
   144  }
   145  
   146  func init() { proto.RegisterFile("hello.proto", fileDescriptor0) }
   147  
   148  var fileDescriptor0 = []byte{
   149  	// 176 bytes of a gzipped FileDescriptorProto
   150  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x48, 0xcd, 0xc9,
   151  	0xc9, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4f, 0x2f, 0x4a, 0x4d, 0x2d, 0x49, 0x2d,
   152  	0x92, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcc, 0xcb,
   153  	0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0x28, 0x53, 0x92, 0xe5, 0x62, 0x0f, 0x4a,
   154  	0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54,
   155  	0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x95, 0x64, 0xb8, 0x38, 0x82, 0x52, 0x8b, 0x0b, 0xf2, 0xf3,
   156  	0x8a, 0x53, 0x85, 0x04, 0xb8, 0x98, 0x73, 0x8b, 0xd3, 0xa1, 0xd2, 0x20, 0xa6, 0x91, 0x1f, 0x17,
   157  	0x73, 0x70, 0x62, 0xa5, 0x90, 0x3b, 0x17, 0xab, 0x07, 0xc8, 0x66, 0x21, 0x01, 0x3d, 0xa8, 0xa5,
   158  	0x7a, 0x50, 0x33, 0xa5, 0x04, 0x91, 0x44, 0x20, 0xc6, 0x28, 0x49, 0x36, 0x5d, 0x7e, 0x32, 0x99,
   159  	0x49, 0x58, 0x89, 0x4f, 0x1f, 0x2a, 0xa5, 0x0f, 0x76, 0xb6, 0x15, 0xa3, 0x56, 0x12, 0x1b, 0xd8,
   160  	0x4d, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x1b, 0x54, 0xae, 0xc9, 0x00, 0x00, 0x00,
   161  }