Browse Source

rename

master v1.2.0
Lars Hoogestraat 1 month ago
parent
commit
f0149ef2d3
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      session_provider.go

+ 3
- 3
session_provider.go View File

@ -14,7 +14,7 @@ import (
type SessionProvider interface {
Create(sid string) *Session
Get(sid string) (*Session, error)
SessionsFromValues(key string, value interface{}) []Session
FindSessionsByValue(key string, value interface{}) []Session
Remove(sid string)
Clean(ticker *time.Ticker, timeoutAfter time.Duration)
}
@ -59,8 +59,8 @@ func (imp *InMemoryProvider) Get(sid string) (*Session, error) {
return nil, fmt.Errorf("no session with id %s found", sid)
}
//SessionIDsFromValues receives all session ids from the map found with the key and value
func (imp *InMemoryProvider) SessionsFromValues(key string, value interface{}) []Session {
//FindSessionsByValues finds all sessions from the map found by the key and value
func (imp *InMemoryProvider) FindSessionsByValue(key string, value interface{}) []Session {
imp.mutex.RLock()
defer imp.mutex.RUnlock()


Loading…
Cancel
Save