vault

package
v1.16.3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

README

vault

import "github.com/betterdoctor/duncan/vault"

Overview

Index

Package files

api.go

func SecretsURL

func SecretsURL(app, env string) string

SecretsURL returns the Vault API endpoint to GET and POST secrets for a given app and env

type Secrets

type Secrets struct {
    KVPairs map[string]string `json:"data"`
}

Secrets represents Vault key/value pairs for a prefix

func Delete
func Delete(url string, keys []string, s *Secrets) (*Secrets, error)

Delete removes a key/value pair from the prefix

func Read
func Read(url string) (*Secrets, error)

Read displays all key/value pairs at the given prefix if no key is given If a key is passed will just display the key/value pair for the key

func Write
func Write(url string, kvs []string, s *Secrets) (*Secrets, error)

Write sets the given key/value pairs at the provided prefix


Generated by godoc2md

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SecretsURL

func SecretsURL(app, env string) string

SecretsURL returns the Vault API endpoint to GET and POST secrets for a given app and env

Types

type Secrets

type Secrets struct {
	KVPairs map[string]string `json:"data"`
}

Secrets represents Vault key/value pairs for a prefix

func Delete

func Delete(url string, keys []string, s *Secrets) (*Secrets, error)

Delete removes a key/value pair from the prefix

func Read

func Read(url string) (*Secrets, error)

Read displays all key/value pairs at the given prefix if no key is given If a key is passed will just display the key/value pair for the key

func Write

func Write(url string, kvs []string, s *Secrets) (*Secrets, error)

Write sets the given key/value pairs at the provided prefix

Jump to

Keyboard shortcuts

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