Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
Providers CacheProviders
Slack CacheSlack
}
Cache holds the configuration regarding the scheduling of cache updates
type CacheProviders ¶
type CacheProviders struct {
UpdateRepositories CacheProvidersUpdateRepositories `json:"update_repositories" yaml:"update_repositories"`
UpdateRepositoriesRefs CacheProvidersUpdateRepositoriesRefs `json:"update_repositories_refs" yaml:"update_repositories_refs"`
}
CacheProviders ..
type CacheProvidersUpdateRepositories ¶
type CacheProvidersUpdateRepositories struct {
OnStart bool `default:"true" json:"on_start" yaml:"on_start"`
EverySeconds int `default:"3600" json:"every_seconds" yaml:"on_schedule"`
}
CacheProvidersUpdateRepositories ..
type CacheProvidersUpdateRepositoriesRefs ¶
type CacheProvidersUpdateRepositoriesRefs struct {
OnStart bool `default:"false" json:"on_start" yaml:"on_start"`
EverySeconds int `json:"every_seconds" yaml:"on_schedule"`
}
CacheProvidersUpdateRepositoriesRefs ..
type CacheSlack ¶
type CacheSlack struct {
UpdateUsersEmails CacheSlackUpdateUsersEmails `json:"update_users_emails" yaml:"update_users_emails"`
}
CacheSlack ..
type CacheSlackUpdateUsersEmails ¶
type CacheSlackUpdateUsersEmails struct {
OnStart bool `default:"true" json:"on_start" yaml:"on_start"`
EverySeconds int `default:"86400" json:"every_seconds" yaml:"on_schedule"`
}
CacheSlackUpdateUsersEmails ..
type Config ¶
type Config struct {
Cache Cache
Providers Providers `validate:"gt=0,unique=Type"`
ListenAddress string `default:":8080" validate:"required"`
Log Log
Slack Slack
Users Users
}
Config represents all the parameters required for the app to be configured properly
type Format ¶
type Format uint8
Format represents the format of the config file
func GetTypeFromFileExtension ¶
GetTypeFromFileExtension returns the ConfigType based upon the extension of the file
type Log ¶
type Log struct {
Level string `default:"info" validate:"required,oneof=trace debug info warning error fatal panic"`
Format string `default:"text" validate:"oneof=text json"`
}
Log holds runtime logging configuration
type Provider ¶
type Provider struct {
Type string `validate:"oneof=github gitlab"`
URL string
Token string `validate:"required"`
Owners []string `validate:"gt=0"`
}
Provider holds the configuration of a git provider
type Slack ¶
type Slack struct {
Token string `validate:"required"`
SigningSecret string `validate:"required" json:"signing_secret" yaml:"signing_secret"`
}
Slack holds Slack related configuration
Click to show internal directories.
Click to hide internal directories.