lure-updater/internal/config/config.go

46 lines
1.4 KiB
Go
Raw Normal View History

2023-06-09 17:54:15 +00:00
/*
* LURE Updater - Automated updater bot for LURE packages
* Copyright (C) 2023 Elara Musayelyan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2023-06-09 17:48:46 +00:00
package config
type Config struct {
2023-06-09 18:19:07 +00:00
Git Git `toml:"git" envPrefix:"GIT_"`
Webhook Webhook `toml:"webhook" envPrefix:"WEBHOOK_"`
2023-06-09 17:48:46 +00:00
}
type Git struct {
2023-06-09 18:19:07 +00:00
RepoDir string `toml:"repoDir" env:"REPO_DIR"`
RepoURL string `toml:"repoURL" env:"REPO_URL"`
Commit Commit `toml:"commit" envPrefix:"COMMIT_"`
Credentials Credentials `toml:"credentials" envPrefix:"CREDENTIALS_"`
2023-06-09 17:48:46 +00:00
}
type Credentials struct {
2023-06-09 18:19:07 +00:00
Username string `toml:"username" env:"USERNAME"`
Password string `toml:"password" env:"PASSWORD"`
2023-06-09 17:48:46 +00:00
}
type Commit struct {
2023-06-09 18:19:07 +00:00
Name string `toml:"name" env:"NAME"`
Email string `toml:"email" env:"EMAIL"`
2023-06-09 17:48:46 +00:00
}
type Webhook struct {
2023-06-09 18:19:07 +00:00
PasswordHash string `toml:"pwd_hash" env:"PASSWORD_HASH"`
2023-06-09 17:48:46 +00:00
}