Categorygithub.com/sean9999/go-store
module
0.0.4
Repository: https://github.com/sean9999/go-store.git
Documentation: pkg.go.dev

# README

Store

Store is a simple wrapper around redis. It provides namespaces and the concept of Collections.

Other back-ends beside redis are planned.

Getting started

First you must have a running instance of redis.

$ sudo systemctl start redis-server

A simple example main.go:

import (
	"context"
	"fmt"

	"github.com/sean9999/go-store"
)

func main(){

    //  using the redis back-end
	ctx := context.Background()
	s := red.NewStore("myStore")

    animals, _ := s.KeyValueCollection("animals")
    
    animals.Set(ctx, "duck", []byte("quack"))
    animals.Set(ctx, "dog", []byte("bark"))

    allAnimals := animals.GetAll(ctx)

    fmt.Println(allAnimals)

}

# Packages

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