internal/secret: add secret names for common secrets
This change adds names used to retrieve commonly used secrets.
Updates golang/go#37171
Change-Id: Ibeaff7d2b76fdb6828006bff9f8deed37556df15
Reviewed-on: https://go-review.googlesource.com/c/build/+/222097
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
diff --git a/internal/secret/gcp_secret_manager.go b/internal/secret/gcp_secret_manager.go
index a6604f1..69b28f4 100644
--- a/internal/secret/gcp_secret_manager.go
+++ b/internal/secret/gcp_secret_manager.go
@@ -17,6 +17,35 @@
secretmanagerpb "google.golang.org/genproto/googleapis/cloud/secretmanager/v1beta1"
)
+const (
+ // NameBuilderMasterKey is the secret name for the builder master key.
+ NameBuilderMasterKey = "builder-master-key"
+
+ // NameFarmerRunBench is the secret name for farmer run bench.
+ NameFarmerRunBench = "farmer-run-bench"
+
+ // NameGerritbotGitCookies is the secret name for Gerritbot Git cookies.
+ NameGerritbotGitCookies = "gerritbot-gitcookies"
+
+ // NameGitHubSSH is the secret name for GitHub SSH key.
+ NameGitHubSSH = "github-ssh"
+
+ // NameGithubSSHKey is the secret name for the GitHub SSH private key.
+ NameGitHubSSHKey = "github-ssh-private-key"
+
+ // NameGobotPassword is the secret name for the Gobot password.
+ NameGobotPassword = "gobot-password"
+
+ // NameGomoteSSHPublicKey is the secret name for the gomote SSH public key.
+ NameGomoteSSHPublicKey = "gomote-ssh-public-key"
+
+ // NameMaintnerGitHubToken is the secret name for the Maintner GitHub token.
+ NameMaintnerGitHubToken = "maintner-github-token"
+
+ // NamePubSubHelperWebhook is the secret name for the pubsub helper webhook secret.
+ NamePubSubHelperWebhook = "pubsubhelper-webhook-secret"
+)
+
type secretClient interface {
AccessSecretVersion(ctx context.Context, req *secretmanagerpb.AccessSecretVersionRequest, opts ...gax.CallOption) (*secretmanagerpb.AccessSecretVersionResponse, error)
io.Closer