session

package
v0.0.0-...-5122af3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSessionNotFound = errors.New("sessionID not found")

Functions

This section is empty.

Types

type ID

type ID struct {
	ID string
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(ctx context.Context, cfg config.Redis) (*Manager, error)

func (*Manager) Check

func (sm *Manager) Check(ctx context.Context, in *ID) (*Session, error)

func (*Manager) Create

func (sm *Manager) Create(ctx context.Context, in *Session) (*ID, error)

func (*Manager) Delete

func (sm *Manager) Delete(ctx context.Context, in *ID) error

type Session

type Session struct {
	Login  string
	UserID int
}

Jump to

Keyboard shortcuts

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