add tests for config

This commit is contained in:
Cubicroot 2021-06-11 10:13:17 +02:00
parent d39e2ea9a4
commit e87f775b1d
11 changed files with 461 additions and 6 deletions

View file

@ -23,6 +23,13 @@ type Formatting struct {
ColoredTitle bool `default:"false"`
}
// Matrix holds credentials for a matrix account
type Matrix struct {
Homeserver string `default:"https://matrix.org"`
Username string `required:"true"`
Password string `required:"true"`
}
// Configuration holds values that can be configured by the user.
type Configuration struct {
Debug bool `default:"false"`
@ -39,11 +46,7 @@ type Configuration struct {
Password string `default:"admin"`
MatrixID string `required:"true"`
}
Matrix struct {
Homeserver string `default:"https://matrix.org"`
Username string `required:"true"`
Password string `required:"true"`
}
Matrix Matrix
Security struct {
CheckHIBP bool `default:"false"`
}