geo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: Apache-2.0 Imports: 8 Imported by: 0 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

Overview

Package geo is a generated protocol buffer package.

It is generated from these files:

github.com/micro/examples/booking/srv/geo/proto/geo.proto

It has these top-level messages:

Request
Result

Package geo is a generated protocol buffer package.

It is generated from these files:

github.com/micro/examples/booking/srv/geo/proto/geo.proto

It has these top-level messages:

Request
Result

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGeoHandler

func RegisterGeoHandler(s server.Server, hdlr GeoHandler, opts ...server.HandlerOption)

func RegisterGeoServer

func RegisterGeoServer(s *grpc.Server, srv GeoServer)

Types

type GeoClient

type GeoClient interface {
	// Finds the hotels contained nearby the current lat/lon.
	Nearby(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error)
}

func NewGeoClient

func NewGeoClient(cc *grpc.ClientConn) GeoClient

type GeoHandler

type GeoHandler interface {
	// Finds the hotels contained nearby the current lat/lon.
	Nearby(context.Context, *Request, *Result) error
}

type GeoServer

type GeoServer interface {
	// Finds the hotels contained nearby the current lat/lon.
	Nearby(context.Context, *Request) (*Result, error)
}

type GeoService

type GeoService interface {
	// Finds the hotels contained nearby the current lat/lon.
	Nearby(ctx context.Context, in *Request, opts ...client.CallOption) (*Result, error)
}

func NewGeoService

func NewGeoService(serviceName string, c client.Client) GeoService

type Request

type Request struct {
	Lat float32 `protobuf:"fixed32,1,opt,name=lat" json:"lat,omitempty"`
	Lon float32 `protobuf:"fixed32,2,opt,name=lon" json:"lon,omitempty"`
}

The latitude and longitude of the current location.

func (*Request) Descriptor

func (*Request) Descriptor() ([]byte, []int)

func (*Request) GetLat

func (m *Request) GetLat() float32

func (*Request) GetLon

func (m *Request) GetLon() float32

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type Result

type Result struct {
	HotelIds []string `protobuf:"bytes,1,rep,name=hotelIds" json:"hotelIds,omitempty"`
}

func (*Result) Descriptor

func (*Result) Descriptor() ([]byte, []int)

func (*Result) GetHotelIds

func (m *Result) GetHotelIds() []string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

Jump to

Keyboard shortcuts

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