maps

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(db *badger.DB, apiKey string, directionsExpiration time.Duration) (*Client, error)

func (*Client) Directions

func (c *Client) Directions(ctx context.Context, origin *api.Point, dest *api.Point, mode maps.Mode) ([]maps.Route, error)

func (*Client) GetAddress

func (c *Client) GetAddress(point *api.Point) (*api.Address, error)

func (*Client) GetCoordinates

func (c *Client) GetCoordinates(address string) (*api.Point, error)

func (*Client) GetTimezone

func (c *Client) GetTimezone(point *api.Point) (string, error)

func (*Client) PointString

func (c *Client) PointString(point *api.Point) string

func (*Client) TravelDetail

func (c *Client) TravelDetail(ctx context.Context, here, there *api.Point, mode maps.Mode) (string, int, int, error)

type RouteCache

type RouteCache struct {
	Routes []maps.Route `json:"routes"`
}

Jump to

Keyboard shortcuts

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