Peter Kurfer
91f0cf6963
- use `Unmarshal` method of viper - move config loading, defaulting and stuff to config package - move serve to an extra command and move keep only global flags in root command - add startup logic to onInit method in root command - update mocks - clean config structs - adopt changes in plugins - update default config
27 lines
435 B
Go
27 lines
435 B
Go
package config
|
|
|
|
import "time"
|
|
|
|
type CurveType string
|
|
|
|
type File struct {
|
|
PublicKeyPath string
|
|
PrivateKeyPath string
|
|
}
|
|
|
|
type ValidityDuration struct {
|
|
NotBeforeRelative time.Duration
|
|
NotAfterRelative time.Duration
|
|
}
|
|
|
|
type ValidityByPurpose struct {
|
|
CA ValidityDuration
|
|
Server ValidityDuration
|
|
}
|
|
|
|
type CertOptions struct {
|
|
RootCACert File
|
|
CertCachePath string
|
|
Curve CurveType
|
|
Validity ValidityByPurpose
|
|
}
|