validators

package
v1.0.10-beta Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAdminAPIKeyNotConfigured is the error returned when the loaded profile is missing the admin_api_key property
	ErrAdminAPIKeyNotConfigured = errors.New("you have not configured your admin API key yet")
	// ErrApplicationIDNotConfigured is the error returned when the loaded profile is missing the application_id property
	ErrApplicationIDNotConfigured = errors.New("you have not configured your Application ID yet")
)

Functions

func AdminAPIKey

func AdminAPIKey(input string) error

AdminAPIKey validates that a string looks like an Admin API key.

func ExactArgs

func ExactArgs(num int) cobra.PositionalArgs

ExactArgs is a validator for commands to print an error when the number provided is different than the arguments passed in

func NoArgs

func NoArgs(cmd *cobra.Command, args []string) error

NoArgs is a validator for commands to print an error when an argument is provided

func PathExists

func PathExists(input string) error

PathExists validates that a string is a path that exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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