Documentation ¶
Index ¶
Constants ¶
const VAULT_CONFIG_TEMPLATE = `` /* 127-byte string literal not displayed */
VAULT_CONFIG_TEMPLATE A very minimal Vault config. Not even a true 'template', since all we're doing is interpolating the address into the mix.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VaultServer ¶
type VaultServer struct { Command *exec.Cmd Running bool UnsealKey string RootToken string UserToken string UserTokenFile string Address string }
VaultServer Representation of a Vault Server
func NewVaultServer ¶
func NewVaultServer(address string) *VaultServer
NewVaultServer creates a VaultServer struct with either the address provided, or the default address of 127.0.0.1:8200
func (*VaultServer) DevServerStart ¶
func (t *VaultServer) DevServerStart()
DevServerStart Starts a 'dev mode' server, and parses it's output to record the Unseal Keys and Root Token in the VaultServer object
func (*VaultServer) ServerShutDown ¶
func (t *VaultServer) ServerShutDown()
ServerShutDown shuts the server down
func (*VaultServer) ServerStart ¶
func (t *VaultServer) ServerStart()
ServerStart starts the VaultServer in normal mode. This server is sealed by default.
func (*VaultServer) VaultTestClient ¶
func (t *VaultServer) VaultTestClient() *api.Client
VaultTestClient returns a configured vault client for the test vault server. By default the client returned has the root token for the test vault instance set. If you want something else, you will need to reconfigure it.