delivery

package
v0.0.0-...-3122bcc Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAuthService

type IAuthService interface {
	AddUser(ctx context.Context, email string, password string) (string, error)
	LoginUser(ctx context.Context, email string, password string) (string, error)
	Delete(ctx context.Context, rawJwt string) (string, error)
	Check(ctx context.Context, rawJwt string) (uint64, error)
}

type SessionManager

type SessionManager struct {
	auth.UnimplementedSessionMangerServer
	// contains filtered or unexported fields
}

func NewSessionManager

func NewSessionManager(pool *pgxpool.Pool, authService IAuthService) (*SessionManager, error)

func (*SessionManager) Check

func (s *SessionManager) Check(ctx context.Context, sessionUser *auth.Session) (*auth.UserID, error)

func (*SessionManager) Create

func (s *SessionManager) Create(ctx context.Context, user *auth.User) (*auth.Session, error)

func (*SessionManager) Delete

func (s *SessionManager) Delete(ctx context.Context, sessionUser *auth.Session) (*auth.Session, error)

func (*SessionManager) Login

func (s *SessionManager) Login(ctx context.Context, user *auth.User) (*auth.Session, error)

Jump to

Keyboard shortcuts

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