github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/booking/srv/geo/proto/geo.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: github.com/micro/go-micro/examples/booking/srv/geo/proto/geo.proto 3 4 /* 5 Package geo is a generated protocol buffer package. 6 7 It is generated from these files: 8 github.com/micro/go-micro/examples/booking/srv/geo/proto/geo.proto 9 10 It has these top-level messages: 11 Request 12 Result 13 */ 14 package geo 15 16 import proto "github.com/golang/protobuf/proto" 17 import fmt "fmt" 18 import math "math" 19 20 import ( 21 context "golang.org/x/net/context" 22 grpc "google.golang.org/grpc" 23 ) 24 25 // Reference imports to suppress errors if they are not otherwise used. 26 var _ = proto.Marshal 27 var _ = fmt.Errorf 28 var _ = math.Inf 29 30 // This is a compile-time assertion to ensure that this generated file 31 // is compatible with the proto package it is being compiled against. 32 // A compilation error at this line likely means your copy of the 33 // proto package needs to be updated. 34 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 35 36 // The latitude and longitude of the current location. 37 type Request struct { 38 Lat float32 `protobuf:"fixed32,1,opt,name=lat" json:"lat,omitempty"` 39 Lon float32 `protobuf:"fixed32,2,opt,name=lon" json:"lon,omitempty"` 40 } 41 42 func (m *Request) Reset() { *m = Request{} } 43 func (m *Request) String() string { return proto.CompactTextString(m) } 44 func (*Request) ProtoMessage() {} 45 func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } 46 47 func (m *Request) GetLat() float32 { 48 if m != nil { 49 return m.Lat 50 } 51 return 0 52 } 53 54 func (m *Request) GetLon() float32 { 55 if m != nil { 56 return m.Lon 57 } 58 return 0 59 } 60 61 type Result struct { 62 HotelIds []string `protobuf:"bytes,1,rep,name=hotelIds" json:"hotelIds,omitempty"` 63 } 64 65 func (m *Result) Reset() { *m = Result{} } 66 func (m *Result) String() string { return proto.CompactTextString(m) } 67 func (*Result) ProtoMessage() {} 68 func (*Result) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } 69 70 func (m *Result) GetHotelIds() []string { 71 if m != nil { 72 return m.HotelIds 73 } 74 return nil 75 } 76 77 func init() { 78 proto.RegisterType((*Request)(nil), "geo.Request") 79 proto.RegisterType((*Result)(nil), "geo.Result") 80 } 81 82 // Reference imports to suppress errors if they are not otherwise used. 83 var _ context.Context 84 var _ grpc.ClientConn 85 86 // This is a compile-time assertion to ensure that this generated file 87 // is compatible with the grpc package it is being compiled against. 88 const _ = grpc.SupportPackageIsVersion4 89 90 // Client API for Geo service 91 92 type GeoClient interface { 93 // Finds the hotels contained nearby the current lat/lon. 94 Nearby(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) 95 } 96 97 type geoClient struct { 98 cc *grpc.ClientConn 99 } 100 101 func NewGeoClient(cc *grpc.ClientConn) GeoClient { 102 return &geoClient{cc} 103 } 104 105 func (c *geoClient) Nearby(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) { 106 out := new(Result) 107 err := grpc.Invoke(ctx, "/geo.Geo/Nearby", in, out, c.cc, opts...) 108 if err != nil { 109 return nil, err 110 } 111 return out, nil 112 } 113 114 // Server API for Geo service 115 116 type GeoServer interface { 117 // Finds the hotels contained nearby the current lat/lon. 118 Nearby(context.Context, *Request) (*Result, error) 119 } 120 121 func RegisterGeoServer(s *grpc.Server, srv GeoServer) { 122 s.RegisterService(&_Geo_serviceDesc, srv) 123 } 124 125 func _Geo_Nearby_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 126 in := new(Request) 127 if err := dec(in); err != nil { 128 return nil, err 129 } 130 if interceptor == nil { 131 return srv.(GeoServer).Nearby(ctx, in) 132 } 133 info := &grpc.UnaryServerInfo{ 134 Server: srv, 135 FullMethod: "/geo.Geo/Nearby", 136 } 137 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 138 return srv.(GeoServer).Nearby(ctx, req.(*Request)) 139 } 140 return interceptor(ctx, in, info, handler) 141 } 142 143 var _Geo_serviceDesc = grpc.ServiceDesc{ 144 ServiceName: "geo.Geo", 145 HandlerType: (*GeoServer)(nil), 146 Methods: []grpc.MethodDesc{ 147 { 148 MethodName: "Nearby", 149 Handler: _Geo_Nearby_Handler, 150 }, 151 }, 152 Streams: []grpc.StreamDesc{}, 153 Metadata: "github.com/micro/go-micro/examples/booking/srv/geo/proto/geo.proto", 154 } 155 156 func init() { 157 proto.RegisterFile("github.com/micro/go-micro/examples/booking/srv/geo/proto/geo.proto", fileDescriptor0) 158 } 159 160 var fileDescriptor0 = []byte{ 161 // 184 bytes of a gzipped FileDescriptorProto 162 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x8e, 0xb1, 0xae, 0x82, 0x30, 163 0x14, 0x86, 0x03, 0x4d, 0xb8, 0xf7, 0x9e, 0xeb, 0x60, 0x3a, 0x11, 0x26, 0x82, 0x0e, 0xc4, 0x44, 164 0x9a, 0xe8, 0xe4, 0x13, 0x18, 0x17, 0x87, 0xbe, 0x01, 0xc5, 0x93, 0x42, 0x2c, 0x1c, 0x6c, 0x8b, 165 0xd1, 0xb7, 0x37, 0x25, 0xc4, 0xed, 0xfb, 0xbf, 0xe1, 0x7c, 0x07, 0x4e, 0xba, 0xf3, 0xed, 0xa4, 166 0xaa, 0x86, 0x7a, 0xd1, 0x77, 0x8d, 0x25, 0x81, 0xaf, 0xba, 0x1f, 0x0d, 0x3a, 0xa1, 0x88, 0xee, 167 0xdd, 0xa0, 0x85, 0xb3, 0x4f, 0xa1, 0x91, 0xc4, 0x68, 0xc9, 0x53, 0xa0, 0x6a, 0x26, 0xce, 0x34, 168 0x52, 0xb1, 0x87, 0x1f, 0x89, 0x8f, 0x09, 0x9d, 0xe7, 0x6b, 0x60, 0xa6, 0xf6, 0x69, 0x94, 0x47, 169 0x65, 0x2c, 0x03, 0xce, 0x86, 0x86, 0x34, 0x5e, 0x0c, 0x0d, 0xc5, 0x16, 0x12, 0x89, 0x6e, 0x32, 170 0x9e, 0x67, 0xf0, 0xdb, 0x92, 0x47, 0x73, 0xb9, 0xb9, 0x34, 0xca, 0x59, 0xf9, 0x27, 0xbf, 0xfb, 171 0xb0, 0x03, 0x76, 0x46, 0xe2, 0x1b, 0x48, 0xae, 0x58, 0x5b, 0xf5, 0xe6, 0xab, 0x2a, 0x64, 0x97, 172 0x50, 0xf6, 0xbf, 0xac, 0x70, 0x47, 0x25, 0xf3, 0x33, 0xc7, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 173 0x39, 0xe5, 0x14, 0x38, 0xc9, 0x00, 0x00, 0x00, 174 }