internal

package
v0.0.0-...-aef6b08 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignURL

func SignURL(path string, signature []byte, q url.Values) (string, error)

SignURL signs a url with a signature. The signature is assumed to be in URL safe base64 encoding. The returned signature string is URLEncoded. See: https://developers.google.com/maps/documentation/business/webservices/auth#digital_signatures See: https://developers.google.com/maps/faq#using-google-maps-apis

Types

type DateTime

type DateTime struct {
	// Text is the time specified as a string. The time is displayed in
	// the corresponding TimeZone.
	Text string `json:"text"`

	// TimeZone is the name of the time zone in the IANA Time Zone Database. For
	// example, "America/New_York" or "Australia/Sydney".
	TimeZone string `json:"time_zone"`

	// Value is the number of seconds since midnight 01 January, 1970 UTC.
	Value int64 `json:"value"`
}

DateTime is the public API representation of a point in time.

func NewDateTime

func NewDateTime(t time.Time) *DateTime

NewDateTime builds a DateTime from the given time.Time. This will be nil if time.Time is the zero time.

func (*DateTime) Time

func (dt *DateTime) Time() time.Time

Time returns the time.Time for this DateTime.

type Duration

type Duration struct {
	// Value indicates the duration, in seconds.
	Value int64 `json:"value"`

	// Text contains a human-readable representation of the duration.
	Text string `json:"text"`
}

Duration is the public API representation of a duration.

func NewDuration

func NewDuration(d time.Duration) *Duration

NewDuration builds an internal Duration from the passed time.Duration.

func (*Duration) Duration

func (d *Duration) Duration() time.Duration

Duration returns the time.Duration for this internal Duration.

type Location

type Location struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

Location is the Roads API+ representation of a location on the Earth. It differs only in the encoded names, which are the longer forms of 'latitude' and 'longitude'.

Jump to

Keyboard shortcuts

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