repo

package
v0.0.0-...-9265221 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL