handler

package
v0.0.0-...-1afdef6 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateStudentpayload

type CreateStudentpayload struct {
	FirstName string `json:"firstName" binding:"required"`
	LastName  string `json:"lastName" binding:"required"`
	Email     string `json:"email" binding:"required,email"`
	Age       int    `json:"age" binding:"required,gte=0,lte=150"`
	Sex       string `json:"sex" binding:"required,oneof=M F Other"`
}

type Handler

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

func NewHandler

func NewHandler(store repository.Storage) *Handler

func (*Handler) CreateStudentHandler

func (h *Handler) CreateStudentHandler(c *gin.Context)

func (*Handler) DeleteStudentHandler

func (h *Handler) DeleteStudentHandler(c *gin.Context)

func (*Handler) GetStudentByID

func (h *Handler) GetStudentByID(c *gin.Context)

func (*Handler) UpdateStudentHandler

func (h *Handler) UpdateStudentHandler(c *gin.Context)

Jump to

Keyboard shortcuts

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