Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetFormatter ¶
func SetFormatter(format string)
SetFormatter defines the way logs are formatted
func SetLogLevel ¶
func SetLogLevel(lvl string)
SetLogLevel sets the logging level when possible, otherwise it fallbacks to the default logrus level and logs a warning
Types ¶
type Conf ¶
type Conf struct { Server Server `yaml:"server"` Logger Logger `yaml:"logger"` GithubOAuthToken string `yaml:"github_oauth_token"` RServiceInterval string `yaml:"service_interval" default:"10m"` RRepoInterval string `yaml:"repo_interval" default:"10m"` ServiceInterval time.Duration RepoInterval time.Duration Services []Service `yaml:"services"` }
Conf is a configuration struct intended to be filled from a yaml file and/or sane defaults
var C Conf
C is the main exported conf
type Logger ¶
type Logger struct { Level string `yaml:"level" default:"info"` Format string `yaml:"format" default:"text"` }
Logger is a configuration struct to define logger's behaviour
type Repo ¶
type Repo struct { Type string `yaml:"type"` Host string `yaml:"host"` Token string `yaml:"token"` Path string `yaml:"path"` }
Repo is a configuration struct to access a repo
Click to show internal directories.
Click to hide internal directories.