septa

package
v0.0.0-...-1d9e18e Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2015 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package septa implements a simple read-only SEPTA file system, septafs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BusTrolley

type BusTrolley struct {
	Lat         float64
	Lng         float64
	LastRead    int
	Direction   string `json:"Direction"`
	Destination string `json:"destination"`
}

BusTrolley represents the position of a bus or trolley.

func (BusTrolley) String

func (bt BusTrolley) String() (s string)

func (*BusTrolley) UnmarshalJSON

func (bt *BusTrolley) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface.

type FS

type FS struct{}

FS implements the SEPTA file system, septafs.

func (FS) Root

func (FS) Root() (n fs.Node, err fuse.Error)

Root returns a rootDir as the file system root.

type HTTPClient

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

HTTPClient implements SEPTA API functionality.

func (HTTPClient) RouteAlerts

func (c HTTPClient) RouteAlerts(route string) (rts []RouteAlert, err error)

RouteAlerts returns alerts for the given route.

func (HTTPClient) TransitView

func (c HTTPClient) TransitView(route string) (bts []BusTrolley, err error)

TransitView returns the current transit status for the given route.

type RouteAlert

type RouteAlert struct {
	RouteName       string `json:"route_name"`
	CurrentMessage  string `json:"current_message"`
	AdvisoryMessage string `json:"advisory_message"`
}

RouteAlert represents an alert on a SEPTA route.

Jump to

Keyboard shortcuts

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