errors

package
v0.0.0-...-1bfb889 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidParams = "invalid params"

	DatabaseQueryError   = "database query error"
	NotFoundError        = "not found error"
	InternalError        = "internal error"
	ResourceOperateError = "resource operate failed"

	SensitiveDataError = "can not modified sensitive data"
)

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Code    int     `json:"code"`
	Message string  `json:"message"`
	Details Details `json:"details"`
}

func (*APIError) Error

func (a *APIError) Error() string

type Details

type Details struct {
	Type    ErrorType    `json:"type"`
	Reason  StatusReason `json:"reason"`
	Message string       `json:"message"`
}

type ErrorType

type ErrorType string
const (
	KubernetesError ErrorType = "KubernetesError"
	BotError        ErrorType = "BotError"
	NormalError     ErrorType = "NormalError"
)

type StatusReason

type StatusReason string

Jump to

Keyboard shortcuts

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