v0

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

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

func RegisterHealthEndpoint(api huma.API, cfg *config.Config, metrics *telemetry.Metrics)

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"`
	ID            string           `path:"id" doc:"Server ID (UUID)" format:"uuid"`
	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 ListServersBody

type ListServersBody struct {
	Servers  []apiv0.ServerJSON `json:"servers" doc:"List of MCP servers with extensions"`
	Metadata *Metadata          `json:"metadata,omitempty" doc:"Pagination metadata"`
}

ListServersBody represents the paginated server list response body

type ListServersInput

type ListServersInput struct {
	Cursor       string `query:"cursor" doc:"Pagination cursor (UUID)" format:"uuid" required:"false" example:"550e8400-e29b-41d4-a716-446655440000"`
	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 Metadata

type Metadata struct {
	NextCursor string `json:"next_cursor,omitempty"`
	Count      int    `json:"count,omitempty"`
	Total      int    `json:"total,omitempty"`
}

Metadata contains pagination metadata

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 {
	ID string `path:"id" doc:"Server ID (UUID)" format:"uuid"`
}

ServerDetailInput represents the input for getting server details

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL