github.com/crewjam/saml@v0.4.14/samlidp/store.go (about) 1 package samlidp 2 3 import "errors" 4 5 // ErrNotFound is returned from Store.Get() when a stored item is not present 6 var ErrNotFound = errors.New("not found") 7 8 // Store is an interface that describes an abstract key-value store. 9 type Store interface { 10 // Get fetches the data stored in `key` and unmarshals it into `value`. 11 Get(key string, value interface{}) error 12 13 // Put marshals `value` and stores it in `key`. 14 Put(key string, value interface{}) error 15 16 // Delete removes `key` 17 Delete(key string) error 18 19 // List returns all the keys that start with `prefix`. The prefix is 20 // stripped from each returned value. So if keys are ["aa", "ab", "cd"] 21 // then List("a") would produce []string{"a", "b"} 22 List(prefix string) ([]string, error) 23 }