controller

package
v0.0.0-...-10ac1cd Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserController

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

UserController represents the user controller.

func New

func New(userService UserService) *UserController

New creates a new UserController instance.

func (*UserController) Cancel

func (uc *UserController) Cancel()

func (*UserController) CreateUser

func (uc *UserController) CreateUser(c *fiber.Ctx) error

CreateUser handles the creation of a new user.

func (*UserController) GetUserByID

func (uc *UserController) GetUserByID(c *fiber.Ctx) error

GetUserByID retrieves a user by their ID.

func (*UserController) RegisterRoutes

func (uc *UserController) RegisterRoutes(router fiber.Router)

RegisterRoutes registers user-related HTTP routes.

type UserService

type UserService interface {
	CreateUser(ctx context.Context, user dto.UserCreationDTO) (*models.User, error)
	GetUserByID(ctx context.Context, userID string) (*models.User, error)
}

UserService represents the user service interface.

Jump to

Keyboard shortcuts

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