validation

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package validation provides functions for validating input data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateGroupName

func ValidateGroupName(name string) error

ValidateGroupName validates that a group name only contains allowed characters: lowercase alphanumeric, underscore, dash, and space. It also enforces no leading/trailing/consecutive spaces and disallows null bytes.

func ValidateHTTPHeaderName added in v0.5.2

func ValidateHTTPHeaderName(name string) error

ValidateHTTPHeaderName validates that a string is a valid HTTP header name per RFC 7230. It checks for CRLF injection, control characters, and ensures RFC token compliance.

func ValidateHTTPHeaderValue added in v0.5.2

func ValidateHTTPHeaderValue(value string) error

ValidateHTTPHeaderValue validates that a string is a valid HTTP header value per RFC 7230. It checks for CRLF injection and control characters.

func ValidateResourceURI added in v0.6.0

func ValidateResourceURI(resourceURI string) error

ValidateResourceURI validates that a resource URI conforms to MCP specification requirements for canonical URIs (RFC 8707). This is used for user-provided values that should not be normalized.

According to MCP spec, a valid canonical URI must: - Include a scheme (http/https) - Include a host - Not contain fragments

Types

This section is empty.

Jump to

Keyboard shortcuts

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