Documentation
¶
Index ¶
- func RegisterEditEndpoints(api huma.API, registry service.RegistryService, cfg *config.Config)
- func RegisterHealthEndpoint(api huma.API, cfg *config.Config, metrics *telemetry.Metrics)
- func RegisterPingEndpoint(api huma.API)
- func RegisterPublishEndpoint(api huma.API, registry service.RegistryService, cfg *config.Config)
- func RegisterServersEndpoints(api huma.API, registry service.RegistryService)
- type EditServerInput
- type HealthBody
- type ListServersInput
- type PingBody
- type PublishServerInput
- type Response
- type ServerDetailInput
- type ServerVersionDetailInput
- type ServerVersionsInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterEditEndpoints ¶
func RegisterEditEndpoints(api huma.API, registry service.RegistryService, cfg *config.Config)
RegisterEditEndpoints registers the edit endpoint
func RegisterHealthEndpoint ¶
RegisterHealthEndpoint registers the health check endpoint
func RegisterPingEndpoint ¶
func RegisterPingEndpoint(api huma.API)
RegisterPingEndpoint registers the ping endpoint
func RegisterPublishEndpoint ¶
func RegisterPublishEndpoint(api huma.API, registry service.RegistryService, cfg *config.Config)
RegisterPublishEndpoint registers the publish endpoint
func RegisterServersEndpoints ¶
func RegisterServersEndpoints(api huma.API, registry service.RegistryService)
RegisterServersEndpoints registers all server-related endpoints
Types ¶
type EditServerInput ¶
type EditServerInput struct { Authorization string `header:"Authorization" doc:"Registry JWT token with edit permissions" required:"true"` ServerName string `path:"serverName" doc:"URL-encoded server name" example:"com.example%2Fmy-server"` Version string `path:"version" doc:"URL-encoded version to edit" example:"1.0.0"` Status string `` /* 126-byte string literal not displayed */ Body apiv0.ServerJSON `body:""` }
EditServerInput represents the input for editing a server
type HealthBody ¶
type HealthBody struct { Status string `json:"status" example:"ok" doc:"Health status"` GitHubClientID string `json:"github_client_id,omitempty" doc:"GitHub OAuth App Client ID"` }
HealthBody represents the health check response body
type ListServersInput ¶
type ListServersInput struct { Cursor string `query:"cursor" doc:"Pagination cursor" required:"false" example:"server-cursor-123"` Limit int `query:"limit" doc:"Number of items per page" default:"30" minimum:"1" maximum:"100" example:"50"` UpdatedSince string `` /* 137-byte string literal not displayed */ Search string `query:"search" doc:"Search servers by name (substring match)" required:"false" example:"filesystem"` Version string `` /* 137-byte string literal not displayed */ }
ListServersInput represents the input for listing servers
type PingBody ¶
type PingBody struct {
Pong bool `json:"pong" example:"true" doc:"Ping response"`
}
PingBody represents the ping response body
type PublishServerInput ¶
type PublishServerInput struct { Authorization string `header:"Authorization" doc:"Registry JWT token (obtained from /v0/auth/token/github)" required:"true"` Body apiv0.ServerJSON `body:""` }
PublishServerInput represents the input for publishing a server
type Response ¶
type Response[T any] struct { Body T }
Response is a generic wrapper for Huma responses Usage: Response[HealthBody] instead of HealthOutput
type ServerDetailInput ¶
type ServerDetailInput struct {
ServerName string `path:"serverName" doc:"URL-encoded server name" example:"com.example%2Fmy-server"`
}
ServerDetailInput represents the input for getting server details
type ServerVersionDetailInput ¶ added in v1.2.1
type ServerVersionDetailInput struct { ServerName string `path:"serverName" doc:"URL-encoded server name" example:"com.example%2Fmy-server"` Version string `path:"version" doc:"URL-encoded server version" example:"1.0.0"` }
ServerVersionDetailInput represents the input for getting a specific version
type ServerVersionsInput ¶ added in v1.1.0
type ServerVersionsInput struct {
ServerName string `path:"serverName" doc:"URL-encoded server name" example:"com.example%2Fmy-server"`
}
ServerVersionsInput represents the input for listing all versions of a server