micro/debug/store/store.go
2019-05-31 01:22:19 +01:00

28 lines
377 B
Go

// Package store stores the various pieces of data
package store
import (
"errors"
)
type Store interface {
Read(...ReadOption) ([]*Record, error)
Write([]*Record) error
String() string
}
type Record struct {
Id string
Value interface{}
}
type ReadOptions struct {
Id string
}
type ReadOption func(o *ReadOptions)
var (
ErrNotFound = errors.New("not found")
)