Documentation
¶
Index ¶
- func RegisterAdminEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
- func RegisterAll(humaAPI huma.API, router *chi.Mux, hctx *api.HandlerContext)
- func RegisterAllForExport(humaAPI huma.API, apiVersion string, cfg *config.Config)
- func RegisterCatalogEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
- func RegisterConfigEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
- func RegisterEvalEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
- func RegisterExplainEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
- func RegisterHealthEndpoints(humaAPI huma.API, hctx *api.HandlerContext)
- func RegisterProviderEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
- func RegisterSchemaEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
- func RegisterSnapshotEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
- func RegisterSolutionEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
- type AdminClearCacheResponse
- type AdminInfoResponse
- type AdminReloadRequest
- type AdminReloadResponse
- type CELEvalRequest
- type CELEvalResponse
- type CatalogDetailResponse
- type CatalogListItem
- type CatalogListResponse
- type CatalogSolutionItem
- type CatalogSolutionListResponse
- type CatalogSyncResponse
- type ConfigResponse
- type DiffChange
- type DiffRequest
- type DiffResponse
- type ExplainRequest
- type ExplainResponse
- type ProviderDetailResponse
- type ProviderListItem
- type ProviderListResponse
- type ProviderSchemaResponse
- type SchemaDetailResponse
- type SchemaListItem
- type SchemaListResponse
- type SchemaValidateRequest
- type SchemaValidateResponse
- type SchemaViolation
- type SettingsResponse
- type SnapshotListItem
- type SnapshotListResponse
- type SolutionDryRunRequest
- type SolutionDryRunResponse
- type SolutionInspectRequest
- type SolutionInspectResponse
- type SolutionLintRequest
- type SolutionLintResponse
- type SolutionRenderRequest
- type SolutionRenderResponse
- type SolutionRunRequest
- type SolutionRunResponse
- type SolutionTestRequest
- type SolutionTestResponse
- type TemplateEvalRequest
- type TemplateEvalResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAdminEndpoints ¶
func RegisterAdminEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
RegisterAdminEndpoints registers admin API endpoints.
func RegisterAll ¶
RegisterAll registers all API endpoints on the Huma API and chi router.
func RegisterAllForExport ¶
RegisterAllForExport registers all endpoints on a Huma API for OpenAPI spec generation without starting the server. It accepts an apiVersion so the exported spec matches the configured version, and an optional config so operation Security reflects auth settings.
func RegisterCatalogEndpoints ¶
func RegisterCatalogEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
RegisterCatalogEndpoints registers catalog-related API endpoints.
func RegisterConfigEndpoints ¶
func RegisterConfigEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
RegisterConfigEndpoints registers config and settings API endpoints.
func RegisterEvalEndpoints ¶
func RegisterEvalEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
RegisterEvalEndpoints registers CEL and template evaluation API endpoints.
func RegisterExplainEndpoints ¶
func RegisterExplainEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
RegisterExplainEndpoints registers explain and diff API endpoints.
func RegisterHealthEndpoints ¶
func RegisterHealthEndpoints(humaAPI huma.API, hctx *api.HandlerContext)
RegisterHealthEndpoints registers health and root endpoints. These are registered without a version prefix so they bypass auth middleware.
func RegisterProviderEndpoints ¶
func RegisterProviderEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
RegisterProviderEndpoints registers provider-related API endpoints.
func RegisterSchemaEndpoints ¶
func RegisterSchemaEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
RegisterSchemaEndpoints registers schema-related API endpoints.
func RegisterSnapshotEndpoints ¶
func RegisterSnapshotEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
RegisterSnapshotEndpoints registers snapshot-related API endpoints.
func RegisterSolutionEndpoints ¶
func RegisterSolutionEndpoints(humaAPI huma.API, hctx *api.HandlerContext, prefix string)
RegisterSolutionEndpoints registers solution-related API endpoints.
Types ¶
type AdminClearCacheResponse ¶
type AdminClearCacheResponse struct {
Body struct {
Success bool `json:"success" doc:"Whether cache clear succeeded"`
Message string `json:"message" maxLength:"500" doc:"Result message"`
}
}
AdminClearCacheResponse wraps cache clear result.
type AdminInfoResponse ¶
type AdminInfoResponse struct {
Body struct {
Version string `json:"version" maxLength:"50" doc:"Server version"`
Uptime string `json:"uptime" maxLength:"50" doc:"Server uptime"`
StartTime string `json:"startTime" maxLength:"50" doc:"Server start time"`
Providers int `json:"providers" doc:"Number of registered providers"`
}
}
AdminInfoResponse wraps admin server info.
type AdminReloadRequest ¶
type AdminReloadRequest struct {
Body struct{} // empty body
}
AdminReloadRequest is the request body for config reload.
type AdminReloadResponse ¶
type AdminReloadResponse struct {
Body struct {
Success bool `json:"success" doc:"Whether reload succeeded"`
Message string `json:"message" maxLength:"500" doc:"Result message"`
}
}
AdminReloadResponse wraps config reload result.
type CELEvalRequest ¶
type CELEvalRequest struct {
Body struct {
Expression string `json:"expression" maxLength:"10000" doc:"CEL expression to evaluate"`
Data map[string]any `json:"data,omitempty" doc:"Data context for expression evaluation"`
}
}
CELEvalRequest is the request body for CEL expression evaluation.
type CELEvalResponse ¶
type CELEvalResponse struct {
Body struct {
Result any `json:"result" doc:"Evaluation result"`
Type string `json:"type,omitempty" maxLength:"100" doc:"Result type"`
}
}
CELEvalResponse wraps a CEL evaluation result.
type CatalogDetailResponse ¶
type CatalogDetailResponse struct {
Body struct {
Name string `json:"name" maxLength:"255" doc:"Catalog name"`
Type string `json:"type" maxLength:"50" doc:"Catalog type"`
Path string `json:"path,omitempty" maxLength:"4096" doc:"Catalog path"`
URL string `json:"url,omitempty" maxLength:"2048" doc:"Catalog URL"`
Metadata map[string]string `json:"metadata,omitempty" doc:"Additional metadata"`
}
}
CatalogDetailResponse wraps a single catalog's details.
type CatalogListItem ¶
type CatalogListItem struct {
Name string `json:"name" maxLength:"255" doc:"Catalog name"`
Type string `json:"type" maxLength:"50" doc:"Catalog type"`
Path string `json:"path,omitempty" maxLength:"4096" doc:"Catalog path"`
URL string `json:"url,omitempty" maxLength:"2048" doc:"Catalog URL"`
}
CatalogListItem represents a catalog in API responses.
type CatalogListResponse ¶
type CatalogListResponse struct {
Body struct {
Items []CatalogListItem `json:"items" doc:"List of catalogs"`
Pagination api.PaginationInfo `json:"pagination" doc:"Pagination metadata"`
}
}
CatalogListResponse wraps a list of catalogs.
type CatalogSolutionItem ¶
type CatalogSolutionItem struct {
Name string `json:"name" maxLength:"255" doc:"Solution name"`
Version string `json:"version,omitempty" maxLength:"50" doc:"Solution version"`
Digest string `json:"digest,omitempty" maxLength:"255" doc:"Content digest"`
Catalog string `json:"catalog,omitempty" maxLength:"255" doc:"Source catalog name"`
}
CatalogSolutionItem represents a solution within a catalog in API responses.
type CatalogSolutionListResponse ¶
type CatalogSolutionListResponse struct {
Body struct {
Items []CatalogSolutionItem `json:"items" doc:"List of solutions"`
Pagination api.PaginationInfo `json:"pagination" doc:"Pagination metadata"`
}
}
CatalogSolutionListResponse wraps a list of solutions within a catalog.
type CatalogSyncResponse ¶
type CatalogSyncResponse struct {
Body struct {
Success bool `json:"success" doc:"Whether sync succeeded"`
Message string `json:"message" maxLength:"500" doc:"Result message"`
Catalogs int `json:"catalogs" doc:"Number of catalogs synced"`
}
}
CatalogSyncResponse wraps the catalog sync result.
type ConfigResponse ¶
type ConfigResponse struct {
Body struct {
Settings any `json:"settings,omitempty" doc:"Application settings"`
Catalogs any `json:"catalogs,omitempty" doc:"Catalog configurations"`
Logging any `json:"logging,omitempty" doc:"Logging configuration"`
Telemetry any `json:"telemetry,omitempty" doc:"Telemetry configuration"`
HTTPClient any `json:"httpClient,omitempty" doc:"HTTP client configuration"`
CEL any `json:"cel,omitempty" doc:"CEL configuration"`
GoTemplate any `json:"goTemplate,omitempty" doc:"Go template configuration"`
APIServer any `json:"apiServer,omitempty" doc:"API server configuration"`
}
}
ConfigResponse wraps configuration data.
type DiffChange ¶
type DiffChange struct {
Field string `json:"field" maxLength:"500" doc:"Changed field path"`
Type string `json:"type" maxLength:"20" doc:"Change type (added, removed, changed)"`
OldValue any `json:"oldValue,omitempty" doc:"Original value"`
NewValue any `json:"newValue,omitempty" doc:"New value"`
}
DiffChange represents a single change between two solutions.
type DiffRequest ¶
type DiffRequest struct {
Body struct {
SolutionA string `json:"solutionA" maxLength:"100000" doc:"First solution YAML"`
SolutionB string `json:"solutionB" maxLength:"100000" doc:"Second solution YAML"`
}
}
DiffRequest is the request body for solution diffing.
type DiffResponse ¶
type DiffResponse struct {
Body struct {
Changes []DiffChange `json:"changes" doc:"List of changes"`
Summary struct {
Total int `json:"total" doc:"Total changes"`
Added int `json:"added" doc:"Fields added"`
Removed int `json:"removed" doc:"Fields removed"`
Changed int `json:"changed" doc:"Fields changed"`
} `json:"summary" doc:"Change summary"`
}
}
DiffResponse wraps diff results.
type ExplainRequest ¶
type ExplainRequest struct {
Body struct {
Solution string `json:"solution" maxLength:"100000" doc:"Solution YAML content"`
}
}
ExplainRequest is the request body for solution explanation.
type ExplainResponse ¶
type ExplainResponse struct {
Body struct {
Name string `json:"name" maxLength:"255" doc:"Solution name"`
Description string `json:"description,omitempty" maxLength:"2000" doc:"Solution description"`
ResolverCount int `json:"resolverCount" doc:"Number of resolvers"`
HasWorkflow bool `json:"hasWorkflow" doc:"Whether the solution has a workflow"`
HasActions bool `json:"hasActions" doc:"Whether the solution has actions"`
Resolvers []string `json:"resolvers,omitempty" maxItems:"500" doc:"Resolver names"`
Tags []string `json:"tags,omitempty" maxItems:"50" doc:"Solution tags"`
}
}
ExplainResponse wraps explanation results.
type ProviderDetailResponse ¶
type ProviderDetailResponse struct {
Body struct {
Name string `json:"name" maxLength:"255" example:"http" doc:"Provider name"`
Version string `json:"version,omitempty" maxLength:"50" doc:"Provider version"`
Capabilities []string `json:"capabilities,omitempty" maxItems:"10" doc:"Provider capabilities"`
Category string `json:"category,omitempty" maxLength:"50" doc:"Provider category"`
Description string `json:"description,omitempty" maxLength:"1000" doc:"Provider description"`
InputSchema any `json:"inputSchema,omitempty" doc:"Input JSON schema"`
OutputSchemas any `json:"outputSchemas,omitempty" doc:"Output schemas by operation"`
}
}
ProviderDetailResponse wraps a single provider's details.
type ProviderListItem ¶
type ProviderListItem struct {
Name string `json:"name" maxLength:"255" example:"http" doc:"Provider name"`
Version string `json:"version,omitempty" maxLength:"50" example:"1.0.0" doc:"Provider version"`
Capabilities []string `json:"capabilities,omitempty" maxItems:"10" doc:"Provider capabilities"`
Category string `json:"category,omitempty" maxLength:"50" doc:"Provider category"`
Description string `json:"description,omitempty" maxLength:"1000" doc:"Provider description"`
}
ProviderListItem represents a provider in API responses.
type ProviderListResponse ¶
type ProviderListResponse struct {
Body struct {
Items []ProviderListItem `json:"items" doc:"List of providers"`
Pagination api.PaginationInfo `json:"pagination" doc:"Pagination metadata"`
}
}
ProviderListResponse wraps a list of providers.
type ProviderSchemaResponse ¶
type ProviderSchemaResponse struct {
Body struct {
Name string `json:"name" maxLength:"255" doc:"Provider name"`
SchemaData any `json:"schema" doc:"JSON Schema"`
}
}
ProviderSchemaResponse wraps a provider's JSON schema.
type SchemaDetailResponse ¶
type SchemaDetailResponse struct {
Body struct {
Name string `json:"name" maxLength:"255" doc:"Schema name"`
SchemaData any `json:"schema" doc:"JSON Schema"`
}
}
SchemaDetailResponse wraps a single schema.
type SchemaListItem ¶
type SchemaListItem struct {
Name string `json:"name" maxLength:"255" doc:"Schema name"`
}
SchemaListItem represents a schema in API responses.
type SchemaListResponse ¶
type SchemaListResponse struct {
Body struct {
Items []SchemaListItem `json:"items" doc:"List of schemas"`
Pagination api.PaginationInfo `json:"pagination" doc:"Pagination metadata"`
}
}
SchemaListResponse wraps a list of schemas.
type SchemaValidateRequest ¶
type SchemaValidateRequest struct {
Body struct {
Schema string `json:"schema,omitempty" maxLength:"255" doc:"Schema name (currently only 'solution' supported)" example:"solution"`
Data any `json:"data" doc:"Data to validate against the schema"`
}
}
SchemaValidateRequest is the request body for schema validation.
type SchemaValidateResponse ¶
type SchemaValidateResponse struct {
Body struct {
Valid bool `json:"valid" doc:"Whether the data is valid"`
Violations []SchemaViolation `json:"violations,omitempty" doc:"List of violations"`
}
}
SchemaValidateResponse wraps schema validation results.
type SchemaViolation ¶
type SchemaViolation struct {
Path string `json:"path" maxLength:"500" doc:"JSON path of the violation"`
Message string `json:"message" maxLength:"2000" doc:"Violation message"`
}
SchemaViolation represents a single schema violation.
type SettingsResponse ¶
type SettingsResponse struct {
Body struct {
DefaultCatalog string `json:"defaultCatalog,omitempty" maxLength:"255" doc:"Default catalog name"`
NoColor bool `json:"noColor" doc:"Color output disabled"`
Quiet bool `json:"quiet" doc:"Quiet mode enabled"`
}
}
SettingsResponse wraps runtime settings.
type SnapshotListItem ¶
type SnapshotListItem struct {
ID string `json:"id" maxLength:"255" doc:"Snapshot identifier"`
Solution string `json:"solution,omitempty" maxLength:"255" doc:"Source solution name"`
CreatedAt string `json:"createdAt,omitempty" maxLength:"50" doc:"Creation timestamp"`
}
SnapshotListItem represents a snapshot in API responses.
type SnapshotListResponse ¶
type SnapshotListResponse struct {
Body struct {
Items []SnapshotListItem `json:"items" doc:"List of snapshots"`
Pagination api.PaginationInfo `json:"pagination" doc:"Pagination metadata"`
}
}
SnapshotListResponse wraps a list of snapshots.
type SolutionDryRunRequest ¶
type SolutionDryRunRequest struct {
Body struct {
Path string `json:"path" minLength:"1" maxLength:"4096" doc:"Path or URL to the solution file" example:"./solution.yaml"`
Verbose bool `json:"verbose,omitempty" doc:"Include materialised inputs in the report"`
}
}
SolutionDryRunRequest is the request body for dry-running a solution.
type SolutionDryRunResponse ¶
SolutionDryRunResponse wraps the dry-run report.
type SolutionInspectRequest ¶
type SolutionInspectRequest struct {
Body struct {
Path string `json:"path" minLength:"1" maxLength:"4096" doc:"Path or URL to the solution file" example:"./solution.yaml"`
}
}
SolutionInspectRequest is the request body for inspecting a solution.
type SolutionInspectResponse ¶
type SolutionInspectResponse struct {
Body *inspect.SolutionExplanation
}
SolutionInspectResponse wraps the inspection result.
type SolutionLintRequest ¶
type SolutionLintRequest struct {
Body struct {
Path string `json:"path" minLength:"1" maxLength:"4096" doc:"Path or URL to the solution file" example:"./solution.yaml"`
}
}
SolutionLintRequest is the request body for linting a solution.
type SolutionLintResponse ¶
SolutionLintResponse wraps the lint result.
type SolutionRenderRequest ¶
type SolutionRenderRequest struct {
Body struct {
Path string `json:"path" minLength:"1" maxLength:"4096" doc:"Path or URL to the solution file" example:"./solution.yaml"`
Params map[string]any `json:"params,omitempty" doc:"Parameters to pass to the solution"`
}
}
SolutionRenderRequest is the request body for rendering solution templates.
type SolutionRenderResponse ¶
type SolutionRenderResponse struct {
Body struct {
ResolverData map[string]any `json:"resolverData" doc:"Resolved values from resolvers"`
Validation any `json:"validation,omitempty" doc:"Solution validation result"`
}
}
SolutionRenderResponse wraps the render result.
type SolutionRunRequest ¶
type SolutionRunRequest struct {
Body struct {
Path string `json:"path" minLength:"1" maxLength:"4096" doc:"Path or URL to the solution file" example:"./solution.yaml"`
Params map[string]any `json:"params,omitempty" doc:"Parameters to pass to the solution"`
OutputDir string `json:"outputDir,omitempty" maxLength:"4096" doc:"Target directory for action output"`
}
}
SolutionRunRequest is the request body for running a solution.
type SolutionRunResponse ¶
type SolutionRunResponse struct {
Body struct {
ResolverData map[string]any `json:"resolverData" doc:"Resolved values from resolvers"`
ActionResult any `json:"actionResult,omitempty" doc:"Action execution result"`
}
}
SolutionRunResponse wraps the solution execution result.
type SolutionTestRequest ¶
type SolutionTestRequest struct {
Body struct {
Path string `json:"path" minLength:"1" maxLength:"4096" doc:"Path or URL to the solution file" example:"./solution.yaml"`
DryRun bool `json:"dryRun,omitempty" doc:"Validate tests without executing commands"`
Verbose bool `json:"verbose,omitempty" doc:"Include extra output"`
}
}
SolutionTestRequest is the request body for running solution tests.
type SolutionTestResponse ¶
type SolutionTestResponse struct {
Body struct {
Validation *execute.SolutionValidationResult `json:"validation" doc:"Solution validation result"`
}
}
SolutionTestResponse wraps the test execution result.
type TemplateEvalRequest ¶
type TemplateEvalRequest struct {
Body struct {
Template string `json:"template" maxLength:"100000" doc:"Go template content"`
Data map[string]any `json:"data,omitempty" doc:"Data context for template rendering"`
Name string `json:"name,omitempty" maxLength:"255" doc:"Template name" example:"my-template"`
}
}
TemplateEvalRequest is the request body for Go template evaluation.
type TemplateEvalResponse ¶
type TemplateEvalResponse struct {
Body struct {
Output string `json:"output" doc:"Rendered template output"`
}
}
TemplateEvalResponse wraps a Go template evaluation result.