Documentation
¶
Index ¶
- Constants
- Variables
- func AutoUpdateCheck()
- type AutocompleteResponse
- type AutocompleteResult
- type Command
- func NewAuthCheckCommand() Command
- func NewAuthTokenCommand() Command
- func NewAutocompleteCommand() Command
- func NewCacheCommand() Command
- func NewCheckUpdateCommand() Command
- func NewConfigCommand() Command
- func NewDirectionsCommand() Command
- func NewGeocodeCommand() Command
- func NewHelpCommand(usage func(io.Writer), lookup func(string) (Command, bool)) Command
- func NewPingCommand() Command
- func NewReverseCommand() Command
- func NewSearchCommand() Command
- func NewSnapshotCommand() Command
- func NewUnifiedCommand() Command
- func NewVersionCommand() Command
- type Coordinate
- type SearchResponse
- type SearchResult
Constants ¶
View Source
const ( ExitSuccess = 0 ExitRuntimeError = 1 ExitUsageError = 2 )
View Source
const TokenExpiryWarning = `` /* 231-byte string literal not displayed */
TokenExpiryWarning is shown when commands require Maps API authentication
Variables ¶
View Source
var ( ErrInvalidCoordinateFormat = errors.New("invalid coordinate format, expected lat,lng") ErrInvalidBoundingBoxFormat = errors.New("invalid bounding box format, expected north,east,south,west") ErrInvalidLatitude = errors.New("latitude must be between -90 and 90") ErrInvalidLongitude = errors.New("longitude must be between -180 and 180") ErrInvalidBoundingBox = errors.New("invalid bounding box: north must be > south and east must be > west") )
Functions ¶
func AutoUpdateCheck ¶
func AutoUpdateCheck()
AutoUpdateCheck performs an automatic background update check This is called once at startup and is non-blocking
Types ¶
type AutocompleteResponse ¶
type AutocompleteResponse struct {
Results []AutocompleteResult `json:"results"`
}
AutocompleteResponse represents the top-level response from Apple Maps /v1/searchAutocomplete
type AutocompleteResult ¶
type AutocompleteResult struct {
DisplayLines []string `json:"displayLines"`
CompletionURL string `json:"completionUrl,omitempty"`
}
AutocompleteResult represents a single autocomplete suggestion
type Command ¶
type Command struct {
Name string
UsageLine string
Summary string
Usage string
Run func(args []string, stdout, stderr io.Writer) int
}
func NewAuthCheckCommand ¶
func NewAuthCheckCommand() Command
func NewAuthTokenCommand ¶
func NewAuthTokenCommand() Command
func NewAutocompleteCommand ¶
func NewAutocompleteCommand() Command
func NewCacheCommand ¶
func NewCacheCommand() Command
func NewCheckUpdateCommand ¶
func NewCheckUpdateCommand() Command
func NewConfigCommand ¶
func NewConfigCommand() Command
func NewDirectionsCommand ¶
func NewDirectionsCommand() Command
func NewGeocodeCommand ¶
func NewGeocodeCommand() Command
func NewHelpCommand ¶
func NewPingCommand ¶
func NewPingCommand() Command
func NewReverseCommand ¶
func NewReverseCommand() Command
func NewSearchCommand ¶
func NewSearchCommand() Command
func NewSnapshotCommand ¶
func NewSnapshotCommand() Command
func NewUnifiedCommand ¶
func NewUnifiedCommand() Command
func NewVersionCommand ¶
func NewVersionCommand() Command
type Coordinate ¶
Coordinate represents a geographic coordinate
type SearchResponse ¶
type SearchResponse struct {
Results []SearchResult `json:"results"`
}
SearchResponse represents the top-level response from Apple Maps /v1/search
type SearchResult ¶
type SearchResult struct {
Name string `json:"name,omitempty"`
FormattedAddressLines []string `json:"formattedAddressLines,omitempty"`
Coordinate Coordinate `json:"coordinate"`
PoiCategory string `json:"poiCategory,omitempty"`
}
SearchResult represents an individual POI or address found in the search
Click to show internal directories.
Click to hide internal directories.