package backend import "time" // Session holds info about the logged-in user that won't change type Session struct { SessionID string Expiration time.Time UserID string LdapDN string } // SessionCache holds volatile information about the logged-in user type SessionCache struct { Valid bool Groups []string DisplayName string Email string } type Backend interface { PutSession(session Session, cache SessionCache) error GetSession(id string) (Session, *SessionCache, error) EndSession(id string) NewSessionID() (string, error) DoMaintenance() Ping() error }