validation

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package validation provide utilities functions for data validation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCname

func ValidateCname(cname string) error

ValidateCname checks whether the given CNAME is valid.

func ValidateName

func ValidateName(name string) bool

ValidateName checks whether the given name is valid.

func ValidateYamlFilename

func ValidateYamlFilename(name string) bool

Types

type Error

type Error string

Error represents the package's Error type that is returned by Validate* functions.

const (
	ErrInvalidCname        Error = "invalid cname"
	ErrIPAddress           Error = "invalid cname: cname must be a DNS name, not an IP address"
	ErrInvalidWildcard     Error = "" /* 196-byte string literal not displayed */
	ErrInvalidDnsSubdomain Error = "" /* 138-byte string literal not displayed */
)

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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