Documentation ¶
Index ¶
- Variables
- func NewGeocodingEndpoints() []*api.Endpoint
- func RegisterGeocodingHandler(s server.Server, hdlr GeocodingHandler, opts ...server.HandlerOption) error
- type Address
- func (*Address) Descriptor() ([]byte, []int)deprecated
- func (x *Address) GetCity() string
- func (x *Address) GetCountry() string
- func (x *Address) GetLineOne() string
- func (x *Address) GetLineTwo() string
- func (x *Address) GetPostcode() string
- func (*Address) ProtoMessage()
- func (x *Address) ProtoReflect() protoreflect.Message
- func (x *Address) Reset()
- func (x *Address) String() string
- type GeocodingHandler
- type GeocodingService
- type Location
- type LookupRequest
- func (*LookupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LookupRequest) GetAddress() string
- func (x *LookupRequest) GetCity() string
- func (x *LookupRequest) GetCountry() string
- func (x *LookupRequest) GetPostcode() string
- func (*LookupRequest) ProtoMessage()
- func (x *LookupRequest) ProtoReflect() protoreflect.Message
- func (x *LookupRequest) Reset()
- func (x *LookupRequest) String() string
- type LookupResponse
- func (*LookupResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LookupResponse) GetAddress() *Address
- func (x *LookupResponse) GetLocation() *Location
- func (*LookupResponse) ProtoMessage()
- func (x *LookupResponse) ProtoReflect() protoreflect.Message
- func (x *LookupResponse) Reset()
- func (x *LookupResponse) String() string
- type ReverseRequest
- func (*ReverseRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReverseRequest) GetLatitude() float64
- func (x *ReverseRequest) GetLongitude() float64
- func (*ReverseRequest) ProtoMessage()
- func (x *ReverseRequest) ProtoReflect() protoreflect.Message
- func (x *ReverseRequest) Reset()
- func (x *ReverseRequest) String() string
- type ReverseResponse
- func (*ReverseResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReverseResponse) GetAddress() *Address
- func (x *ReverseResponse) GetLocation() *Location
- func (*ReverseResponse) ProtoMessage()
- func (x *ReverseResponse) ProtoReflect() protoreflect.Message
- func (x *ReverseResponse) Reset()
- func (x *ReverseResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_geocoding_proto protoreflect.FileDescriptor
Functions ¶
func NewGeocodingEndpoints ¶
func RegisterGeocodingHandler ¶
func RegisterGeocodingHandler(s server.Server, hdlr GeocodingHandler, opts ...server.HandlerOption) error
Types ¶
type Address ¶
type Address struct { LineOne string `protobuf:"bytes,1,opt,name=line_one,json=lineOne,proto3" json:"line_one,omitempty"` LineTwo string `protobuf:"bytes,2,opt,name=line_two,json=lineTwo,proto3" json:"line_two,omitempty"` City string `protobuf:"bytes,3,opt,name=city,proto3" json:"city,omitempty"` Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` Postcode string `protobuf:"bytes,5,opt,name=postcode,proto3" json:"postcode,omitempty"` // contains filtered or unexported fields }
func (*Address) Descriptor
deprecated
func (*Address) GetCountry ¶
func (*Address) GetLineOne ¶
func (*Address) GetLineTwo ¶
func (*Address) GetPostcode ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) ProtoReflect ¶
func (x *Address) ProtoReflect() protoreflect.Message
type GeocodingHandler ¶
type GeocodingHandler interface { // Lookup an address, the result will be the normalized address which contains coordinates Lookup(context.Context, *LookupRequest, *LookupResponse) error // Reverse geocode coordinates to an address Reverse(context.Context, *ReverseRequest, *ReverseResponse) error }
type GeocodingService ¶
type GeocodingService interface { // Lookup an address, the result will be the normalized address which contains coordinates Lookup(ctx context.Context, in *LookupRequest, opts ...client.CallOption) (*LookupResponse, error) // Reverse geocode coordinates to an address Reverse(ctx context.Context, in *ReverseRequest, opts ...client.CallOption) (*ReverseResponse, error) }
func NewGeocodingService ¶
func NewGeocodingService(name string, c client.Client) GeocodingService
type Location ¶
type Location struct { Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"` // contains filtered or unexported fields }
func (*Location) Descriptor
deprecated
func (*Location) GetLatitude ¶
func (*Location) GetLongitude ¶
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
func (*Location) ProtoReflect ¶
func (x *Location) ProtoReflect() protoreflect.Message
type LookupRequest ¶
type LookupRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` Postcode string `protobuf:"bytes,3,opt,name=postcode,proto3" json:"postcode,omitempty"` Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` // contains filtered or unexported fields }
Lookup returns a geocoded address including normalized address and gps coordinates
func (*LookupRequest) Descriptor
deprecated
func (*LookupRequest) Descriptor() ([]byte, []int)
Deprecated: Use LookupRequest.ProtoReflect.Descriptor instead.
func (*LookupRequest) GetAddress ¶
func (x *LookupRequest) GetAddress() string
func (*LookupRequest) GetCity ¶
func (x *LookupRequest) GetCity() string
func (*LookupRequest) GetCountry ¶
func (x *LookupRequest) GetCountry() string
func (*LookupRequest) GetPostcode ¶
func (x *LookupRequest) GetPostcode() string
func (*LookupRequest) ProtoMessage ¶
func (*LookupRequest) ProtoMessage()
func (*LookupRequest) ProtoReflect ¶
func (x *LookupRequest) ProtoReflect() protoreflect.Message
func (*LookupRequest) Reset ¶
func (x *LookupRequest) Reset()
func (*LookupRequest) String ¶
func (x *LookupRequest) String() string
type LookupResponse ¶
type LookupResponse struct { Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Location *Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` // contains filtered or unexported fields }
func (*LookupResponse) Descriptor
deprecated
func (*LookupResponse) Descriptor() ([]byte, []int)
Deprecated: Use LookupResponse.ProtoReflect.Descriptor instead.
func (*LookupResponse) GetAddress ¶
func (x *LookupResponse) GetAddress() *Address
func (*LookupResponse) GetLocation ¶
func (x *LookupResponse) GetLocation() *Location
func (*LookupResponse) ProtoMessage ¶
func (*LookupResponse) ProtoMessage()
func (*LookupResponse) ProtoReflect ¶
func (x *LookupResponse) ProtoReflect() protoreflect.Message
func (*LookupResponse) Reset ¶
func (x *LookupResponse) Reset()
func (*LookupResponse) String ¶
func (x *LookupResponse) String() string
type ReverseRequest ¶
type ReverseRequest struct { Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"` // contains filtered or unexported fields }
Reverse lookup an address from gps coordinates
func (*ReverseRequest) Descriptor
deprecated
func (*ReverseRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReverseRequest.ProtoReflect.Descriptor instead.
func (*ReverseRequest) GetLatitude ¶
func (x *ReverseRequest) GetLatitude() float64
func (*ReverseRequest) GetLongitude ¶
func (x *ReverseRequest) GetLongitude() float64
func (*ReverseRequest) ProtoMessage ¶
func (*ReverseRequest) ProtoMessage()
func (*ReverseRequest) ProtoReflect ¶
func (x *ReverseRequest) ProtoReflect() protoreflect.Message
func (*ReverseRequest) Reset ¶
func (x *ReverseRequest) Reset()
func (*ReverseRequest) String ¶
func (x *ReverseRequest) String() string
type ReverseResponse ¶
type ReverseResponse struct { Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Location *Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` // contains filtered or unexported fields }
func (*ReverseResponse) Descriptor
deprecated
func (*ReverseResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReverseResponse.ProtoReflect.Descriptor instead.
func (*ReverseResponse) GetAddress ¶
func (x *ReverseResponse) GetAddress() *Address
func (*ReverseResponse) GetLocation ¶
func (x *ReverseResponse) GetLocation() *Location
func (*ReverseResponse) ProtoMessage ¶
func (*ReverseResponse) ProtoMessage()
func (*ReverseResponse) ProtoReflect ¶
func (x *ReverseResponse) ProtoReflect() protoreflect.Message
func (*ReverseResponse) Reset ¶
func (x *ReverseResponse) Reset()
func (*ReverseResponse) String ¶
func (x *ReverseResponse) String() string
Click to show internal directories.
Click to hide internal directories.