Discover Packages
github.com/opencars/bot
pkg
config
package
Version:
v0.0.48
Opens a new window with list of versions in this module.
Published: Feb 23, 2021
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type AutoRia struct {
Period Duration `yaml:"period"`
ApiKey string `yaml:"api_key"`
}
AutoRia represents configuration for the AutoRia API.
type Config struct {
AutoRia AutoRia `yaml:"autoria"`
Store Store `yaml:"database"`
}
Config represents mix of settings for the app.
New reads application configuration from specified file path.
Duration represents custom type for unmarshaling string.
For example: "500ms", "1s", "2m", etc.
UnmarshalText implements yaml unmarshaler.
type Log struct {
Level string `yaml:"level"`
Mode string `yaml:"mode"`
}
Log represents settings for application logger.
type Server struct {
ShutdownTimeout Duration `yaml:"shutdown_timeout"`
ReadTimeout Duration `yaml:"read_timeout"`
WriteTimeout Duration `yaml:"write_timeout"`
IdleTimeout Duration `yaml:"idle_timeout"`
}
Server represents settings for creating http server.
type Store struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
User string `yaml:"username"`
Password string `yaml:"password"`
Database string `yaml:"database"`
SSLMode string `yaml:"ssl_mode"`
}
Store represents configuration for the storage.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.