Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteEmptyConf ¶
WriteEmptyConf writes a new, empty configuration file to the filename with the given name. The configuration file is in TOML format and contains some sensible defaults for most non-sensitive key/value pairs.
Types ¶
type Config ¶
type Config struct { Providers map[string]ProviderConfig MemStore MemStoreConfig WebService WebServiceConfig Sync SyncConfig }
Config contains the application configuration.
func NewConfig ¶
NewConfig returns a app configuration struct, loaded from a TOML file. If a file path is included in the file name, the file will be loaded from that path. Otherwise, NewConfig will assume that the file is available in the same directory as the autobot executable and attempt to load it from there.
type FtpConfig ¶
type FtpConfig struct { Host string Port int User string Password string Dir string FilePrefix string }
FtpConfig contains FTP connection configuration.
type LookupConfig ¶
type LookupConfig struct { LookupSupported bool LookupSecure bool LookupHost string LookupPath string LookupKey string }
LookupConfig contains configuration for performing direct vehicle lookups via an API.
type MemStoreConfig ¶
MemStoreConfig contains configuration for memory store / Redis.
type ProviderConfig ¶
type ProviderConfig struct { FtpConfig LookupConfig }
ProviderConfig contains configuration for the data provider.
type SyncConfig ¶
type SyncConfig struct { SyncedFileString string VehicleMap string VINSortedSet string RegNrSortedSet string HistorySortedSet string EarliestRegDate date }
SyncConfig contains configuration related to the actual synchronization algorithm.
type WebServiceConfig ¶
type WebServiceConfig struct {
Schedule string
}
WebServiceConfig contains configuration related to the web service and sync scheduler.