sessions

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Querier

type Querier interface {
	CountActiveAuthSessions(ctx context.Context) (int64, error)
	CountActiveAuthSessionsByUserID(ctx context.Context, arg db.CountActiveAuthSessionsByUserIDParams) (int64, error)
	GetAuthSessionByID(ctx context.Context, arg db.GetAuthSessionByIDParams) (db.AuthSession, error)
	GetUserByID(ctx context.Context, arg db.GetUserByIDParams) (db.User, error)
	ListActiveAuthSessionsByUserPage(ctx context.Context, arg db.ListActiveAuthSessionsByUserPageParams) ([]db.AuthSession, error)
	ListActiveAuthSessionsPage(ctx context.Context, arg db.ListActiveAuthSessionsPageParams) ([]db.AuthSession, error)
	ListAuthSessionsByUserID(ctx context.Context, arg db.ListAuthSessionsByUserIDParams) ([]db.AuthSession, error)
	RevokeAllActiveAuthSessions(ctx context.Context, arg db.RevokeAllActiveAuthSessionsParams) (int64, error)
	RevokeAuthSession(ctx context.Context, arg db.RevokeAuthSessionParams) (db.AuthSession, error)
	RevokeOtherAuthSessionsForUser(ctx context.Context, arg db.RevokeOtherAuthSessionsForUserParams) (int64, error)
}

type Service

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

func NewService

func NewService(queries Querier) *Service

func (*Service) ListAdminSessionsPage

func (s *Service) ListAdminSessionsPage(ctx context.Context, currentSessionID string, limit, offset int32) (*api.AuthSessionPage, error)

func (*Service) ListProfileSessionsPage

func (s *Service) ListProfileSessionsPage(ctx context.Context, user db.User, currentSessionID string, limit, offset int32) (*api.AuthSessionPage, error)

func (*Service) RevokeAdminSession

func (s *Service) RevokeAdminSession(ctx context.Context, sessionID uuid.UUID) error

func (*Service) RevokeAllAdminSessions

func (s *Service) RevokeAllAdminSessions(ctx context.Context) error

func (*Service) RevokeOtherProfileSessions

func (s *Service) RevokeOtherProfileSessions(ctx context.Context, user db.User, currentSessionID string) error

func (*Service) RevokeProfileSession

func (s *Service) RevokeProfileSession(ctx context.Context, user db.User, sessionID uuid.UUID) error

func (*Service) ValidateSession

func (s *Service) ValidateSession(ctx context.Context, sessionID string) (bool, error)

Jump to

Keyboard shortcuts

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