Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthHeader = "Authorization" NamespaceHeader = "A8-Namespace" RequestIDHeader = "A8-Request-Id" )
Header keys
View Source
const (
Namespace = "NAMESPACE"
)
Keys of rest.Request.Env used by rest.Middleware.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ValidatorFunc ¶
type ValidatorFunc func() error
ValidatorFunc performs a validation check
func IsInRange ¶
func IsInRange(name string, value, min, max int) ValidatorFunc
IsInRange ensures the integer is within the specified inclusive range
func IsInRangeDuration ¶
func IsInRangeDuration(name string, value, min, max time.Duration) ValidatorFunc
IsInRangeDuration ensures the time value is between the given min and max times
func IsNotEmpty ¶
func IsNotEmpty(name, value string) ValidatorFunc
IsNotEmpty ensures the value is not empty
func IsValidURL ¶
func IsValidURL(name, value string) ValidatorFunc
IsValidURL ensures that the URL is valid and has a protocol specified (http, https, etc...)
Click to show internal directories.
Click to hide internal directories.