person

package
v0.0.0-...-8132f3d Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlePerson

func HandlePerson(w http.ResponseWriter, r *http.Request)

GET person handler

Types

type PersonRequest

type PersonRequest struct {
	Sex          data.Sex         `schema:"sex"`
	Group        data.PersonGroup `schema:"group"`
	DomainName   string           `schema:"domain-name"`
	DomainSuffix string           `schema:"domain-suffix"`
}

GET person request URL parameters

type PersonResponse

type PersonResponse struct {
	FirstName string `json:"first-name"`
	LastName  string `json:"last-name"`
	Email     string `json:"email"`
	Trivia    string `json:"trivia"`
}

GET person request response body

func (*PersonResponse) FromPerson

func (personResponse *PersonResponse) FromPerson(person data.Person, personRequest PersonRequest)

update person response using person

Jump to

Keyboard shortcuts

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