client

package
v0.0.0-...-fd78167 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

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)

Jump to

Keyboard shortcuts

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