Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InMemorySessionRepository ¶
type InMemorySessionRepository struct {
// contains filtered or unexported fields
}
InMemorySessionRepository is a Session repository, stores sessions in memory
func NewInMemorySessionRepository ¶
func NewInMemorySessionRepository(sessions map[string]models.Session) *InMemorySessionRepository
NewInMemorySessionRepository creates new in memory session repository
func (*InMemorySessionRepository) GetSession ¶
func (sr *InMemorySessionRepository) GetSession(id string) (session models.Session, exists bool)
type RestSessionRepository ¶
type RestSessionRepository struct {
// contains filtered or unexported fields
}
func (*RestSessionRepository) GetSession ¶
func (sr *RestSessionRepository) GetSession(id string) (session models.Session, exists bool)
type SessionRepository ¶
type SessionRepository interface { //returns sesson and existing flag GetSession(id string) (session models.Session, exists bool) }
SessionRepository is generic interface for different implementations
func GetSessionRepository ¶
func GetSessionRepository() SessionRepository
Click to show internal directories.
Click to hide internal directories.