Implementation of postgres store

This commit is contained in:
Jake Sanders
2019-11-01 14:13:21 +00:00
parent 74286c2939
commit dee63b2b2c
4 changed files with 350 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ import (
)
var (
// ErrNotFound is returned when a Read key doesn't exist
ErrNotFound = errors.New("not found")
)
@@ -14,11 +15,11 @@ var (
type Store interface {
// List all the known records
List() ([]*Record, error)
// Read a record with key
// Read records with keys
Read(key ...string) ([]*Record, error)
// Write a record
// Write records
Write(rec ...*Record) error
// Delete a record with key
// Delete records with keys
Delete(key ...string) error
}