vault

package
v0.9.0-rc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package vault provides the ability for Vela to integrate with HashiCorp Vault as a secret backend.

Usage:

import "github.com/go-vela/server/secret/vault"

Index

Constants

View Source
const (
	PrefixVaultV1 = "secret"
	PrefixVaultV2 = "secret/data"
)

Variables

This section is empty.

Functions

func New

func New(opts ...ClientOpt) (*client, error)

New returns a Secret implementation that integrates with a Vault secrets engine.

nolint: revive // ignore returning unexported client

Types

type ClientOpt added in v0.8.0

type ClientOpt func(*client) error

ClientOpt represents a configuration option to initialize the secret client.

func WithAWSRole added in v0.8.0

func WithAWSRole(awsRole string) ClientOpt

WithAWSRole sets the Vault AWS role in the secret client.

func WithAddress added in v0.8.0

func WithAddress(address string) ClientOpt

WithAddress sets the Vault address in the secret client.

func WithAuthMethod added in v0.8.0

func WithAuthMethod(authMethod string) ClientOpt

WithAuthMethod sets the Vault authentication method in the secret client.

func WithPrefix added in v0.8.0

func WithPrefix(prefix string) ClientOpt

WithPrefix sets the Vault prefix in the secret client.

func WithToken added in v0.8.0

func WithToken(token string) ClientOpt

WithToken sets the Vault token in the secret client.

func WithTokenDuration added in v0.8.0

func WithTokenDuration(tokenDuration time.Duration) ClientOpt

WithTokenDuration sets the Vault token duration in the secret client.

func WithVersion added in v0.8.0

func WithVersion(version string) ClientOpt

WithVersion sets the Vault version in the secret client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL