validate

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package validate implements utilities to validate the command configuration by, for example, validating a set of given options.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidKeypair means that a TLS keypair is required but only one of the
	// key or certificate was provided.
	ErrInvalidKeypair = errors.New("certificate and private key are both required, but only one was provided")

	// ErrTLSRequired means that Transport Layer Security (TLS) is required but
	// not set.
	ErrTLSRequired = errors.New("transport layer security required")
)
View Source
var FlagFuncs []FlagFunc

FlagFuncs is a combination of multiple flag validation functions.

Functions

func Flags

func Flags(cmd *cobra.Command, vp *viper.Viper) error

Flags validates flags for the given command.

Types

type FlagFunc

type FlagFunc func(cmd *cobra.Command, vp *viper.Viper) error

FlagFunc is a function that validates a flag or set of flags of cmd.

Jump to

Keyboard shortcuts

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