2020-12-02 09:02:08 +00:00
|
|
|
// +build noawskms nogcpkms novaultkms
|
|
|
|
|
2020-12-02 08:44:18 +00:00
|
|
|
package kms
|
|
|
|
|
2020-12-02 09:02:08 +00:00
|
|
|
const disabledProviderName = "Disabled"
|
|
|
|
|
2020-12-02 08:44:18 +00:00
|
|
|
type disabledSecret struct {
|
|
|
|
baseSecret
|
|
|
|
err error
|
|
|
|
}
|
|
|
|
|
|
|
|
func newDisabledSecret(err error) SecretProvider {
|
|
|
|
return &disabledSecret{
|
|
|
|
baseSecret: baseSecret{},
|
|
|
|
err: err,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *disabledSecret) Name() string {
|
|
|
|
return disabledProviderName
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *disabledSecret) IsEncrypted() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *disabledSecret) Encrypt() error {
|
|
|
|
return s.err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *disabledSecret) Decrypt() error {
|
|
|
|
return s.err
|
|
|
|
}
|