Documentation ¶
Index ¶
- type InMemorySessionRepository
- func (repo *InMemorySessionRepository) CreateSession(session models.Session) (models.Session, error)
- func (repo *InMemorySessionRepository) DeleteSession(id string) error
- func (repo *InMemorySessionRepository) Find(realm, userID string) []models.Session
- func (repo *InMemorySessionRepository) GetSessionByID(id string) (models.Session, bool)
- type SessionRepository
- type SessionRepositoryRedis
- func (repo *SessionRepositoryRedis) CreateSession(session models.Session) (models.Session, error)
- func (repo *SessionRepositoryRedis) DeleteSession(id string) error
- func (repo *SessionRepositoryRedis) Find(realm, userID string) []models.Session
- func (repo *SessionRepositoryRedis) GetSessionByID(id string) (models.Session, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemorySessionRepository ¶
func NewInMemorySessionRepository ¶
func NewInMemorySessionRepository(sessions []models.Session) *InMemorySessionRepository
func (*InMemorySessionRepository) CreateSession ¶
func (*InMemorySessionRepository) DeleteSession ¶
func (repo *InMemorySessionRepository) DeleteSession(id string) error
func (*InMemorySessionRepository) Find ¶
func (repo *InMemorySessionRepository) Find(realm, userID string) []models.Session
func (*InMemorySessionRepository) GetSessionByID ¶
func (repo *InMemorySessionRepository) GetSessionByID(id string) (models.Session, bool)
type SessionRepository ¶
type SessionRepositoryRedis ¶
type SessionRepositoryRedis struct {
// contains filtered or unexported fields
}
func NewSessionRepositoryRedis ¶
func NewSessionRepositoryRedis(addr, pass string, db int) SessionRepositoryRedis
func (*SessionRepositoryRedis) CreateSession ¶
func (*SessionRepositoryRedis) DeleteSession ¶
func (repo *SessionRepositoryRedis) DeleteSession(id string) error
func (*SessionRepositoryRedis) Find ¶
func (repo *SessionRepositoryRedis) Find(realm, userID string) []models.Session
func (*SessionRepositoryRedis) GetSessionByID ¶
func (repo *SessionRepositoryRedis) GetSessionByID(id string) (models.Session, bool)
Click to show internal directories.
Click to hide internal directories.