Documentation ¶
Overview ¶
Package google is a generated protocol buffer package.
It is generated from these files:
github.com/micro/geocode-srv/proto/google/google.proto
It has these top-level messages:
Point Bounds AddressComponent Geometry Result GeocodeRequest GeocodeResponse ReverseRequest ReverseResponse
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGoogleHandler ¶
func RegisterGoogleHandler(s server.Server, hdlr GoogleHandler)
Types ¶
type AddressComponent ¶
type AddressComponent struct { LongName string `protobuf:"bytes,1,opt,name=long_name" json:"long_name,omitempty"` ShortName string `protobuf:"bytes,2,opt,name=short_name" json:"short_name,omitempty"` Types []string `protobuf:"bytes,3,rep,name=types" json:"types,omitempty"` }
func (*AddressComponent) Descriptor ¶
func (*AddressComponent) Descriptor() ([]byte, []int)
func (*AddressComponent) ProtoMessage ¶
func (*AddressComponent) ProtoMessage()
func (*AddressComponent) Reset ¶
func (m *AddressComponent) Reset()
func (*AddressComponent) String ¶
func (m *AddressComponent) String() string
type Bounds ¶
type Bounds struct { Northeast *Point `protobuf:"bytes,1,opt,name=northeast" json:"northeast,omitempty"` Southwest *Point `protobuf:"bytes,2,opt,name=southwest" json:"southwest,omitempty"` }
func (*Bounds) Descriptor ¶
func (*Bounds) GetNortheast ¶
func (*Bounds) GetSouthwest ¶
func (*Bounds) ProtoMessage ¶
func (*Bounds) ProtoMessage()
type GeocodeRequest ¶
type GeocodeRequest struct { Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` Components map[string]string `` /* 140-byte string literal not displayed */ Bounds *Bounds `protobuf:"bytes,3,opt,name=bounds" json:"bounds,omitempty"` Language string `protobuf:"bytes,4,opt,name=language" json:"language,omitempty"` Region string `protobuf:"bytes,5,opt,name=region" json:"region,omitempty"` }
func (*GeocodeRequest) Descriptor ¶
func (*GeocodeRequest) Descriptor() ([]byte, []int)
func (*GeocodeRequest) GetBounds ¶
func (m *GeocodeRequest) GetBounds() *Bounds
func (*GeocodeRequest) GetComponents ¶
func (m *GeocodeRequest) GetComponents() map[string]string
func (*GeocodeRequest) ProtoMessage ¶
func (*GeocodeRequest) ProtoMessage()
func (*GeocodeRequest) Reset ¶
func (m *GeocodeRequest) Reset()
func (*GeocodeRequest) String ¶
func (m *GeocodeRequest) String() string
type GeocodeResponse ¶
type GeocodeResponse struct { Results []*Result `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` Status string `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"` }
func (*GeocodeResponse) Descriptor ¶
func (*GeocodeResponse) Descriptor() ([]byte, []int)
func (*GeocodeResponse) GetResults ¶
func (m *GeocodeResponse) GetResults() []*Result
func (*GeocodeResponse) ProtoMessage ¶
func (*GeocodeResponse) ProtoMessage()
func (*GeocodeResponse) Reset ¶
func (m *GeocodeResponse) Reset()
func (*GeocodeResponse) String ¶
func (m *GeocodeResponse) String() string
type Geometry ¶
type Geometry struct { Bounds *Bounds `protobuf:"bytes,1,opt,name=bounds" json:"bounds,omitempty"` Location *Point `protobuf:"bytes,2,opt,name=location" json:"location,omitempty"` LocationType string `protobuf:"bytes,3,opt,name=location_type" json:"location_type,omitempty"` Viewport *Bounds `protobuf:"bytes,4,opt,name=viewport" json:"viewport,omitempty"` PartialMatch bool `protobuf:"varint,5,opt,name=partial_match" json:"partial_match,omitempty"` PlaceId string `protobuf:"bytes,6,opt,name=place_id" json:"place_id,omitempty"` Types []string `protobuf:"bytes,7,rep,name=types" json:"types,omitempty"` }
func (*Geometry) Descriptor ¶
func (*Geometry) GetLocation ¶
func (*Geometry) GetViewport ¶
func (*Geometry) ProtoMessage ¶
func (*Geometry) ProtoMessage()
type Google ¶
type Google struct {
GoogleHandler
}
func (*Google) Geocode ¶
func (h *Google) Geocode(ctx context.Context, in *GeocodeRequest, out *GeocodeResponse) error
func (*Google) ReverseGeocode ¶
func (h *Google) ReverseGeocode(ctx context.Context, in *ReverseRequest, out *ReverseResponse) error
type GoogleClient ¶
type GoogleClient interface { Geocode(ctx context.Context, in *GeocodeRequest, opts ...client.CallOption) (*GeocodeResponse, error) ReverseGeocode(ctx context.Context, in *ReverseRequest, opts ...client.CallOption) (*ReverseResponse, error) }
func NewGoogleClient ¶
func NewGoogleClient(serviceName string, c client.Client) GoogleClient
type GoogleHandler ¶
type GoogleHandler interface { Geocode(context.Context, *GeocodeRequest, *GeocodeResponse) error ReverseGeocode(context.Context, *ReverseRequest, *ReverseResponse) error }
type Point ¶
type Point struct { Lat float64 `protobuf:"fixed64,1,opt,name=lat" json:"lat,omitempty"` Lng float64 `protobuf:"fixed64,2,opt,name=lng" json:"lng,omitempty"` }
func (*Point) Descriptor ¶
func (*Point) ProtoMessage ¶
func (*Point) ProtoMessage()
type Result ¶
type Result struct { AddressComponents []*AddressComponent `protobuf:"bytes,1,rep,name=address_components" json:"address_components,omitempty"` FormattedAddress string `protobuf:"bytes,2,opt,name=formatted_address" json:"formatted_address,omitempty"` Geometry *Geometry `protobuf:"bytes,3,opt,name=geometry" json:"geometry,omitempty"` }
func (*Result) Descriptor ¶
func (*Result) GetAddressComponents ¶
func (m *Result) GetAddressComponents() []*AddressComponent
func (*Result) GetGeometry ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
type ReverseRequest ¶
type ReverseRequest struct { Latlng *Point `protobuf:"bytes,1,opt,name=latlng" json:"latlng,omitempty"` PlaceId string `protobuf:"bytes,2,opt,name=place_id" json:"place_id,omitempty"` PlaceID string `protobuf:"bytes,3,opt,name=placeID" json:"placeID,omitempty"` Language string `protobuf:"bytes,4,opt,name=language" json:"language,omitempty"` ResultType []string `protobuf:"bytes,5,rep,name=result_type" json:"result_type,omitempty"` LocationType []string `protobuf:"bytes,6,rep,name=location_type" json:"location_type,omitempty"` }
func (*ReverseRequest) Descriptor ¶
func (*ReverseRequest) Descriptor() ([]byte, []int)
func (*ReverseRequest) GetLatlng ¶
func (m *ReverseRequest) GetLatlng() *Point
func (*ReverseRequest) ProtoMessage ¶
func (*ReverseRequest) ProtoMessage()
func (*ReverseRequest) Reset ¶
func (m *ReverseRequest) Reset()
func (*ReverseRequest) String ¶
func (m *ReverseRequest) String() string
type ReverseResponse ¶
type ReverseResponse struct { Results []*Result `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` Status string `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"` }
func (*ReverseResponse) Descriptor ¶
func (*ReverseResponse) Descriptor() ([]byte, []int)
func (*ReverseResponse) GetResults ¶
func (m *ReverseResponse) GetResults() []*Result
func (*ReverseResponse) ProtoMessage ¶
func (*ReverseResponse) ProtoMessage()
func (*ReverseResponse) Reset ¶
func (m *ReverseResponse) Reset()
func (*ReverseResponse) String ¶
func (m *ReverseResponse) String() string
Click to show internal directories.
Click to hide internal directories.