Documentation
¶
Overview ¶
Package kvdb is go client library for dealing with Ankr KMS service. it includes a high-level API for easy store static secret information
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KV ¶
type KV struct {
// contains filtered or unexported fields
}
func (*KV) Get ¶
Example ¶
package main
import (
"github.com/Ankr-network/go-kms/kvdb"
)
func main() {
kvc, err := kvdb.NewKVer("127.0.0.1", "ankr-user")
if err != nil {
// handle error
return
}
rsp, err := kvc.Get("/")
if err != nil {
// handle error
return
}
// handle response here
_ = rsp
}
type KVer ¶
type KVer interface {
// take secrets by specify path
Get(path string) (map[string]interface{}, error)
// put secrets by specify path
Put(path string, value map[string]string) error
}
kvdb api constraint: we store anything, the data must format map, thank you know. we thought to replace map structure with []byte structure, but for extensions, we think the map is well,the map is a stable structure. think about some scenario of only take part of the secrets, we can easy handle with it.
Click to show internal directories.
Click to hide internal directories.