Documentation ¶
Index ¶
- func AddAllFlags(c *cobra.Command)
- func AddConfigurationFlag(c *cobra.Command)
- func AddDatabaseFlags(c *cobra.Command)
- func AddFrontFlags(c *cobra.Command)
- func AddGlobalFlags(c *cobra.Command)
- func AddLoggerFlags(c *cobra.Command)
- func AddPrometheusFlags(c *cobra.Command)
- func AddServerFlags(c *cobra.Command)
- func NewLogger(c *Conf) *zerolog.Logger
- type Conf
- type CookieConf
- type CorsConf
- type DatabaseConf
- type FrontConf
- type JWTConf
- type LogConf
- type PrometheusConf
- type ServerConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAllFlags ¶
AddAllFlags will add all the flags provided in this package to the provided command and will bind those flags with viper.
func AddConfigurationFlag ¶
AddConfigurationFlag adds support to provide a configuration file on the command line.
func AddDatabaseFlags ¶
func AddFrontFlags ¶
func AddGlobalFlags ¶
func AddLoggerFlags ¶
AddLoggerFlags adds support to configure the level of the logger.
func AddPrometheusFlags ¶
AddPrometheusFlags adds flags to support prometheus instrumentation.
func AddServerFlags ¶
AddServerFlags adds support to configure the server.
Types ¶
type Conf ¶
type Conf struct { Log LogConf `mapstructure:"log"` Server ServerConf `mapstructure:"server"` Front FrontConf `mapstructure:"front"` Prometheus PrometheusConf `mapstructure:"prometheus"` Database DatabaseConf `mapstructure:"database"` Register bool `mapstructure:"allow_register"` }
type CookieConf ¶
type DatabaseConf ¶
type DatabaseConf struct {
Path string `mapstructure:"path"`
}
type PrometheusConf ¶
type ServerConf ¶
Click to show internal directories.
Click to hide internal directories.