data

package
v0.0.0-...-b4b79d4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrSessionNotFound

type ErrSessionNotFound struct{}

func (*ErrSessionNotFound) Error

func (e *ErrSessionNotFound) Error() string

func (*ErrSessionNotFound) ImplementsSessionNotFoundError

func (e *ErrSessionNotFound) ImplementsSessionNotFoundError()

type ErrTooManySessions

type ErrTooManySessions struct{}

func (*ErrTooManySessions) Error

func (e *ErrTooManySessions) Error() string

func (*ErrTooManySessions) ImplementsTooManySessionsError

func (e *ErrTooManySessions) ImplementsTooManySessionsError()

type Storage

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

func (*Storage) Close

func (s *Storage) Close(ctx context.Context) (err error)

func (*Storage) EndAllSessions

func (s *Storage) EndAllSessions(ctx context.Context, userId string) (err error)

func (*Storage) EndSession

func (s *Storage) EndSession(ctx context.Context, userId string, sessionId int64) (err error)

func (*Storage) Open

func (s *Storage) Open() error

func (*Storage) SessionKeyInfo

func (s *Storage) SessionKeyInfo(ctx context.Context, key string) (userId string, sessionId int64, err error)

func (*Storage) StartNewSession

func (s *Storage) StartNewSession(ctx context.Context, userId, ip, agent string) (id int64, key string, err error)

func (*Storage) UpdateSessionInfo

func (s *Storage) UpdateSessionInfo(ctx context.Context, userId string, sessionId int64, info map[string]interface{}) (err error)

func (*Storage) UserSessionsV1

func (s *Storage) UserSessionsV1(ctx context.Context, userId string) (sessions *models.UserSessionsV1, err error)

Jump to

Keyboard shortcuts

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