README

Go Reference

golang.org/x/build/internal/secret

Package secret provides a client interface for interacting with the GCP Secret Management service.

Documentation

Overview

    Package secret provides a client interface for interacting with the GCP Secret Management service.

    Index

    Constants

    View Source
    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"
    
    	// NameGitHubWebhookSecret is the secret name for a golang/go GitHub webhook secret.
    	NameGitHubWebhookSecret = "github-webhook-secret"
    
    	// NamePubSubHelperWebhook is the secret name for the pubsub helper webhook secret.
    	NamePubSubHelperWebhook = "pubsubhelper-webhook-secret"
    
    	// NameAWSAccessKey is the secret name for the AWS access key.
    	NameAWSAccessKey = "aws-access-key"
    
    	// NameAWSKeyID is the secret name for the AWS key id.
    	NameAWSKeyID = "aws-key-id"
    
    	// NameSendGridAPIKey is the secret name for a Go project SendGrid API key.
    	// This API key only allows sending email.
    	NameSendGridAPIKey = "sendgrid-sendonly-api-key"
    )

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Client

    type Client struct {
    	// contains filtered or unexported fields
    }

      Client is used to interact with the GCP Secret Management service.

      func MustNewClient

      func MustNewClient() *Client

        MustNewClient instantiates an instance of the Secret Manager Client. If there is an error this fuction will exit.

        func NewClient

        func NewClient() (*Client, error)

          NewClient instantiates an instance of the Secret Manager Client.

          func (*Client) Close

          func (smc *Client) Close() error

            Close closes the connection to the Secret Management service.

            func (*Client) Retrieve

            func (smc *Client) Retrieve(ctx context.Context, name string) (string, error)

              Retrieve the named secret from the Secret Management service.