Split settings structs into separate files
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
This commit is contained in:
parent
aac7f5743d
commit
45fbfed51b
12
internal/settings/gitea.go
Normal file
12
internal/settings/gitea.go
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
package settings
|
||||||
|
|
||||||
|
type GiteaRepository struct {
|
||||||
|
Owner string
|
||||||
|
Name string
|
||||||
|
}
|
||||||
|
|
||||||
|
type giteaConfig struct {
|
||||||
|
Url string
|
||||||
|
Token *token
|
||||||
|
Webhook *webhook
|
||||||
|
}
|
8
internal/settings/project.go
Normal file
8
internal/settings/project.go
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
package settings
|
||||||
|
|
||||||
|
type Project struct {
|
||||||
|
SonarQube struct {
|
||||||
|
Key string
|
||||||
|
} `mapstructure:"sonarqube"`
|
||||||
|
Gitea GiteaRepository
|
||||||
|
}
|
|
@ -7,30 +7,6 @@ import (
|
||||||
"github.com/spf13/viper"
|
"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 (
|
var (
|
||||||
Gitea giteaConfig
|
Gitea giteaConfig
|
||||||
SonarQube sonarQubeConfig
|
SonarQube sonarQubeConfig
|
||||||
|
|
7
internal/settings/sonarqube.go
Normal file
7
internal/settings/sonarqube.go
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
package settings
|
||||||
|
|
||||||
|
type sonarQubeConfig struct {
|
||||||
|
Url string
|
||||||
|
Token *token
|
||||||
|
Webhook *webhook
|
||||||
|
}
|
Loading…
Reference in a new issue