Documentation
¶
Overview ¶
Package api provides an HTTP API server for hawk, consumable by SDKs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "dev"
Version is the current hawk API surface version, exposed in the GET /version endpoint. It is wired at startup by main.go from the canonical version (the VERSION file at the repo root, injected via ldflags). The "dev" default applies only to local builds without ldflags.
Functions ¶
func SetVersion ¶ added in v0.2.0
func SetVersion(v string)
SetVersion lets main.go propagate the canonical hawk version into this package without creating an import cycle with cmd.
Types ¶
type ChatRequest ¶
ChatRequest is the request body for POST /chat.
type ChatResponse ¶
type ChatResponse struct {
Response string `json:"response"`
}
ChatResponse is the response body for POST /chat.
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
}
HealthResponse is the response body for GET /health.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the HTTP API server for hawk.
type VersionResponse ¶
type VersionResponse struct {
Version string `json:"version"`
}
VersionResponse is the response body for GET /version.