v1

package
v0.0.0-...-3beaeaf Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 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 CountryHandler

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

func NewCountryHandler

func NewCountryHandler(svc CountryService) *CountryHandler

func (*CountryHandler) HandleSumPopulationByState

func (h *CountryHandler) HandleSumPopulationByState(w http.ResponseWriter, r *http.Request)

HandleSumPopulationByState godoc @Summary Sum the total population by state @Tags countries @Produce json @Param request body request.SumPopulationByState true "request body" @Success 200 {object} []domain.State @Failure 400 {object} response.Err @Failure 500 {object} response.Err @Router /countries/sum-population-by-state [post]

type CountryService

type CountryService interface {
	SumPopulationByState(ctx context.Context, states []domain.State) uint
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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