routes

package
v0.0.0-...-cce9f1c Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterEvaluate

func RegisterEvaluate(api huma.API) error

func RegisterHealhtz

func RegisterHealhtz(api huma.API) error

func RegisterIndex

func RegisterIndex(api huma.API) error

Types

type EvaluateInput

type EvaluateInput struct {
	Body EvaluateInputBody
}

type EvaluateInputBody

type EvaluateInputBody struct {
	Age       int                     `json:"age" min:"4" example:"24" doc:"Age of the participant"`
	Gender    string                  `json:"gender" enum:"female,male" example:"female" doc:"Biological sex of the participant"`
	Challenge string                  `json:"challenge" enum:"hfit4,hfit6" example:"hfit4" doc:"Type of challenge"`
	Exercises []EvaluateInputExercise `json:"exercises" doc:"Results of the exercises performed by the participant"`
}

type EvaluateInputExercise

type EvaluateInputExercise struct {
	Name   string  `json:"name" example:"situp" doc:"Name of the exercise"`
	Result float32 `json:"result" min:"0" example:"1.92" doc:"Score of the exercise (use minutes.seconds for time units)"`
}

type EvaluateOutput

type EvaluateOutput struct {
	Body EvaluateOutputBody
}

type EvaluateOutputBody

type EvaluateOutputBody struct {
	Total     float32                           `json:"total" example:"101" doc:"Final score"`
	TotalMax  float32                           `json:"total_max" example:"140" doc:"Maximum score possible"`
	Exercises map[string]EvaluateOutputExercise `json:"exercises" doc:"Scores acheived on the exercises"`
}

type EvaluateOutputExercise

type EvaluateOutputExercise struct {
	Score    float32 `json:"score" example:"50.5" doc:"Score on the exercise"`
	ScoreMax float32 `json:"score_max" example:"70" doc:"Maximum score possible"`
}

type HealhtzOutput

type HealhtzOutput struct {
	Body []byte `example:"Ok."`
}

type IndexOutput

type IndexOutput struct {
	Location string `header:"Location"`
}

Jump to

Keyboard shortcuts

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