place

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_place_proto protoreflect.FileDescriptor

Functions

func NewPlaceEndpoints

func NewPlaceEndpoints() []*api.Endpoint

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetAddress

func (x *Result) GetAddress() string

func (*Result) GetIconUrl

func (x *Result) GetIconUrl() string

func (*Result) GetLocation

func (x *Result) GetLocation() string

func (*Result) GetName

func (x *Result) GetName() string

func (*Result) GetOpenNow

func (x *Result) GetOpenNow() bool

func (*Result) GetOpeningHours

func (x *Result) GetOpeningHours() []string

func (*Result) GetRating

func (x *Result) GetRating() float64

func (*Result) GetType

func (x *Result) GetType() string

func (*Result) GetTypes

func (x *Result) GetTypes() []string

func (*Result) GetVicinity

func (x *Result) GetVicinity() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

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

Jump to

Keyboard shortcuts

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