Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserHandler ¶
type UserHandler struct { UserService *domain.UserService AuthMiddleware *authmiddleware.AuthMiddleware }
UserHandler is the handler that manages operations on Users for the API.
func Provide ¶
func Provide(userService domain.UserService, authMiddleware *authmiddleware.AuthMiddleware) *UserHandler
Provide provides a new UserHandler containing the given UserService and AuthMiddleware.
func (*UserHandler) GetAllUsers ¶
func (u *UserHandler) GetAllUsers(c *gin.Context)
GetAllUsers gets all users.
func (*UserHandler) Register ¶
func (u *UserHandler) Register(parentGroup *gin.RouterGroup) error
Register creates 3 endpoints to manage Users. / (POST) - RegisterUser / (GET) - GetAllUsers /:userid (GET) - GetUser
func (*UserHandler) RegisterUser ¶
func (u *UserHandler) RegisterUser(c *gin.Context)
RegisterUser attempts to register the given user retrieved from the body as JSON.
Click to show internal directories.
Click to hide internal directories.