Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHealthCheck ¶
AddHealthCheck adds a standard health check endpoint to a Huma API
func CustomHealthCheck ¶
func CustomHealthCheck(api huma.API, path string, healthFunc func(ctx context.Context) (*HealthResponse, error))
CustomHealthCheck allows users to provide their own health check logic
func Greet ¶
func Greet(api huma.API, opts GreetOptions)
Greet displays the GoFlux logo and service information
func QuickGreet ¶
QuickGreet is a simplified version that takes fewer parameters
Types ¶
type GreetOptions ¶
type GreetOptions struct {
ServiceName string
Version string
Host string
Port int
ProxyPort int
DevMode bool
DocsPath string // Optional: path to API docs (e.g., "/api/docs")
OpenAPIPath string // Optional: path to OpenAPI spec (e.g., "/api/openapi")
}
GreetOptions configures the greeting display
type HealthResponse ¶
type HealthResponse struct {
Body struct {
Status string `json:"status" example:"ok" doc:"Service status"`
Message string `json:"message,omitempty" example:"Service is running" doc:"Optional status message"`
Version string `json:"version,omitempty" example:"1.0.0" doc:"Optional service version"`
}
}
HealthResponse represents a standard health check response
Click to show internal directories.
Click to hide internal directories.