Skip to content

Vault provides a simple file-based key-value store for secrets.

License

Notifications You must be signed in to change notification settings

redwebcreation/vault

Repository files navigation

Vault

Tests status badge Go Report Card Codebeat report Codecov badge

Vault provides a simple file-based key-value store for secrets.

Installation

go get github.com/redwebcreation/vault

Usage

package main

import (
	"fmt"
	"github.com/redwebcreation/vault"
)

func main() {
	v, _ := vault.NewVault("/path/to/vault")

	_ = v.Set("key", []byte("the-secret"), []byte("super-secret-password"))
	keyContents, _ := v.Get("key", []byte("super-secret-password"))

	fmt.Printf("%s", keyContents) // prints "the-secret"

	_ = v.Delete("key")

	v.Has("key") // returns false
}

Testing

go test -v ./...

vault was created by Félix Dorn under the MIT license

About

Vault provides a simple file-based key-value store for secrets.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published