rest

package
v0.0.0-...-1309a47 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PersonController

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

PersonController is a struct that exposes person endpoints over HTTP.

func NewPersonController

func NewPersonController(personService *service.PersonService) *PersonController

NewPersonController creates a controller backed by a person service.

func (*PersonController) GetPerson

func (pc *PersonController) GetPerson(c *echo.Context) error

GetPerson godoc @Summary Get a person by ID @Description Get details of a specific person by their ID. @Tags persons @Accept json @Produce json @Param id path int true "Person ID" @Success 200 {object} ent.Person @Failure 400 {object} map[string]string @Failure 500 {object} map[string]string @Router /persons/{id} [get]

func (*PersonController) GetPersons

func (pc *PersonController) GetPersons(c *echo.Context) error

GetPersons godoc @Summary Get all persons @Description Get a list of all persons in the system. @Tags persons @Accept json @Produce json @Success 200 {array} ent.Person @Failure 500 {object} map[string]string @Router /persons [get]

Jump to

Keyboard shortcuts

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