Documentation ¶
Overview ¶
Package roxyutil provides miscellaneous utility functions for use by Roxy and by users of mainutil.
As with mainutil, it is undecided how much (if any) of the roxyutil API will remain available outside of the Roxy project once Roxy reaches v1.0.0.
Index ¶
- Variables
- func ExpandPassword(in string) (string, error)
- func ExpandPath(in string) (string, error)
- func ExpandString(in string) (string, error)
- func ValidateATCLocation(str string) error
- func ValidateATCServiceName(str string) error
- func ValidateATCUnique(str string) error
- func ValidateEtcdPath(str string) error
- func ValidateNamedPort(str string) error
- func ValidateZKPath(str string) error
- type BadATCLocationError
- type BadATCServiceNameError
- type BadATCUniqueError
- type BadAuthorityError
- type BadBoolError
- type BadEndpointError
- type BadEnvVarError
- type BadHostError
- type BadHostPortError
- type BadIPError
- type BadPathError
- type BadPortError
- type BadQueryParamError
- type BadQueryStringError
- type BadSchemeError
- type FailedGroupNameLookupError
- type FailedMatchError
- type FailedPathAbsError
- type FailedUserNameLookupError
- type NotFoundError
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoHealthyBackends = errors.New("no healthy backends") ErrExpectEmpty = errors.New("expected empty string") ErrExpectEmptyOrLocalhost = errors.New("expected empty string or \"localhost\"") ErrExpectNonEmpty = errors.New("expected non-empty string") ErrExpectOneSlash = errors.New("expected one '/', found 2 or more") ErrExpectLeadingSlash = errors.New("expected path to start with '/'") ErrExpectTrailingSlash = errors.New("expected path to end with '/'") ErrExpectNoEndSlash = errors.New("did not expect path to end with '/'") ErrExpectNoDoubleSlash = errors.New("did not expect path to contain '//'") ErrExpectNoDot = errors.New("did not expect path to contain '/./'") ErrExpectNoDotDot = errors.New("did not expect path to contain '/../'") ErrFailedToMatch = errors.New("failed to match expected pattern") )
Functions ¶
func ExpandPassword ¶
ExpandPassword expands ${ENV_VAR} references and @file references.
func ExpandPath ¶
ExpandPath expands ${ENV_VAR} references, ~ and ~user references, and makes the path absolute.
func ExpandString ¶
ExpandString expands ${ENV_VAR} references.
func ValidateATCLocation ¶
ValidateATCLocation validates that the given string is a valid Location for the Air Traffic Control service.
func ValidateATCServiceName ¶
ValidateATCServiceName validates that the given string is a valid Service Name for the Air Traffic Control service.
func ValidateATCUnique ¶
ValidateATCUnique validates that the given string is a valid Unique ID for the Air Traffic Control service.
func ValidateEtcdPath ¶
ValidateEtcdPath validates that the given string is a valid etcd.io V3 key prefix, which must end with a "/".
func ValidateNamedPort ¶
ValidateNamedPort validates that the given string is a valid named port for a membership.Roxy or membership.ServerSet address advertisement.
func ValidateZKPath ¶
ValidateZKPath validates that the given string is a valid ZooKeeper node path.
Types ¶
type BadATCLocationError ¶
func (BadATCLocationError) Error ¶
func (err BadATCLocationError) Error() string
func (BadATCLocationError) Unwrap ¶
func (err BadATCLocationError) Unwrap() error
type BadATCServiceNameError ¶
func (BadATCServiceNameError) Error ¶
func (err BadATCServiceNameError) Error() string
func (BadATCServiceNameError) Unwrap ¶
func (err BadATCServiceNameError) Unwrap() error
type BadATCUniqueError ¶
func (BadATCUniqueError) Error ¶
func (err BadATCUniqueError) Error() string
func (BadATCUniqueError) Unwrap ¶
func (err BadATCUniqueError) Unwrap() error
type BadAuthorityError ¶
func (BadAuthorityError) Error ¶
func (err BadAuthorityError) Error() string
func (BadAuthorityError) Unwrap ¶
func (err BadAuthorityError) Unwrap() error
type BadBoolError ¶
type BadBoolError struct {
Input string
}
func (BadBoolError) Error ¶
func (err BadBoolError) Error() string
type BadEndpointError ¶
func (BadEndpointError) Error ¶
func (err BadEndpointError) Error() string
func (BadEndpointError) Unwrap ¶
func (err BadEndpointError) Unwrap() error
type BadEnvVarError ¶
type BadEnvVarError struct {
Var string
}
func (BadEnvVarError) Error ¶
func (err BadEnvVarError) Error() string
func (BadEnvVarError) GRPCStatus ¶
func (err BadEnvVarError) GRPCStatus() *status.Status
func (BadEnvVarError) Is ¶
func (err BadEnvVarError) Is(target error) bool
type BadHostError ¶
func (BadHostError) Error ¶
func (err BadHostError) Error() string
func (BadHostError) Unwrap ¶
func (err BadHostError) Unwrap() error
type BadHostPortError ¶
func (BadHostPortError) Error ¶
func (err BadHostPortError) Error() string
func (BadHostPortError) Unwrap ¶
func (err BadHostPortError) Unwrap() error
type BadIPError ¶
type BadIPError struct {
IP string
}
func (BadIPError) Error ¶
func (err BadIPError) Error() string
type BadPathError ¶
func (BadPathError) Error ¶
func (err BadPathError) Error() string
func (BadPathError) Unwrap ¶
func (err BadPathError) Unwrap() error
type BadPortError ¶
func (BadPortError) Error ¶
func (err BadPortError) Error() string
func (BadPortError) Unwrap ¶
func (err BadPortError) Unwrap() error
type BadQueryParamError ¶
func (BadQueryParamError) Error ¶
func (err BadQueryParamError) Error() string
func (BadQueryParamError) Unwrap ¶
func (err BadQueryParamError) Unwrap() error
type BadQueryStringError ¶
func (BadQueryStringError) Error ¶
func (err BadQueryStringError) Error() string
func (BadQueryStringError) Unwrap ¶
func (err BadQueryStringError) Unwrap() error
type BadSchemeError ¶
func (BadSchemeError) Error ¶
func (err BadSchemeError) Error() string
func (BadSchemeError) Unwrap ¶
func (err BadSchemeError) Unwrap() error
type FailedGroupNameLookupError ¶
func (FailedGroupNameLookupError) Error ¶
func (err FailedGroupNameLookupError) Error() string
func (FailedGroupNameLookupError) Unwrap ¶
func (err FailedGroupNameLookupError) Unwrap() error
type FailedMatchError ¶
func (FailedMatchError) Error ¶
func (err FailedMatchError) Error() string
type FailedPathAbsError ¶
func (FailedPathAbsError) Error ¶
func (err FailedPathAbsError) Error() string
func (FailedPathAbsError) Unwrap ¶
func (err FailedPathAbsError) Unwrap() error
type FailedUserNameLookupError ¶
func (FailedUserNameLookupError) Error ¶
func (err FailedUserNameLookupError) Error() string
func (FailedUserNameLookupError) Unwrap ¶
func (err FailedUserNameLookupError) Unwrap() error
type NotFoundError ¶
type NotFoundError struct {
Key string
}
func (NotFoundError) Error ¶
func (err NotFoundError) Error() string
func (NotFoundError) GRPCStatus ¶
func (err NotFoundError) GRPCStatus() *status.Status
func (NotFoundError) Is ¶
func (err NotFoundError) Is(target error) bool