Handler is a standard interface to a storage backend, used by AuthorisationManager to read and write key values to the backend.
| 27 | // Handler is a standard interface to a storage backend, used by AuthorisationManager to read and write key values to |
| 28 | // the backend. |
| 29 | type Handler interface { |
| 30 | GetKey(string) (string, error) // Returned string is expected to be a JSON object (user.SessionState) |
| 31 | GetMultiKey([]string) ([]string, error) |
| 32 | GetRawKey(string) (string, error) |
| 33 | SetKey(string, string, int64) error // Second input string is expected to be a JSON object (user.SessionState) |
| 34 | SetRawKey(string, string, int64) error |
| 35 | SetExp(string, int64) error // Set key expiration |
| 36 | GetExp(string) (int64, error) // Returns expiry of a key |
| 37 | GetKeys(string) []string |
| 38 | DeleteKey(string) bool |
| 39 | DeleteAllKeys() bool |
| 40 | DeleteRawKey(string) bool |
| 41 | Connect() bool |
| 42 | GetKeysAndValues() map[string]string |
| 43 | GetKeysAndValuesWithFilter(string) map[string]string |
| 44 | DeleteKeys([]string) bool |
| 45 | Decrement(string) |
| 46 | IncrememntWithExpire(string, int64) int64 |
| 47 | SetRollingWindow(key string, per int64, val string, pipeline bool) (int, []interface{}) |
| 48 | GetRollingWindow(key string, per int64, pipeline bool) (int, []interface{}) |
| 49 | GetSet(string) (map[string]string, error) |
| 50 | AddToSet(string, string) |
| 51 | GetAndDeleteSet(string) []interface{} |
| 52 | RemoveFromSet(string, string) |
| 53 | DeleteScanMatch(string) bool |
| 54 | GetKeyPrefix() string |
| 55 | AddToSortedSet(string, string, float64) |
| 56 | GetSortedSetRange(string, string, string) ([]string, []float64, error) |
| 57 | RemoveSortedSetRange(string, string, string) error |
| 58 | GetListRange(string, int64, int64) ([]string, error) |
| 59 | RemoveFromList(string, string) error |
| 60 | AppendToSet(string, string) |
| 61 | Exists(string) (bool, error) |
| 62 | } |
| 63 | |
| 64 | // AnalyticsHandler defines the interface for analytics. |
| 65 | type AnalyticsHandler interface { |
no outgoing calls
no test coverage detected
searching dependent graphs…