Documentation
¶
Index ¶
- func ValidateCatalogEntryForRoute(manifest types.MCPServerCatalogEntryManifest, catalogID, workspaceID string) error
- func ValidateCatalogEntryManifest(ctx context.Context, manifest types.MCPServerCatalogEntryManifest, ...) error
- func ValidateSecretBindings(manifest types.MCPServerManifest, gitManaged bool, mcpBackend string) error
- func ValidateSecretBindingsCatalogEntry(manifest types.MCPServerCatalogEntryManifest, gitManaged bool, ...) error
- func ValidateServerManifest(ctx context.Context, manifest types.MCPServerManifest, isMultiUser bool, ...) error
- func ValidateSystemMCPServerCatalogEntryManifest(ctx context.Context, manifest types.SystemMCPServerCatalogEntryManifest, ...) error
- func ValidateSystemMCPServerManifest(ctx context.Context, manifest types.SystemMCPServerManifest, options Options) error
- func ValidateTemplateReferences(manifest types.MCPServerManifest) error
- func ValidateTemplateReferencesCatalogEntry(manifest types.MCPServerCatalogEntryManifest) error
- type CompositeValidator
- func (v CompositeValidator) ValidateCatalogConfig(_ context.Context, manifest types.MCPServerCatalogEntryManifest) error
- func (v CompositeValidator) ValidateConfig(_ context.Context, manifest types.MCPServerManifest) error
- func (v CompositeValidator) ValidateSystemConfig(_ context.Context, manifest types.SystemMCPServerManifest) error
- type ContainerizedValidator
- func (v ContainerizedValidator) ValidateCatalogConfig(_ context.Context, manifest types.MCPServerCatalogEntryManifest) error
- func (v ContainerizedValidator) ValidateConfig(_ context.Context, manifest types.MCPServerManifest) error
- func (v ContainerizedValidator) ValidateSystemConfig(_ context.Context, manifest types.SystemMCPServerManifest) error
- type NPXValidator
- func (v NPXValidator) ValidateCatalogConfig(_ context.Context, manifest types.MCPServerCatalogEntryManifest) error
- func (v NPXValidator) ValidateConfig(_ context.Context, manifest types.MCPServerManifest) error
- func (v NPXValidator) ValidateSystemConfig(_ context.Context, manifest types.SystemMCPServerManifest) error
- type Options
- type RemoteValidator
- func (v RemoteValidator) ValidateCatalogConfig(ctx context.Context, manifest types.MCPServerCatalogEntryManifest) error
- func (v RemoteValidator) ValidateConfig(ctx context.Context, manifest types.MCPServerManifest) error
- func (v RemoteValidator) ValidateSystemConfig(ctx context.Context, manifest types.SystemMCPServerManifest) error
- type RuntimeValidator
- type RuntimeValidators
- type UVXValidator
- func (v UVXValidator) ValidateCatalogConfig(_ context.Context, manifest types.MCPServerCatalogEntryManifest) error
- func (v UVXValidator) ValidateConfig(_ context.Context, manifest types.MCPServerManifest) error
- func (v UVXValidator) ValidateSystemConfig(_ context.Context, manifest types.SystemMCPServerManifest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCatalogEntryForRoute ¶ added in v0.22.0
func ValidateCatalogEntryForRoute(manifest types.MCPServerCatalogEntryManifest, catalogID, workspaceID string) error
ValidateCatalogEntryForRoute checks that a catalog entry is compatible with the route used to create a server. catalogID and workspaceID come from the URL path.
func ValidateSecretBindings ¶ added in v0.22.0
func ValidateSecretBindings(manifest types.MCPServerManifest, gitManaged bool, mcpBackend string) error
ValidateSecretBindings enforces the rules for secretBinding references on env vars and headers. Bindings are GitOps-only: they may only appear on catalog entries synced from git (gitManaged=true). They also require the kubernetes MCP runtime backend, are mutually exclusive with a static value, require non-empty name/key, and are rejected in unsupported combinations (env bindings under remote runtime).
func ValidateSecretBindingsCatalogEntry ¶ added in v0.22.0
func ValidateSecretBindingsCatalogEntry(manifest types.MCPServerCatalogEntryManifest, gitManaged bool, mcpBackend string) error
ValidateSecretBindingsCatalogEntry is a thin wrapper around ValidateSecretBindings that adapts a catalog-entry manifest (which does not carry the runtime/env shape of MCPServerManifest directly) by extracting the fields that matter for binding validation. The catalog-entry manifest uses the same MCPEnv/MCPHeader types, so we reuse the core logic.
func ValidateServerManifest ¶
func ValidateSystemMCPServerCatalogEntryManifest ¶ added in v0.20.0
func ValidateSystemMCPServerManifest ¶ added in v0.15.0
func ValidateTemplateReferences ¶ added in v0.22.0
func ValidateTemplateReferences(manifest types.MCPServerManifest) error
ValidateTemplateReferences enforces that any ${VAR} reference inside a server manifest's command/args/URL fields points to an env entry with Required=true. Undeclared references are tolerated here because addExtractedEnvVars in the server-create path auto-stamps a Required=true entry for them; this validator catches the case where the user pre-supplied the same key with Required=false, which today produces a literal "${VAR}" string at runtime instead of a substituted value.
func ValidateTemplateReferencesCatalogEntry ¶ added in v0.22.0
func ValidateTemplateReferencesCatalogEntry(manifest types.MCPServerCatalogEntryManifest) error
ValidateTemplateReferencesCatalogEntry is the catalog-entry counterpart. Catalog entries don't get the auto-extraction fixup, so undeclared ${VAR} references are an error.
Types ¶
type CompositeValidator ¶ added in v0.13.0
type CompositeValidator struct{}
CompositeValidator implements RuntimeValidator for composite runtime
func (CompositeValidator) ValidateCatalogConfig ¶ added in v0.13.0
func (v CompositeValidator) ValidateCatalogConfig(_ context.Context, manifest types.MCPServerCatalogEntryManifest) error
func (CompositeValidator) ValidateConfig ¶ added in v0.13.0
func (v CompositeValidator) ValidateConfig(_ context.Context, manifest types.MCPServerManifest) error
func (CompositeValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v CompositeValidator) ValidateSystemConfig(_ context.Context, manifest types.SystemMCPServerManifest) error
type ContainerizedValidator ¶
type ContainerizedValidator struct{}
ContainerizedValidator implements RuntimeValidator for containerized runtime
func (ContainerizedValidator) ValidateCatalogConfig ¶
func (v ContainerizedValidator) ValidateCatalogConfig(_ context.Context, manifest types.MCPServerCatalogEntryManifest) error
func (ContainerizedValidator) ValidateConfig ¶
func (v ContainerizedValidator) ValidateConfig(_ context.Context, manifest types.MCPServerManifest) error
func (ContainerizedValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v ContainerizedValidator) ValidateSystemConfig(_ context.Context, manifest types.SystemMCPServerManifest) error
type NPXValidator ¶
type NPXValidator struct{}
NPXValidator implements RuntimeValidator for NPX runtime
func (NPXValidator) ValidateCatalogConfig ¶
func (v NPXValidator) ValidateCatalogConfig(_ context.Context, manifest types.MCPServerCatalogEntryManifest) error
func (NPXValidator) ValidateConfig ¶
func (v NPXValidator) ValidateConfig(_ context.Context, manifest types.MCPServerManifest) error
func (NPXValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v NPXValidator) ValidateSystemConfig(_ context.Context, manifest types.SystemMCPServerManifest) error
type Options ¶ added in v0.23.0
type Options struct {
RemoteMCPURLValidationConfig mcp.RemoteMCPURLValidationConfig
}
Options configures runtime validation behavior.
type RemoteValidator ¶
type RemoteValidator struct {
RemoteMCPURLValidationConfig mcp.RemoteMCPURLValidationConfig
}
RemoteValidator implements RuntimeValidator for remote runtime
func (RemoteValidator) ValidateCatalogConfig ¶
func (v RemoteValidator) ValidateCatalogConfig(ctx context.Context, manifest types.MCPServerCatalogEntryManifest) error
func (RemoteValidator) ValidateConfig ¶
func (v RemoteValidator) ValidateConfig(ctx context.Context, manifest types.MCPServerManifest) error
func (RemoteValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v RemoteValidator) ValidateSystemConfig(ctx context.Context, manifest types.SystemMCPServerManifest) error
type RuntimeValidator ¶
type RuntimeValidator interface {
ValidateConfig(ctx context.Context, manifest types.MCPServerManifest) error
ValidateCatalogConfig(ctx context.Context, manifest types.MCPServerCatalogEntryManifest) error
ValidateSystemConfig(ctx context.Context, manifest types.SystemMCPServerManifest) error
}
RuntimeValidator defines the interface for validating runtime-specific configurations
type RuntimeValidators ¶
type RuntimeValidators map[types.Runtime]RuntimeValidator
RuntimeValidators is a map type for storing validators by runtime type
type UVXValidator ¶
type UVXValidator struct{}
UVXValidator implements RuntimeValidator for UVX runtime
func (UVXValidator) ValidateCatalogConfig ¶
func (v UVXValidator) ValidateCatalogConfig(_ context.Context, manifest types.MCPServerCatalogEntryManifest) error
func (UVXValidator) ValidateConfig ¶
func (v UVXValidator) ValidateConfig(_ context.Context, manifest types.MCPServerManifest) error
func (UVXValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v UVXValidator) ValidateSystemConfig(_ context.Context, manifest types.SystemMCPServerManifest) error