add ability to store/create encrypted vcenter password
This commit is contained in:
@@ -21,6 +21,7 @@ type Server struct {
|
||||
disableTls bool
|
||||
tlsCertFilename string
|
||||
tlsKeyFilename string
|
||||
encryptionKey string
|
||||
}
|
||||
|
||||
// New creates a new server with the given logger, address and options.
|
||||
@@ -88,6 +89,13 @@ func WithRouter(handler http.Handler) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// SetKey sets the encryption key we use when generating secrets
|
||||
func SetKey(key string) Option {
|
||||
return func(s *Server) {
|
||||
s.encryptionKey = key
|
||||
}
|
||||
}
|
||||
|
||||
// SetTls sets the disable tls value
|
||||
func SetTls(disableTls bool) Option {
|
||||
return func(s *Server) {
|
||||
|
Reference in New Issue
Block a user