validate

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAPIKey = &ValidationError{msg: "API key validation failed"}
	ErrInvalidURL    = &ValidationError{msg: "invalid URL: must be HTTPS and not use blocked hosts"}
)

Functions

func NewValidationError

func NewValidationError(msg string) error

func ValidateAPIKey

func ValidateAPIKey(key string, providerName string) error

func ValidateURL

func ValidateURL(rawURL string, providerName string) error

Types

type KeyFormat added in v1.7.0

type KeyFormat struct {
	MinLength int
	Prefix    string
	Pattern   string
}

type ValidationError

type ValidationError struct {
	// contains filtered or unexported fields
}

func (*ValidationError) Error

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

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