Split settings structs into separate files

Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
This commit is contained in:
justusbunsi 2021-10-09 21:10:30 +02:00
parent aac7f5743d
commit 45fbfed51b
No known key found for this signature in database
GPG key ID: 990B348ECAC9C7DB
4 changed files with 27 additions and 24 deletions

View file

@ -0,0 +1,12 @@
package settings
type GiteaRepository struct {
Owner string
Name string
}
type giteaConfig struct {
Url string
Token *token
Webhook *webhook
}

View file

@ -0,0 +1,8 @@
package settings
type Project struct {
SonarQube struct {
Key string
} `mapstructure:"sonarqube"`
Gitea GiteaRepository
}

View file

@ -7,30 +7,6 @@ import (
"github.com/spf13/viper"
)
type GiteaRepository struct {
Owner string
Name string
}
type giteaConfig struct {
Url string
Token *token
Webhook *webhook
}
type sonarQubeConfig struct {
Url string
Token *token
Webhook *webhook
}
type Project struct {
SonarQube struct {
Key string
} `mapstructure:"sonarqube"`
Gitea GiteaRepository
}
var (
Gitea giteaConfig
SonarQube sonarQubeConfig

View file

@ -0,0 +1,7 @@
package settings
type sonarQubeConfig struct {
Url string
Token *token
Webhook *webhook
}