session

package
v0.0.0-...-8717a1f Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricKeys = []string{"method"}
)

Functions

func WithConfiguration

func WithConfiguration(cfg *config.Configuration) func(service *service)

func WithKeyValueService

func WithKeyValueService(keyValueService userland.KeyValueService) func(service *service)

func WithSessionRepository

func WithSessionRepository(sessionRepository userland.SessionRepository) func(service *service)

Types

type Service

type Service interface {
	CreateSession(userID int, session userland.Session) error
	ListSession(userID int) (userland.Sessions, error)
	EndSession(userID int, currentSessionID string) error
	EndOtherSessions(userID int, currentSessionID string) error
	CreateRefreshToken(user userland.User, currentSessionID string) (security.AccessToken, error)
	CreateNewAccessToken(user userland.User, refreshTokenID string) (security.AccessToken, error)
}

Service provide an interface to story domain service

func NewInstrumentorService

func NewInstrumentorService(latency metrics.Histogram, s Service) Service

func NewService

func NewService(options ...func(*service)) Service

Jump to

Keyboard shortcuts

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