Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResponseData ¶
BaseResponseData is a wrapper for api response
type EmptyRequestBody ¶
type EmptyRequestBody = struct {
Lang string `header:"Accept-Language"`
}
EmptyRequestBody is an alias for *struct{}
type EmptyResponseData ¶
type EmptyResponseData = *struct{}
EmptyResponseData is an alias for *struct{}
type ResponseData ¶
type ResponseData[T any] struct { Body BaseResponseData[T] }
ResponseData is a client response. This must have Body property to fullfill huma.API standard
func RespondMsg ¶
func RespondMsg(msg string) *ResponseData[EmptyResponseData]
RespondOKWith will generate response but only {"message": "Your message here"}
func RespondOK ¶
func RespondOK() *ResponseData[EmptyResponseData]
RespondOK will generate ok but only {"message": "OK"}
func RespondOKWith ¶
func RespondOKWith[T any](response T) *ResponseData[T]
RespondOKWith will generate response along with data
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) API ¶
func (s *Server) API() huma.API
API represents a Huma API wrapping a specific router.
func (*Server) Group ¶
Group create a new route group. It is recommended that you dont call APIGen.AddBasePath again, because that is already handled for you.
Click to show internal directories.
Click to hide internal directories.