geocoding

package
v0.0.0-...-2af310e Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_geocoding_proto protoreflect.FileDescriptor

Functions

func NewGeocodingEndpoints

func NewGeocodingEndpoints() []*api.Endpoint

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

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetCity

func (x *Address) GetCity() string

func (*Address) GetCountry

func (x *Address) GetCountry() string

func (*Address) GetLineOne

func (x *Address) GetLineOne() string

func (*Address) GetLineTwo

func (x *Address) GetLineTwo() string

func (*Address) GetPostcode

func (x *Address) GetPostcode() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

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

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

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

Deprecated: Use Location.ProtoReflect.Descriptor instead.

func (*Location) GetLatitude

func (x *Location) GetLatitude() float64

func (*Location) GetLongitude

func (x *Location) GetLongitude() float64

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) ProtoReflect

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

func (*Location) Reset

func (x *Location) Reset()

func (*Location) String

func (x *Location) String() string

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

Jump to

Keyboard shortcuts

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