github.com/bingoohuang/gg@v0.0.0-20240325092523-45da7dee9335/pkg/gokv/store.go (about) 1 package gokv 2 3 type Store interface { 4 // All list the keys in the store. 5 All() (map[string]string, error) 6 // Set stores the given value for the given key. 7 Set(k, v string) error 8 // Get retrieves the value for the given key. 9 Get(k string) (v string, err error) 10 // Del deletes the stored value for the given key. 11 // Deleting a non-existing key-value pair does NOT lead to an error. 12 Del(k string) error 13 }