validate

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyAuthenticatedAPIKeys = errors.New("already authenticated with an API key")
View Source
var ErrAlreadyAuthenticatedToken = errors.New("already authenticated with an account")
View Source
var ErrInvalidClusterName = errors.New("invalid cluster name")
View Source
var ErrInvalidDBUsername = errors.New("invalid db username")
View Source
var ErrInvalidPath = errors.New("invalid path")
View Source
var ErrMissingCredentials = errors.New("this action requires authentication")
View Source
var ErrShortPassword = errors.New("the password provided is too short")
View Source
var ErrWeakPassword = errors.New("the password provided is too common")

Functions

func ClusterName

func ClusterName(val interface{}) error

func ConditionalFlagNotInSlice

func ConditionalFlagNotInSlice(conditionalFlag string, conditionalFlagValue string, flag string, invalidFlags []string) error

func Credentials

func Credentials() error

Credentials validates public and private API keys have been set.

func DBUsername

func DBUsername(val interface{}) error

func FlagInSlice

func FlagInSlice(value, flag string, validValues []string) error

func NoAPIKeys

func NoAPIKeys() error

NoAPIKeys there are no API keys in the profile, used for login/register/setup commands.

func NoAccessToken

func NoAccessToken() error

NoAccessToken there is no access token in the profile, used for login/register/setup commands.

func ObjectID

func ObjectID(s string) error

ObjectID validates a value is a valid ObjectID.

func OptionalObjectID

func OptionalObjectID(val interface{}) error

OptionalObjectID validates a value is a valid ObjectID.

func OptionalPath

func OptionalPath(val interface{}) error

func OptionalURL

func OptionalURL(val interface{}) error

OptionalURL validates a value is a valid URL for the cli store.

func Path

func Path(val interface{}) error

func URL

func URL(val interface{}) error

URL validates a value is a valid URL for the cli store.

func WeakPassword

func WeakPassword(val interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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