Categorygithub.com/haykh/goencode
repositorypackage
0.0.0-20220806084941-ae207bff2481
Repository: https://github.com/haykh/goencode.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Secrets Package and CLI

Using the CLI

Build

First, build the application with:

go build -o ./goencode cmd/cli.go

Commands:

To execute: ./goencode

This will show all commands available via the command line interface. Supported commands are:

  • GET
  • SET
  • LIST
  • DELETE

Example usage:

./goencode set "key" "value" -k "encoding-key"

./goencode get "key" -k "encoding-key"

./goencode list -k "encoding-key"

./goencode delete "key" -k "encoding-key

Using the Package

Developers can use the package by doing the following:

go get github.com/haykh/goencode

Usage of the package in Go code:

v := secret.File("encoding-key", "path/to/file")

err := v.Set("key", "value")

value, err := v.Get("key")

keys, err := v.List()

err := v.Delete("key")

Project extended from Jon Calhoun's Gophercises Secrets API and CLI.