Documentation ¶
Index ¶
- Constants
- Variables
- func AddSecretVersion(ctx context.Context, name string, value []byte) (*secretmanagerpb.SecretVersion, error)
- func CreateSecret(ctx context.Context, id string) (*secretmanagerpb.Secret, error)
- func CreateSecretWithValue(ctx context.Context, name string, value []byte) error
- func DestroyAllButLatestVersion(ctx context.Context, name string) error
- func DestroyAllPreviousVersions(ctx context.Context, name string, version int) error
- func DestroySecretVersion(ctx context.Context, name string, version int) error
- func DisableSecretVersion(ctx context.Context, name string, version int) error
- func EnableSecretVersion(ctx context.Context, name string, version int) error
- func GetSecretValue(ctx context.Context, name string) ([]byte, error)
- func GetSecretValueAsString(ctx context.Context, name string) string
- func MustGetSecretValue(ctx context.Context, name string, ...) []byte
- func RemoveSecret(ctx context.Context, name string) error
- func ReplaceSecretWithNewVersion(ctx context.Context, name string, value []byte) error
- func UpdateSecretWithNewVersion(ctx context.Context, name string, value []byte) error
- type NewPathVersionOption
- type Path
Constants ¶
View Source
const (
NO_DATA = string('\u0000')
)
View Source
const OAUTH_CLIENT_ID = "OAUTH_CLIENT_ID"
View Source
const OAUTH_CLIENT_SECRET = "OAUTH_CLIENT_SECRET"
Variables ¶
View Source
var ValueOutOfRange = errorx.RegisterTrait("value out of range")
Functions ¶
func AddSecretVersion ¶
func AddSecretVersion(ctx context.Context, name string, value []byte) (*secretmanagerpb.SecretVersion, error)
AddSecretVersion adds a new secret version to the given secret with the provided payload.
func CreateSecret ¶
func CreateSecretWithValue ¶
func DestroySecretVersion ¶
func DisableSecretVersion ¶
func EnableSecretVersion ¶
func GetSecretValue ¶
GetSecretValue accesses the payload for the given secret version if one exists. The version can be a version number as a string (e.g. "5") or an alias (e.g. "latest").
func MustGetSecretValue ¶
Types ¶
type NewPathVersionOption ¶
type NewPathVersionOption func(path *Path)
func WithLatestVersion ¶
func WithLatestVersion() NewPathVersionOption
func WithVersion ¶
func WithVersion(version int) NewPathVersionOption
func WithoutVersion ¶
func WithoutVersion() NewPathVersionOption
type Path ¶
func NewPath ¶
func NewPath(name string, version NewPathVersionOption) Path
func (Path) LatestVersion ¶
func (Path) WithVersion ¶
func (Path) WithoutVersion ¶
Click to show internal directories.
Click to hide internal directories.