Documentation
¶
Overview ¶
Package gateway provides client utilities for nself-ai-gateway (port 3761).
Purpose: Wrap HTTP calls to nself-ai-gateway, nself-ai-cc, and nself-ai-mcp
for use in CLI gateway commands.
Inputs: Port constants from internal/ports; JWT from internal/auth. Outputs: Typed structs for keys, quota, routes, service health. Constraints: Key material never returned in any output type. SPORT: F02 — nself gateway command group.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KeyInfo ¶
type KeyInfo struct {
ID string `json:"id"`
Provider string `json:"provider"`
Label string `json:"label"`
IsActive bool `json:"is_active"`
CreatedAt time.Time `json:"created_at"`
}
KeyInfo is the public representation of a gateway key. Key material is intentionally absent — never returned from the gateway list endpoint.
type QuotaRow ¶
type QuotaRow struct {
Provider string `json:"provider"`
Model string `json:"model"`
Used int64 `json:"used"`
Limit int64 `json:"limit"`
ResetAt string `json:"reset_at"`
}
QuotaRow represents one quota usage row.
type RouteRow ¶
type RouteRow struct {
ID string `json:"id"`
Provider string `json:"provider"`
Model string `json:"model"`
Target string `json:"target"`
Active bool `json:"active"`
}
RouteRow represents one routing rule in the gateway.
type ServiceHealth ¶
ServiceHealth reports the health of one AI service.