Documentation
¶
Index ¶
- func RegisterEditEndpoints(api huma.API, pathPrefix string, registry service.RegistryService, ...)
- func RegisterHealthEndpoint(api huma.API, pathPrefix string, cfg *config.Config, ...)
- func RegisterPingEndpoint(api huma.API, pathPrefix string)
- func RegisterPublishEndpoint(api huma.API, pathPrefix string, registry service.RegistryService, ...)
- func RegisterServersEndpoints(api huma.API, pathPrefix string, registry service.RegistryService)
- func RegisterVersionEndpoint(api huma.API, pathPrefix string, versionInfo *VersionBody)
- type EditServerInput
- type HealthBody
- type ListServersInput
- type PingBody
- type PublishServerInput
- type Response
- type ServerDetailInput
- type ServerVersionDetailInput
- type ServerVersionsInput
- type VersionBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterEditEndpoints ¶
func RegisterEditEndpoints(api huma.API, pathPrefix string, registry service.RegistryService, cfg *config.Config)
RegisterEditEndpoints registers the edit endpoint with a custom path prefix
func RegisterHealthEndpoint ¶
func RegisterHealthEndpoint(api huma.API, pathPrefix string, cfg *config.Config, metrics *telemetry.Metrics)
RegisterHealthEndpoint registers the health check endpoint with a custom path prefix
func RegisterPingEndpoint ¶
func RegisterPingEndpoint(api huma.API, pathPrefix string)
RegisterPingEndpoint registers the ping endpoint with a custom path prefix
func RegisterPublishEndpoint ¶
func RegisterPublishEndpoint(api huma.API, pathPrefix string, registry service.RegistryService, cfg *config.Config)
RegisterPublishEndpoint registers the publish endpoint with a custom path prefix
func RegisterServersEndpoints ¶
func RegisterServersEndpoints(api huma.API, pathPrefix string, registry service.RegistryService)
RegisterServersEndpoints registers all server-related endpoints with a custom path prefix
func RegisterVersionEndpoint ¶ added in v1.3.3
func RegisterVersionEndpoint(api huma.API, pathPrefix string, versionInfo *VersionBody)
RegisterVersionEndpoint registers the version endpoint with a custom path prefix
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
type VersionBody ¶ added in v1.3.3
type VersionBody struct {
Version string `json:"version" example:"v1.0.0" doc:"Application version"`
GitCommit string `json:"git_commit" example:"abc123d" doc:"Git commit SHA"`
BuildTime string `json:"build_time" example:"2025-10-14T12:00:00Z" doc:"Build timestamp"`
}
VersionBody represents the version information