service

package
v0.0.0-...-2eaac6a Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserAlreadyExists  = errors.New("email already in use")
	ErrInvalidKeyLength   = errors.New("cryptographic keys must be correct length")
	ErrUserNotFound       = errors.New("user not found")
	ErrInvalidCredentials = errors.New("invalid user credentials")
)

Functions

This section is empty.

Types

type AuthService

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

func NewAuthService

func NewAuthService(q *db.Queries, m *token.JWTManager) *AuthService

func (*AuthService) InitLogin

func (*AuthService) Login

func (s *AuthService) Login(ctx context.Context, req dto.LoginRequest) (dto.User, string, error)

func (*AuthService) RegisterUser

func (s *AuthService) RegisterUser(ctx context.Context, req dto.RegisterRequest) error

type UserService

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

func NewUserService

func NewUserService(q *db.Queries) *UserService

func (*UserService) GetUser

func (s *UserService) GetUser(ctx context.Context, id uuid.UUID) (dto.User, error)

func (*UserService) LookupUser

func (s *UserService) LookupUser(ctx context.Context, emailHash []byte) (dto.UserLookup, error)

func (*UserService) LookupUsers

func (s *UserService) LookupUsers(ctx context.Context, ids []uuid.UUID) ([]dto.UserLookup, error)

Jump to

Keyboard shortcuts

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