Documentation
¶
Index ¶
Constants ¶
View Source
const DateFormat = "060102"
Variables ¶
This section is empty.
Functions ¶
func GetLogLevel ¶
GetLogLevel checks if the env variable is set and parses the log level from it. It returns the parsed log level and a boolean indicating that it was successfully parsed. 'false' means that the default log level was returned.
Types ¶
type ClientCredentials ¶ added in v1.1.1
type Connection ¶ added in v1.0.1
type EnvVars ¶
type EnvVars struct {
ClientId string `env:"TB_CLIENT_ID,required"`
ClientSecret string `env:"TB_CLIENT_SECRET,required"`
EvaNr string `env:"TB_EVA_NR,required"`
NextStation string `env:"TB_NEXT_STATION,required"`
Port int `env:"TB_PORT" envDefault:"8080"`
}
func GetEnvVars ¶
func (*EnvVars) Credentials ¶ added in v1.1.1
func (e *EnvVars) Credentials() *ClientCredentials
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
func NewSettings ¶
func (*Settings) NextStation ¶
func (*Settings) TrainStation ¶
type Stations ¶
type Stations struct {
XMLName xml.Name `xml:"stations"`
Text string `xml:",chardata"`
Station []struct {
Text string `xml:",chardata"`
Name string `xml:"name,attr"`
Eva string `xml:"eva,attr"`
Ds100 string `xml:"ds100,attr"`
Db string `xml:"db,attr"`
Creationts string `xml:"creationts,attr"`
Meta string `xml:"meta,attr"`
} `xml:"station"`
}
type TemplateData ¶
type Timetable ¶
type Timetable struct {
XMLName xml.Name `xml:"timetable"`
Text string `xml:",chardata"`
Station string `xml:"station,attr"`
Stops []struct {
Text string `xml:",chardata"`
ID string `xml:"id,attr"`
TripLabel struct {
Text string `xml:",chardata"`
F string `xml:"f,attr"`
T string `xml:"t,attr"`
O string `xml:"o,attr"`
C string `xml:"c,attr"`
N string `xml:"n,attr"`
} `xml:"tl"`
Arrival struct {
Connection
Pde string `xml:"pde,attr"`
} `xml:"ar"`
Departure struct {
Connection
} `xml:"dp"`
} `xml:"s"`
}
Click to show internal directories.
Click to hide internal directories.