Documentation ¶
Index ¶
- type DarwinRefClient
- func (c *DarwinRefClient) AddToc(m *darwinref.TocMap, toc string)
- func (c *DarwinRefClient) GetCancelledReason(reason int) (*darwinref.Reason, error)
- func (c *DarwinRefClient) GetCrs(crs string) (*darwinref.CrsResponse, error)
- func (c *DarwinRefClient) GetLateReason(reason int) (*darwinref.Reason, error)
- func (c *DarwinRefClient) GetStations() ([]*darwinref.Location, error)
- func (c *DarwinRefClient) GetTiploc(tpl string) (*darwinref.Location, error)
- func (c *DarwinRefClient) GetTiplocs(tpl []string) ([]*darwinref.Location, error)
- func (c *DarwinRefClient) GetTiplocsMapKeys(m map[string]interface{}) ([]*darwinref.Location, error)
- func (c *DarwinRefClient) GetToc(toc string) (*darwinref.Toc, error)
- func (c *DarwinRefClient) GetTocs() (*darwinref.TocsResponse, error)
- func (c *DarwinRefClient) GetVias(request map[string]*darwinref.ViaResolveRequest) (map[string]*darwinref.Via, error)
- func (c *DarwinRefClient) Search(query string) ([]*darwinref.SearchResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DarwinRefClient ¶
type DarwinRefClient struct { // The url prefix, e.g. "http://localhost:8080" of the remote service // Note no trailing "/" as the client will add a patch starting with "/" Url string }
A remove client to the DarwinTimetable microservice
func (*DarwinRefClient) AddToc ¶
func (c *DarwinRefClient) AddToc(m *darwinref.TocMap, toc string)
AddToc adds a Toc to a TocMap
func (*DarwinRefClient) GetCancelledReason ¶
func (c *DarwinRefClient) GetCancelledReason(reason int) (*darwinref.Reason, error)
func (*DarwinRefClient) GetCrs ¶
func (c *DarwinRefClient) GetCrs(crs string) (*darwinref.CrsResponse, error)
func (*DarwinRefClient) GetLateReason ¶
func (c *DarwinRefClient) GetLateReason(reason int) (*darwinref.Reason, error)
func (*DarwinRefClient) GetStations ¶
func (c *DarwinRefClient) GetStations() ([]*darwinref.Location, error)
GetStations returns all Location's with a CRS code
func (*DarwinRefClient) GetTiploc ¶
func (c *DarwinRefClient) GetTiploc(tpl string) (*darwinref.Location, error)
func (*DarwinRefClient) GetTiplocs ¶
func (c *DarwinRefClient) GetTiplocs(tpl []string) ([]*darwinref.Location, error)
func (*DarwinRefClient) GetTiplocsMapKeys ¶
func (c *DarwinRefClient) GetTiplocsMapKeys(m map[string]interface{}) ([]*darwinref.Location, error)
func (*DarwinRefClient) GetToc ¶
func (c *DarwinRefClient) GetToc(toc string) (*darwinref.Toc, error)
GetToc retrieve a Toc by its code
func (*DarwinRefClient) GetTocs ¶
func (c *DarwinRefClient) GetTocs() (*darwinref.TocsResponse, error)
GetTocs returns all current Train Operating Companies
func (*DarwinRefClient) GetVias ¶
func (c *DarwinRefClient) GetVias(request map[string]*darwinref.ViaResolveRequest) (map[string]*darwinref.Via, error)
GetVias makes a batch lookup of one or more ViaResolveRequest's and returns a map of matched Via's. The result will only contain those entries that were matched.
func (*DarwinRefClient) Search ¶
func (c *DarwinRefClient) Search(query string) ([]*darwinref.SearchResult, error)
Click to show internal directories.
Click to hide internal directories.