Documentation
¶
Index ¶
- Variables
- func NewPlaceEndpoints() []*api.Endpoint
- func RegisterPlaceHandler(s server.Server, hdlr PlaceHandler, opts ...server.HandlerOption) error
- type AutocompleteRequest
- type AutocompleteResponse
- type NearbyRequest
- func (*NearbyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NearbyRequest) GetKeyword() string
- func (x *NearbyRequest) GetLocation() string
- func (x *NearbyRequest) GetName() string
- func (x *NearbyRequest) GetOpenNow() bool
- func (x *NearbyRequest) GetRadius() uint32
- func (x *NearbyRequest) GetType() string
- func (*NearbyRequest) ProtoMessage()
- func (x *NearbyRequest) ProtoReflect() protoreflect.Message
- func (x *NearbyRequest) Reset()
- func (x *NearbyRequest) String() string
- type NearbyResponse
- type PlaceHandler
- type PlaceService
- type Result
- func (*Result) Descriptor() ([]byte, []int)deprecated
- func (x *Result) GetAddress() string
- func (x *Result) GetIconUrl() string
- func (x *Result) GetLocation() string
- func (x *Result) GetName() string
- func (x *Result) GetOpenNow() bool
- func (x *Result) GetOpeningHours() []string
- func (x *Result) GetRating() float64
- func (x *Result) GetType() string
- func (x *Result) GetTypes() []string
- func (x *Result) GetVicinity() string
- func (*Result) ProtoMessage()
- func (x *Result) ProtoReflect() protoreflect.Message
- func (x *Result) Reset()
- func (x *Result) String() string
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRequest) GetLocation() string
- func (x *SearchRequest) GetOpenNow() bool
- func (x *SearchRequest) GetQuery() string
- func (x *SearchRequest) GetRadius() uint32
- func (x *SearchRequest) GetType() string
- func (*SearchRequest) ProtoMessage()
- func (x *SearchRequest) ProtoReflect() protoreflect.Message
- func (x *SearchRequest) Reset()
- func (x *SearchRequest) String() string
- type SearchResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_place_proto protoreflect.FileDescriptor
Functions ¶
func NewPlaceEndpoints ¶
func RegisterPlaceHandler ¶
func RegisterPlaceHandler(s server.Server, hdlr PlaceHandler, opts ...server.HandlerOption) error
Types ¶
type AutocompleteRequest ¶
type AutocompleteRequest struct {
// contains filtered or unexported fields
}
Autocomplete queries (coming soon)
func (*AutocompleteRequest) Descriptor
deprecated
func (*AutocompleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use AutocompleteRequest.ProtoReflect.Descriptor instead.
func (*AutocompleteRequest) ProtoMessage ¶
func (*AutocompleteRequest) ProtoMessage()
func (*AutocompleteRequest) ProtoReflect ¶
func (x *AutocompleteRequest) ProtoReflect() protoreflect.Message
func (*AutocompleteRequest) Reset ¶
func (x *AutocompleteRequest) Reset()
func (*AutocompleteRequest) String ¶
func (x *AutocompleteRequest) String() string
type AutocompleteResponse ¶
type AutocompleteResponse struct {
// contains filtered or unexported fields
}
func (*AutocompleteResponse) Descriptor
deprecated
func (*AutocompleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use AutocompleteResponse.ProtoReflect.Descriptor instead.
func (*AutocompleteResponse) ProtoMessage ¶
func (*AutocompleteResponse) ProtoMessage()
func (*AutocompleteResponse) ProtoReflect ¶
func (x *AutocompleteResponse) ProtoReflect() protoreflect.Message
func (*AutocompleteResponse) Reset ¶
func (x *AutocompleteResponse) Reset()
func (*AutocompleteResponse) String ¶
func (x *AutocompleteResponse) String() string
type NearbyRequest ¶
type NearbyRequest struct {
// specify the location by lat,lng e.g -33.8670522,-151.1957362
Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
// radius in meters within which to search
Radius uint32 `protobuf:"varint,2,opt,name=radius,proto3" json:"radius,omitempty"`
// Keyword to include in the search
Keyword string `protobuf:"bytes,3,opt,name=keyword,proto3" json:"keyword,omitempty"`
// Name of the place to search for
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
// Whether the place is open now
OpenNow bool `protobuf:"varint,5,opt,name=open_now,json=openNow,proto3" json:"open_now,omitempty"`
// Type of place. https://developers.google.com/maps/documentation/places/web-service/supported_types
Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
// contains filtered or unexported fields
}
Find places nearby using a location
func (*NearbyRequest) Descriptor
deprecated
func (*NearbyRequest) Descriptor() ([]byte, []int)
Deprecated: Use NearbyRequest.ProtoReflect.Descriptor instead.
func (*NearbyRequest) GetKeyword ¶
func (x *NearbyRequest) GetKeyword() string
func (*NearbyRequest) GetLocation ¶
func (x *NearbyRequest) GetLocation() string
func (*NearbyRequest) GetName ¶
func (x *NearbyRequest) GetName() string
func (*NearbyRequest) GetOpenNow ¶
func (x *NearbyRequest) GetOpenNow() bool
func (*NearbyRequest) GetRadius ¶
func (x *NearbyRequest) GetRadius() uint32
func (*NearbyRequest) GetType ¶
func (x *NearbyRequest) GetType() string
func (*NearbyRequest) ProtoMessage ¶
func (*NearbyRequest) ProtoMessage()
func (*NearbyRequest) ProtoReflect ¶
func (x *NearbyRequest) ProtoReflect() protoreflect.Message
func (*NearbyRequest) Reset ¶
func (x *NearbyRequest) Reset()
func (*NearbyRequest) String ¶
func (x *NearbyRequest) String() string
type NearbyResponse ¶
type NearbyResponse struct {
Results []*Result `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
// contains filtered or unexported fields
}
func (*NearbyResponse) Descriptor
deprecated
func (*NearbyResponse) Descriptor() ([]byte, []int)
Deprecated: Use NearbyResponse.ProtoReflect.Descriptor instead.
func (*NearbyResponse) GetResults ¶
func (x *NearbyResponse) GetResults() []*Result
func (*NearbyResponse) ProtoMessage ¶
func (*NearbyResponse) ProtoMessage()
func (*NearbyResponse) ProtoReflect ¶
func (x *NearbyResponse) ProtoReflect() protoreflect.Message
func (*NearbyResponse) Reset ¶
func (x *NearbyResponse) Reset()
func (*NearbyResponse) String ¶
func (x *NearbyResponse) String() string
type PlaceHandler ¶
type PlaceHandler interface {
Nearby(context.Context, *NearbyRequest, *NearbyResponse) error
Search(context.Context, *SearchRequest, *SearchResponse) error
}
type PlaceService ¶
type PlaceService interface {
Nearby(ctx context.Context, in *NearbyRequest, opts ...client.CallOption) (*NearbyResponse, error)
Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
}
func NewPlaceService ¶
func NewPlaceService(name string, c client.Client) PlaceService
type Result ¶
type Result struct {
// name of the place
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// address of place
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
// lat/lng of place
Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"`
// type of location
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
// url of an icon
IconUrl string `protobuf:"bytes,5,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"`
// rating from 1.0 to 5.0
Rating float64 `protobuf:"fixed64,6,opt,name=rating,proto3" json:"rating,omitempty"`
// simplified address
Vicinity string `protobuf:"bytes,7,opt,name=vicinity,proto3" json:"vicinity,omitempty"`
// open now
OpenNow bool `protobuf:"varint,8,opt,name=open_now,json=openNow,proto3" json:"open_now,omitempty"`
// opening hours
OpeningHours []string `protobuf:"bytes,9,rep,name=opening_hours,json=openingHours,proto3" json:"opening_hours,omitempty"`
// feature types
Types []string `protobuf:"bytes,10,rep,name=types,proto3" json:"types,omitempty"`
// contains filtered or unexported fields
}
func (*Result) Descriptor
deprecated
func (*Result) GetAddress ¶
func (*Result) GetIconUrl ¶
func (*Result) GetLocation ¶
func (*Result) GetOpenNow ¶
func (*Result) GetOpeningHours ¶
func (*Result) GetVicinity ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type SearchRequest ¶
type SearchRequest struct {
// the text string on which to search, for example: "restaurant"
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
// the location by lat,lng e.g -33.8670522,-151.1957362
Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
// radius in meters within which to search
Radius uint32 `protobuf:"varint,3,opt,name=radius,proto3" json:"radius,omitempty"`
// Whether the place is open now
OpenNow bool `protobuf:"varint,4,opt,name=open_now,json=openNow,proto3" json:"open_now,omitempty"`
// Type of place. https://developers.google.com/maps/documentation/places/web-service/supported_types
Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
// contains filtered or unexported fields
}
Search for places by text query
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetLocation ¶
func (x *SearchRequest) GetLocation() string
func (*SearchRequest) GetOpenNow ¶
func (x *SearchRequest) GetOpenNow() bool
func (*SearchRequest) GetQuery ¶
func (x *SearchRequest) GetQuery() string
func (*SearchRequest) GetRadius ¶
func (x *SearchRequest) GetRadius() uint32
func (*SearchRequest) GetType ¶
func (x *SearchRequest) GetType() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
type SearchResponse ¶
type SearchResponse struct {
Results []*Result `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
// contains filtered or unexported fields
}
func (*SearchResponse) Descriptor
deprecated
func (*SearchResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.
func (*SearchResponse) GetResults ¶
func (x *SearchResponse) GetResults() []*Result
func (*SearchResponse) ProtoMessage ¶
func (*SearchResponse) ProtoMessage()
func (*SearchResponse) ProtoReflect ¶
func (x *SearchResponse) ProtoReflect() protoreflect.Message
func (*SearchResponse) Reset ¶
func (x *SearchResponse) Reset()
func (*SearchResponse) String ¶
func (x *SearchResponse) String() string
Click to show internal directories.
Click to hide internal directories.