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

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: github.com/micro/go-micro/examples/booking/api/hotel/proto/hotel.proto
     3  
     4  /*
     5  Package hotel is a generated protocol buffer package.
     6  
     7  It is generated from these files:
     8  	github.com/micro/go-micro/examples/booking/api/hotel/proto/hotel.proto
     9  
    10  It has these top-level messages:
    11  	Request
    12  	Response
    13  */
    14  package hotel
    15  
    16  import proto "github.com/golang/protobuf/proto"
    17  import fmt "fmt"
    18  import math "math"
    19  import profile "github.com/micro/go-micro/examples/booking/srv/profile/proto"
    20  import rate "github.com/micro/go-micro/examples/booking/srv/rate/proto"
    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 Request struct {
    39  	InDate  string `protobuf:"bytes,1,opt,name=inDate" json:"inDate,omitempty"`
    40  	OutDate string `protobuf:"bytes,2,opt,name=outDate" json:"outDate,omitempty"`
    41  }
    42  
    43  func (m *Request) Reset()                    { *m = Request{} }
    44  func (m *Request) String() string            { return proto.CompactTextString(m) }
    45  func (*Request) ProtoMessage()               {}
    46  func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    47  
    48  func (m *Request) GetInDate() string {
    49  	if m != nil {
    50  		return m.InDate
    51  	}
    52  	return ""
    53  }
    54  
    55  func (m *Request) GetOutDate() string {
    56  	if m != nil {
    57  		return m.OutDate
    58  	}
    59  	return ""
    60  }
    61  
    62  type Response struct {
    63  	Hotels    []*profile.Hotel `protobuf:"bytes,1,rep,name=hotels" json:"hotels,omitempty"`
    64  	RatePlans []*rate.RatePlan `protobuf:"bytes,2,rep,name=ratePlans" json:"ratePlans,omitempty"`
    65  }
    66  
    67  func (m *Response) Reset()                    { *m = Response{} }
    68  func (m *Response) String() string            { return proto.CompactTextString(m) }
    69  func (*Response) ProtoMessage()               {}
    70  func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
    71  
    72  func (m *Response) GetHotels() []*profile.Hotel {
    73  	if m != nil {
    74  		return m.Hotels
    75  	}
    76  	return nil
    77  }
    78  
    79  func (m *Response) GetRatePlans() []*rate.RatePlan {
    80  	if m != nil {
    81  		return m.RatePlans
    82  	}
    83  	return nil
    84  }
    85  
    86  func init() {
    87  	proto.RegisterType((*Request)(nil), "hotel.Request")
    88  	proto.RegisterType((*Response)(nil), "hotel.Response")
    89  }
    90  
    91  // Reference imports to suppress errors if they are not otherwise used.
    92  var _ context.Context
    93  var _ grpc.ClientConn
    94  
    95  // This is a compile-time assertion to ensure that this generated file
    96  // is compatible with the grpc package it is being compiled against.
    97  const _ = grpc.SupportPackageIsVersion4
    98  
    99  // Client API for Hotel service
   100  
   101  type HotelClient interface {
   102  	Rates(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
   103  }
   104  
   105  type hotelClient struct {
   106  	cc *grpc.ClientConn
   107  }
   108  
   109  func NewHotelClient(cc *grpc.ClientConn) HotelClient {
   110  	return &hotelClient{cc}
   111  }
   112  
   113  func (c *hotelClient) Rates(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
   114  	out := new(Response)
   115  	err := grpc.Invoke(ctx, "/hotel.Hotel/Rates", in, out, c.cc, opts...)
   116  	if err != nil {
   117  		return nil, err
   118  	}
   119  	return out, nil
   120  }
   121  
   122  // Server API for Hotel service
   123  
   124  type HotelServer interface {
   125  	Rates(context.Context, *Request) (*Response, error)
   126  }
   127  
   128  func RegisterHotelServer(s *grpc.Server, srv HotelServer) {
   129  	s.RegisterService(&_Hotel_serviceDesc, srv)
   130  }
   131  
   132  func _Hotel_Rates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   133  	in := new(Request)
   134  	if err := dec(in); err != nil {
   135  		return nil, err
   136  	}
   137  	if interceptor == nil {
   138  		return srv.(HotelServer).Rates(ctx, in)
   139  	}
   140  	info := &grpc.UnaryServerInfo{
   141  		Server:     srv,
   142  		FullMethod: "/hotel.Hotel/Rates",
   143  	}
   144  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   145  		return srv.(HotelServer).Rates(ctx, req.(*Request))
   146  	}
   147  	return interceptor(ctx, in, info, handler)
   148  }
   149  
   150  var _Hotel_serviceDesc = grpc.ServiceDesc{
   151  	ServiceName: "hotel.Hotel",
   152  	HandlerType: (*HotelServer)(nil),
   153  	Methods: []grpc.MethodDesc{
   154  		{
   155  			MethodName: "Rates",
   156  			Handler:    _Hotel_Rates_Handler,
   157  		},
   158  	},
   159  	Streams:  []grpc.StreamDesc{},
   160  	Metadata: "github.com/micro/go-micro/examples/booking/api/hotel/proto/hotel.proto",
   161  }
   162  
   163  func init() {
   164  	proto.RegisterFile("github.com/micro/go-micro/examples/booking/api/hotel/proto/hotel.proto", fileDescriptor0)
   165  }
   166  
   167  var fileDescriptor0 = []byte{
   168  	// 246 bytes of a gzipped FileDescriptorProto
   169  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x50, 0xc1, 0x4a, 0xc3, 0x40,
   170  	0x10, 0x35, 0x95, 0xa4, 0x76, 0x84, 0x0a, 0x7b, 0x90, 0x90, 0x53, 0xc9, 0x41, 0x8a, 0x48, 0x16,
   171  	0xda, 0x63, 0xf1, 0x20, 0x78, 0xf0, 0x28, 0xfb, 0x05, 0x6e, 0xca, 0xd8, 0x2c, 0x26, 0x99, 0x98,
   172  	0xdd, 0x88, 0x9f, 0x2f, 0x3b, 0xbb, 0xd1, 0xa3, 0xbd, 0xbd, 0x37, 0x6f, 0xde, 0xdb, 0x37, 0x0b,
   173  	0x8f, 0x27, 0xe3, 0x9a, 0xa9, 0xae, 0x8e, 0xd4, 0xc9, 0xce, 0x1c, 0x47, 0x92, 0xf8, 0xad, 0xbb,
   174  	0xa1, 0x45, 0x2b, 0x6b, 0xa2, 0x0f, 0xd3, 0x9f, 0xa4, 0x1e, 0x8c, 0x6c, 0xc8, 0x61, 0x2b, 0x87,
   175  	0x91, 0x1c, 0x05, 0x5c, 0x31, 0x16, 0x29, 0x93, 0xe2, 0xe9, 0xff, 0x14, 0x3b, 0x7e, 0x79, 0xff,
   176  	0xbb, 0x69, 0x31, 0xe6, 0x44, 0x16, 0x92, 0x8a, 0xc3, 0x79, 0x11, 0xa3, 0x76, 0xb3, 0xdf, 0xc3,
   177  	0x60, 0x2e, 0x0f, 0xb0, 0x54, 0xf8, 0x39, 0xa1, 0x75, 0xe2, 0x16, 0x32, 0xd3, 0x3f, 0x6b, 0x87,
   178  	0x79, 0xb2, 0x49, 0xb6, 0x2b, 0x15, 0x99, 0xc8, 0x61, 0x49, 0x93, 0x63, 0x61, 0xc1, 0xc2, 0x4c,
   179  	0xcb, 0x37, 0xb8, 0x52, 0x68, 0x07, 0xea, 0x2d, 0x8a, 0x3b, 0xc8, 0xf8, 0x22, 0x9b, 0x27, 0x9b,
   180  	0xcb, 0xed, 0xf5, 0x6e, 0x5d, 0xcd, 0x2d, 0x5f, 0xfc, 0x58, 0x45, 0x55, 0x3c, 0xc0, 0xca, 0x3f,
   181  	0xff, 0xda, 0xea, 0xde, 0xe6, 0x8b, 0xb8, 0xca, 0x85, 0x54, 0x1c, 0xab, 0xbf, 0x85, 0xdd, 0x1e,
   182  	0x52, 0xb6, 0x8b, 0x7b, 0x48, 0xbd, 0x6e, 0xc5, 0xba, 0x0a, 0xbf, 0x18, 0x5b, 0x17, 0x37, 0xbf,
   183  	0x3c, 0x14, 0x29, 0x2f, 0xea, 0x8c, 0x4f, 0xdb, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x11, 0xa3,
   184  	0x5e, 0xbd, 0xa2, 0x01, 0x00, 0x00,
   185  }