Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opts ¶
type Opts struct {
// logger
Logger struct {
Level string `` // nolint:staticcheck // multiple choices are ok
/* 152-byte string literal not displayed */
Format string `long:"log.format" env:"LOG_FORMAT" description:"Log format" choice:"logfmt" choice:"json" default:"logfmt"` // nolint:staticcheck // multiple choices are ok
Source string `` // nolint:staticcheck // multiple choices are ok
/* 177-byte string literal not displayed */
Color string `long:"log.color" env:"LOG_COLOR" description:"Enable color for logs" choice:"" choice:"auto" choice:"yes" choice:"no"` // nolint:staticcheck // multiple choices are ok
Time bool `long:"log.time" env:"LOG_TIME" description:"Show log time"`
}
// Github
GitHub struct {
EnterpriseURL string `long:"github.enterprise.url" env:"GITHUB_ENTERPRISE_URL" description:"GitHub enterprise url (self hosted)"`
Organization string `long:"github.organization" env:"GITHUB_ORGANIZATION" description:"GitHub organization name" required:"true"`
Auth struct {
// PAT auth
Token string `long:"github.token" env:"GITHUB_TOKEN" description:"GitHub token auth: PAT" json:"-"`
// APP auth
AppID *int64 `long:"github.app.id" env:"GITHUB_APP_ID" description:"GitHub app auth: App ID"`
AppInstallationID *int64 `long:"github.app.installationid" env:"GITHUB_APP_INSTALLATION_ID" description:"GitHub app auth: App installation ID"`
AppPrivateKeyFile *string `long:"github.app.keyfile" env:"GITHUB_APP_PRIVATE_KEY" description:"GitHub app auth: Private key (path to file)"`
}
Repositories struct {
CustomProperties []string `` /* 201-byte string literal not displayed */
}
Workflows struct {
Timeframe time.Duration `` /* 141-byte string literal not displayed */
}
}
Scrape struct {
Time time.Duration `long:"scrape.time" env:"SCRAPE_TIME" description:"Scrape time" default:"30m"`
}
// caching
Cache struct {
Path string `` /* 186-byte string literal not displayed */
}
Server struct {
// general options
Bind string `long:"server.bind" env:"SERVER_BIND" description:"Server address" default:":8080"`
ReadTimeout time.Duration `long:"server.timeout.read" env:"SERVER_TIMEOUT_READ" description:"Server read timeout" default:"5s"`
WriteTimeout time.Duration `long:"server.timeout.write" env:"SERVER_TIMEOUT_WRITE" description:"Server write timeout" default:"10s"`
}
}
func (*Opts) GetCachePath ¶
Click to show internal directories.
Click to hide internal directories.