Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Config is the global configuration instance Config AppConfig // ConfigFile is the path to the configuration file ConfigFile string )
var ( // Logger is the global logger instance Logger *zap.SugaredLogger )
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ExportDefaultConfig ¶
ExportDefaultConfig writes a default configuration file to the specified path
func WriteConfigFile ¶
WriteConfigFile writes the current configuration to a file
Types ¶
type AppConfig ¶
type AppConfig struct {
Logging struct {
Level string `mapstructure:"level"`
Format string `mapstructure:"format"`
} `mapstructure:"logging"`
Server struct {
Port int `mapstructure:"port"`
SpecsDir string `mapstructure:"specs_dir"`
} `mapstructure:"server"`
GitHub struct {
Token string `mapstructure:"token"`
} `mapstructure:"github"`
Specs []string `mapstructure:"specs"`
}
AppConfig is the main application configuration structure
type MCPHandler ¶
type MCPHandler struct {
// contains filtered or unexported fields
}
MCPHandler handles OpenAPI specs and MCP requests
func (*MCPHandler) GetSpec ¶
func (h *MCPHandler) GetSpec(w http.ResponseWriter, r *http.Request)
GetSpec gets a registered OpenAPI specification
func (*MCPHandler) ListEndpoints ¶
func (h *MCPHandler) ListEndpoints(w http.ResponseWriter, r *http.Request)
ListEndpoints lists all endpoints in a registered OpenAPI specification
func (*MCPHandler) RegisterSpec ¶
func (h *MCPHandler) RegisterSpec(w http.ResponseWriter, r *http.Request)
RegisterSpec registers a new OpenAPI specification
type MCPRequest ¶
type MCPRequest struct {
Query string `json:"query"`
}
MCPRequest represents a request to the MCP server
type MCPResponse ¶
type MCPResponse struct {
Context string `json:"context"`
}
MCPResponse represents a response from the MCP server