types

package
v1.25.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Overview

Package types contains declaration of data types used by other packages from RedHatInsights/insights-operator-utils

Index

Constants

This section is empty.

Variables

View Source
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

Types

type ErrorKey

type ErrorKey = types.ErrorKey

ErrorKey is a legacy type used for temporal compatibility

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 RouterMissingParamError

type RouterMissingParamError struct {
	ParamName string
}

RouterMissingParamError missing parameter in request

func (*RouterMissingParamError) Error

func (e *RouterMissingParamError) Error() string

type RouterParsingError

type RouterParsingError struct {
	ParamName  string
	ParamValue interface{}
	ErrString  string
}

RouterParsingError parsing error, for example string when we expected integer

func (*RouterParsingError) Error

func (e *RouterParsingError) Error() string

type RuleFQDN added in v1.19.3

type RuleFQDN = types.RuleFQDN

RuleFQDN is a legacy type used for temporal compatibility

type UnauthorizedError added in v1.6.2

type UnauthorizedError struct {
	ErrString string
}

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

type ValidationError struct {
	ParamName  string
	ParamValue interface{}
	ErrString  string
}

ValidationError validation error, for example when string is longer then expected

func (*ValidationError) Error added in v1.4.3

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

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