google

package
v0.0.0-...-93bec45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

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) Descriptor() ([]byte, []int)

func (*Bounds) GetNortheast

func (m *Bounds) GetNortheast() *Point

func (*Bounds) GetSouthwest

func (m *Bounds) GetSouthwest() *Point

func (*Bounds) ProtoMessage

func (*Bounds) ProtoMessage()

func (*Bounds) Reset

func (m *Bounds) Reset()

func (*Bounds) String

func (m *Bounds) String() string

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) Descriptor() ([]byte, []int)

func (*Geometry) GetBounds

func (m *Geometry) GetBounds() *Bounds

func (*Geometry) GetLocation

func (m *Geometry) GetLocation() *Point

func (*Geometry) GetViewport

func (m *Geometry) GetViewport() *Bounds

func (*Geometry) ProtoMessage

func (*Geometry) ProtoMessage()

func (*Geometry) Reset

func (m *Geometry) Reset()

func (*Geometry) String

func (m *Geometry) String() string

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) Descriptor() ([]byte, []int)

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) Reset

func (m *Point) Reset()

func (*Point) String

func (m *Point) String() string

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) Descriptor() ([]byte, []int)

func (*Result) GetAddressComponents

func (m *Result) GetAddressComponents() []*AddressComponent

func (*Result) GetGeometry

func (m *Result) GetGeometry() *Geometry

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL