validate

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package validate provides input validation functions for the obol CLI. Each function returns nil on success or a descriptive error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainName

func ChainName(s string) error

ChainName validates a blockchain chain name.

func Name

func Name(s string) error

Name validates a resource name (k8s-safe DNS label).

func Namespace

func Namespace(s string) error

Namespace validates a Kubernetes namespace (same rules as Name).

func NoControlChars

func NoControlChars(s string) error

NoControlChars rejects strings containing control characters (except \n and \t).

func Path

func Path(s string) error

Path validates a URL path segment (no path traversal, no control chars).

func Price

func Price(s string) error

Price validates a decimal price string (positive, parseable as float).

func URL

func URL(s string) error

URL validates a URL string.

func WalletAddress

func WalletAddress(s string) error

WalletAddress validates an Ethereum wallet address (0x-prefixed, 42 hex chars).

Types

This section is empty.

Jump to

Keyboard shortcuts

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