Documentation ¶
Index ¶
- func APIKey(input string) error
- func APIKeyNotRestricted(input string) error
- func Account(account string) error
- func CallNonEmpty(validator ArgValidator, value string) error
- func CallNonEmptyArray(validator ArgValidator, values []string) error
- func ExactArgs(expected ...string) cobra.PositionalArgs
- func HTTPMethod(method string) error
- func MaximumNArgs(num int) cobra.PositionalArgs
- func NoArgs(cmd *cobra.Command, args []string) error
- func OneDollar(number string) error
- func RequestSource(source string) error
- func RequestStatus(status string) error
- func StatusCode(code string) error
- func StatusCodeType(code string) error
- type ArgValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIKeyNotRestricted ¶
APIKeyNotRestricted validates that a string looks like a secret API key and is not a restricted key.
func CallNonEmpty ¶
func CallNonEmpty(validator ArgValidator, value string) error
CallNonEmpty calls an argument validator on a string if the string is not empty.
func CallNonEmptyArray ¶
func CallNonEmptyArray(validator ArgValidator, values []string) error
CallNonEmptyArray calls an argument validator on all non-empty elements of a string array.
func ExactArgs ¶
func ExactArgs(expected ...string) cobra.PositionalArgs
ExactArgs is a validator for commands to print an error when number of expected args are different from the number of passed args. The names passed in to `expected` are used for the help message.
func HTTPMethod ¶
HTTPMethod validates that a string is an acceptable HTTP method.
func MaximumNArgs ¶
func MaximumNArgs(num int) cobra.PositionalArgs
MaximumNArgs is a validator for commands to print an error when the provided args are greater than the maximum amount
func RequestSource ¶
RequestSource validates that a string is an acceptable request source.
func RequestStatus ¶
RequestStatus validates that a string is an acceptable request status.
func StatusCode ¶
StatusCode validates that a provided status code is within the range of those used in the Auth0 API.
func StatusCodeType ¶
StatusCodeType validates that a provided status code type is one of those used in the Auth0 API.
Types ¶
type ArgValidator ¶
ArgValidator is an argument validator. It accepts a string and returns an error if the string is invalid, or nil otherwise.