authhttphandler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 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 AuthHandler

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

func NewAuthHandler

func NewAuthHandler(log *slog.Logger, db *sqlx.DB, authService *auth.AuthService) *AuthHandler

func (*AuthHandler) UserLogin

func (h *AuthHandler) UserLogin(c *gin.Context)

func (*AuthHandler) UserRegister

func (h *AuthHandler) UserRegister(c *gin.Context)

type AuthRequest

type AuthRequest struct {
	Name     string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type DefaultResponse

type DefaultResponse struct {
	Message string `json:"message"`
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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