store.go 482 B

12345678910111213141516171819
  1. package httpsession
  2. import "time"
  3. type Id string
  4. type Store interface {
  5. Get(id Id, key string) interface{}
  6. GetMultiple(id Id) map[string]interface{}
  7. Set(id Id, key string, value interface{})
  8. SetMultiple(id Id, m map[string]interface{}) error
  9. Del(id Id, keys ...string) bool
  10. Clear(id Id) bool
  11. Add(id Id)
  12. Exist(id Id) bool
  13. SetMaxAge(maxAge time.Duration)
  14. Run() error
  15. UpdateByCustomField(findkey string, findvalue interface{}, setkey string, setvalue interface{}) bool
  16. }