func AccessSecret(name string) ([]byte, error) {
	return accessSecretVersion(name, "latest")
}
AccessSecret returns the latest version of a Google Cloud Secret
for the given name.
package run
import (
	"encoding/base64"
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"time"
)
var (
	secretmanagerEndpoint = "https://secretmanager.googleapis.com/v1"
)
var ErrSecretPermissionDenied = errors.New("run: permission denied to named secret")
var ErrSecretUnauthorized = errors.New("run: secret manager unauthorized")
var ErrSecretNotFound = errors.New("run: named secret not found")
var ErrSecretUnknownError = errors.New("run: unexpected error retrieving named secret")
type ErrSecretUnexpectedResponse struct {
	StatusCode int
	Err        error
}
func (e *ErrSecretUnexpectedResponse) Error() string {
	return "run: unexpected error retrieving named secret"
}
func (e *ErrSecretUnexpectedResponse) Unwrap() error { return e.Err }
type SecretVersion struct {
	Name    string
	Payload SecretPayload `json:"payload"`
}
type SecretPayload struct {
	Data string `json:"data"`
}
func formatSecretVersion(project, name, version string) string {
	return fmt.Sprintf("projects/%s/secrets/%s/versions/%s", project, name, version)
}
func AccessSecretVersion(name, version string) ([]byte, error) {
	return accessSecretVersion(name, version)
}