Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Address is the socket to bind to
Address string `mapstructure:"address"`
LogLevel string `mapstructure:"log_level"`
AllowOrigins []string `mapstructure:"allow_origins"`
// TLSConfig holds various TLS related configurations
TLSConfig *TLSConfig `mapstructure:"-"`
JwtConfig *JwtConfig `mapstructure:"-"`
SchedulerConfig *SchedulerConfig `mapstructure:"-"`
DriverConfig *DriverConfig `mapstructure:"-"`
PostgresConfig *PostgresConfig `mapstructure:"-"`
}
Config is what defines the behaviour of the api
func ParseConfig ¶
ParseConfig parses the config from the given io.Reader.
Due to current internal limitations, the entire contents of the io.Reader will be copied into memory first before parsing.
func ParseConfigFile ¶
ParseConfigFile parses the given path as a config file.
type DriverConfig ¶
type DriverConfig struct {
// Enable specifies the name of drivers to enable
Enable []string `mapstructure:"enable"`
// Options provides arbitrary key-value configuration for internals,
// like authentication and drivers. The format is:
//
// namespace.option = value
Options DriverOptions `mapstructure:"options"`
}
func DefaultDriverConfig ¶
func DefaultDriverConfig() *DriverConfig
type DriverOptions ¶
type PostgresConfig ¶
type PostgresConfig struct {
Address string `mapstructure:"address"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Database string `mapstructure:"database"`
}
func (*PostgresConfig) Connect ¶
func (p *PostgresConfig) Connect() *pg.DB
Connect creates a new pg connection
type SchedulerConfig ¶
type SchedulerConfig struct {
Name string `mapstructure:"name"`
}
Click to show internal directories.
Click to hide internal directories.