Improve config validation
Opened this issue · 0 comments
itsdalmo commented
We should consider moving sidecred.Config
to a subpackage so we can import concrete types from the provides/stores and do additional validation. This is so we can catch configuration errors before deploying the config. We should also add a validate
subcommand to the CLI for this purpose.
The following interfaces should cover what we need inside sidecred.Process
:
type Config interface {
Validate() error
Requests() []Request
}
type Request interface {
Store() *StoreConfig
Credentials() []*CredentialRequest
}