user

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package user provides HTTP handlers for user-related actions such as registration and login. It handles public and protected routes related to user authentication and manages user data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UserRepository  irepository.IUserRepository
	RegisterHandler icmd.IHandler[*registercmd.Command, *auth.Result]
	LoginHandler    iquery.IHandler[*loginqry.Query, *auth.Result]
}

Config holds the dependencies needed to create a Handler.

type Handler

type Handler struct {
	baseapi.BaseHandler
	// contains filtered or unexported fields
}

Handler manages HTTP requests related to user actions such as registration and login.

func NewHandler

func NewHandler(config Config) *Handler

NewHandler creates a new Handler with the given configuration.

func (*Handler) RegisterProtected

func (h *Handler) RegisterProtected(router *mux.Router)

RegisterProtectedRoutes registers routes that require authentication. This method is a placeholder and currently does not register any routes.

func (*Handler) RegisterPublic

func (h *Handler) RegisterPublic(router *mux.Router)

RegisterPublicRoutes registers public routes for user registration and login. These routes are accessible without authentication.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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