Skip to content

nhatthm/go-secretstorage

Repository files navigation

Secret Storage

GitHub Releases Build Status codecov Go Report Card GoDevDoc Donate

A library for storing and retrieving secrets.

Prerequisites

  • Go >= 1.21

Install

go get go.nhat.io/secretstorage

Usage

package main

import (
    "fmt"

    "go.nhat.io/secretstorage"
)

func main() {
    ss := secretstorage.NewKeyringStorage[string]()

    err := ss.Set("service", "key", "value")
    if err != nil {
        panic(err)
    }

    value, err := ss.Get("service", "key")
    if err != nil {
        panic(err)
    }

    fmt.Println(value)
}

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

Paypal donation

paypal

       or scan this