Documentation ¶
Overview ¶
Package types contains declaration of data types used by other packages from RedHatInsights/insights-operator-utils
Index ¶
- Variables
- func HandleServerError(writer http.ResponseWriter, err error)
- func Uint64ToUint32(v uint64) (uint32, error)
- type ErrorKey
- type ForbiddenError
- type ItemNotFoundError
- type MetricsConfiguration
- type NoBodyError
- type NoContentError
- type OutOfRangeError
- type RouterMissingParamError
- type RouterParsingError
- type RuleFQDN
- type UnauthorizedError
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
var ErrOldReport = errors.New("More recent report already exists in storage")
ErrOldReport is an error returned if a more recent already exists on the storage while attempting to write a report for a cluster.
Functions ¶
func HandleServerError ¶
func HandleServerError(writer http.ResponseWriter, err error)
HandleServerError handles separate server errors and sends appropriate responses
func Uint64ToUint32 ¶ added in v1.25.11
Uint64ToUint32 safely converts a uint64 into a uint32 without overflow
Types ¶
type ForbiddenError ¶ added in v1.6.2
type ForbiddenError struct {
ErrString string
}
ForbiddenError means you don't have permission to do a particular action, for example your account belongs to a different organization
func (*ForbiddenError) Error ¶ added in v1.6.2
func (e *ForbiddenError) Error() string
type ItemNotFoundError ¶
type ItemNotFoundError struct {
ItemID interface{}
}
ItemNotFoundError shows that item with id ItemID wasn't found in the storage
func (*ItemNotFoundError) Error ¶
func (e *ItemNotFoundError) Error() string
Error returns error string
type MetricsConfiguration ¶ added in v1.21.9
type MetricsConfiguration struct { Job string `mapstructure:"job_name" toml:"job_name"` GatewayURL string `mapstructure:"gateway_url" toml:"gateway_url"` GatewayAuthToken string `mapstructure:"gateway_auth_token" toml:"gateway_auth_token"` TimeBetweenPush int `mapstructure:"time_between_push" toml:"time_between_push"` }
MetricsConfiguration holds metrics related configuration
type NoBodyError ¶
type NoBodyError struct{}
NoBodyError error meaning that client didn't provide body when it's required
func (*NoBodyError) Error ¶
func (*NoBodyError) Error() string
type NoContentError ¶ added in v1.24.6
type NoContentError struct {
ErrString string
}
NoContentError means the client request is correct but the server doesn't have any data to return. For example, if a feature is disabled for a given cluster.
func (*NoContentError) Error ¶ added in v1.24.6
func (e *NoContentError) Error() string
type OutOfRangeError ¶ added in v1.25.12
OutOfRangeError indicates that a value is outside the expected range.
func (*OutOfRangeError) Error ¶ added in v1.25.12
func (e *OutOfRangeError) Error() string
Error returns a formatted error string for the OutOfRangeError.
type RouterMissingParamError ¶
type RouterMissingParamError struct {
ParamName string
}
RouterMissingParamError missing parameter in request
func (*RouterMissingParamError) Error ¶
func (e *RouterMissingParamError) Error() string
type RouterParsingError ¶
RouterParsingError parsing error, for example string when we expected integer
func (*RouterParsingError) Error ¶
func (e *RouterParsingError) Error() string
type UnauthorizedError ¶ added in v1.6.2
type UnauthorizedError struct {
}UnauthorizedError means server can't authorize you, for example the token is missing or malformed
func (*UnauthorizedError) Error ¶ added in v1.6.2
func (e *UnauthorizedError) Error() string
type ValidationError ¶ added in v1.4.3
ValidationError validation error, for example when string is longer then expected
func (*ValidationError) Error ¶ added in v1.4.3
func (e *ValidationError) Error() string