Documentation
¶
Index ¶
- func ValidateCatalogEntryManifest(manifest types.MCPServerCatalogEntryManifest) error
- func ValidateSecretBindings(manifest types.MCPServerManifest, gitManaged bool, mcpBackend string) error
- func ValidateSecretBindingsCatalogEntry(manifest types.MCPServerCatalogEntryManifest, gitManaged bool, ...) error
- func ValidateServerManifest(manifest types.MCPServerManifest, isMultiUser bool) error
- func ValidateSystemMCPServerCatalogEntryManifest(manifest types.SystemMCPServerCatalogEntryManifest) error
- func ValidateSystemMCPServerManifest(manifest types.SystemMCPServerManifest) error
- func ValidateTemplateReferences(manifest types.MCPServerManifest) error
- func ValidateTemplateReferencesCatalogEntry(manifest types.MCPServerCatalogEntryManifest) error
- type CompositeValidator
- type ContainerizedValidator
- type NPXValidator
- type RemoteValidator
- type RuntimeValidator
- type RuntimeValidators
- type UVXValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCatalogEntryManifest ¶
func ValidateCatalogEntryManifest(manifest types.MCPServerCatalogEntryManifest) error
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 ValidateServerManifest(manifest types.MCPServerManifest, isMultiUser bool) error
func ValidateSystemMCPServerCatalogEntryManifest ¶ added in v0.20.0
func ValidateSystemMCPServerCatalogEntryManifest(manifest types.SystemMCPServerCatalogEntryManifest) error
func ValidateSystemMCPServerManifest ¶ added in v0.15.0
func ValidateSystemMCPServerManifest(manifest types.SystemMCPServerManifest) error
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(manifest types.MCPServerCatalogEntryManifest) error
func (CompositeValidator) ValidateConfig ¶ added in v0.13.0
func (v CompositeValidator) ValidateConfig(manifest types.MCPServerManifest) error
func (CompositeValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v CompositeValidator) ValidateSystemConfig(manifest types.SystemMCPServerManifest) error
type ContainerizedValidator ¶
type ContainerizedValidator struct{}
ContainerizedValidator implements RuntimeValidator for containerized runtime
func (ContainerizedValidator) ValidateCatalogConfig ¶
func (v ContainerizedValidator) ValidateCatalogConfig(manifest types.MCPServerCatalogEntryManifest) error
func (ContainerizedValidator) ValidateConfig ¶
func (v ContainerizedValidator) ValidateConfig(manifest types.MCPServerManifest) error
func (ContainerizedValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v ContainerizedValidator) ValidateSystemConfig(manifest types.SystemMCPServerManifest) error
type NPXValidator ¶
type NPXValidator struct{}
NPXValidator implements RuntimeValidator for NPX runtime
func (NPXValidator) ValidateCatalogConfig ¶
func (v NPXValidator) ValidateCatalogConfig(manifest types.MCPServerCatalogEntryManifest) error
func (NPXValidator) ValidateConfig ¶
func (v NPXValidator) ValidateConfig(manifest types.MCPServerManifest) error
func (NPXValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v NPXValidator) ValidateSystemConfig(manifest types.SystemMCPServerManifest) error
type RemoteValidator ¶
type RemoteValidator struct{}
RemoteValidator implements RuntimeValidator for remote runtime
func (RemoteValidator) ValidateCatalogConfig ¶
func (v RemoteValidator) ValidateCatalogConfig(manifest types.MCPServerCatalogEntryManifest) error
func (RemoteValidator) ValidateConfig ¶
func (v RemoteValidator) ValidateConfig(manifest types.MCPServerManifest) error
func (RemoteValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v RemoteValidator) ValidateSystemConfig(manifest types.SystemMCPServerManifest) error
type RuntimeValidator ¶
type RuntimeValidator interface {
ValidateConfig(manifest types.MCPServerManifest) error
ValidateCatalogConfig(manifest types.MCPServerCatalogEntryManifest) error
ValidateSystemConfig(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(manifest types.MCPServerCatalogEntryManifest) error
func (UVXValidator) ValidateConfig ¶
func (v UVXValidator) ValidateConfig(manifest types.MCPServerManifest) error
func (UVXValidator) ValidateSystemConfig ¶ added in v0.20.0
func (v UVXValidator) ValidateSystemConfig(manifest types.SystemMCPServerManifest) error