store: add ErrResourceDoesNotExist and update memory implementation

This commit is contained in:
Leo Balduf
2016-05-01 17:56:07 -04:00
parent a081e5195b
commit 468eefee57
10 changed files with 81 additions and 29 deletions
+8
View File
@@ -10,8 +10,16 @@ var stringStoreDrivers = make(map[string]StringStoreDriver)
// StringStore represents an interface for manipulating strings.
type StringStore interface {
// PutString adds the given string to the StringStore.
PutString(s string) error
// HasString returns whether or not the StringStore contains the given
// string.
HasString(s string) (bool, error)
// RemoveString removes the string from the string store.
// Returns ErrResourceDoesNotExist if the given string is not contained
// in the store.
RemoveString(s string) error
}