add build tags to disable kms providers

This commit is contained in:
Nicola Murino
2020-12-02 09:44:18 +01:00
parent 87b51a6fd5
commit a67276ccc2
13 changed files with 132 additions and 35 deletions

View File

@@ -1,13 +1,22 @@
// +build !nogcpkms
package kms
const (
gcpProviderName = "GCP"
import (
// we import gcpkms here to be able to disable GCP KMS support using a build tag
_ "gocloud.dev/secrets/gcpkms"
"github.com/drakkan/sftpgo/version"
)
type gcpSecret struct {
baseGCloudSecret
}
func init() {
version.AddFeature("+gcpkms")
}
func newGCPSecret(base baseSecret, url, masterKey string) SecretProvider {
return &gcpSecret{
baseGCloudSecret{