Files
crowsnest/internal/data/IDatastore.go

13 lines
452 B
Go
Raw Normal View History

2024-12-27 22:34:43 +01:00
package data
2025-01-02 15:27:53 +01:00
// Defines the first layer of abstraction on the interface to a persistent data
// store. This may be a file or database.
2024-12-27 22:34:43 +01:00
type IDatastore interface {
Set(key string, val string) error
KeyExists(key string) (bool, error)
Get(key string) (string, error)
GetAll() (map[string]string, error)
GetAllKeys() (map[string]bool, error)
2024-12-28 01:28:36 +01:00
Delete(key string) error
2024-12-27 22:34:43 +01:00
}