bottin-ag/apiresponse/apiresponse.go

44 lines
978 B
Go

// Package apiresponse provides response types for API routes
package apiresponse
import (
"codeberg.org/vlbeaudoin/voki/response"
"git.agecem.com/agecem/bottin-ag/dbstruct"
)
// HealthGET is the response type for `GET /v:version/health/ http/1.1`
type HealthGET struct {
response.ResponseWithError
Data struct {
BottinStatus string
}
}
// ScanGET is the response type for `GET /v:version/scan/ http/1.1`
type ScanGET struct {
response.ResponseWithError
Data struct {
IsScanned bool
}
}
// ScanPOST is the response type for `POST /v:version/scan/ http/1.1`
type ScanPOST struct {
response.ResponseWithError
}
// DecompteGET is the response type for `GET /v:version/decompte/ http/1.1`
type DecompteGET struct {
response.ResponseWithError
Data struct {
Decompte int
}
}
// PresencesGET is the response type for `GET /v:version/presences/ http/1.1`
type PresencesGET struct {
response.ResponseWithError
Data struct {
Presences []dbstruct.Presence
}
}