certwarden-deploy/internal/configuration/models.go

40 lines
1.1 KiB
Go
Raw Normal View History

2024-07-03 10:00:21 +02:00
package configuration
2024-06-28 15:28:54 +02:00
2024-07-03 11:56:04 +02:00
// Config file gets read into here
2024-06-28 15:28:54 +02:00
var Config *ConfigFileData
2024-07-03 11:56:04 +02:00
// ConfigFile contains the path to the config file on disk
2024-07-03 10:00:21 +02:00
var ConfigFile string
2024-07-03 11:56:04 +02:00
// Flag to show that the user wants a dry run
2024-06-30 08:55:07 +02:00
var DryRun bool
2024-07-03 11:56:04 +02:00
// Flag to show that the user wants quiet logging
2024-06-30 08:55:07 +02:00
var QuietLogging bool
2024-07-03 11:56:04 +02:00
// Flag to show that the user wants verbose logging
2024-06-30 08:55:07 +02:00
var VerboseLogging bool
2024-06-28 15:28:54 +02:00
2024-07-03 11:56:04 +02:00
// Flag to show that the user wants to force certificate update
var Force bool
// Struct to read the config file into when reading from disk
2024-06-28 15:28:54 +02:00
type ConfigFileData struct {
BaseURL string `yaml:"base_url"`
DisableCertificateValidation bool `yaml:"disable_certificate_validation"`
2024-07-03 10:00:21 +02:00
Sentry SentryData `yaml:"sentry,omitempty"`
2024-06-28 15:28:54 +02:00
Certificates []CertificateData `yaml:"certificates"`
}
2024-07-03 11:56:04 +02:00
// Struct that holds the details of a single managed certificate
2024-06-28 15:28:54 +02:00
type CertificateData struct {
Name string `yaml:"name"`
ApiKey string `yaml:"api_key"`
Action string `yaml:"action"`
FilePath string `yaml:"file_path"`
}
2024-07-03 10:00:21 +02:00
type SentryData struct {
DSN string `yaml:"dsn"`
}