errors

package
Version: v0.0.0-...-5ae6e0f Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package errors implements all the errors catalog available.

Index

Constants

View Source
const (
	GenericError         int = 1
	DBError              int = 2
	GenericNotFoundError int = 3
	InputNotValid        int = 4
	FaasConnectError     int = 5
	// service validation
	ServiceNotValid int = 100
	// deploy errors
	GenericDeployError int = 200
	// openfaas
	GenericOpenFaasError int = 300
	// scheduler
	JobCannotBeScheduledError int = 400
	// mongo errors
	DBDuplicateKey int = 11000
)

Variables

This section is empty.

Functions

func ReplyWithError

func ReplyWithError(w http.ResponseWriter, errorCode int)

func ReplyWithErrorMessage

func ReplyWithErrorMessage(w http.ResponseWriter, errorCode int, msg string)

Types

type ErrorAPIGet

type ErrorAPIGet struct {
	URL string
}

func (ErrorAPIGet) Error

func (e ErrorAPIGet) Error() string

type ErrorAPIPost

type ErrorAPIPost struct {
	URL string
}

func (ErrorAPIPost) Error

func (e ErrorAPIPost) Error() string

type ErrorJSONDecoding

type ErrorJSONDecoding struct{}

func (ErrorJSONDecoding) Error

func (e ErrorJSONDecoding) Error() string

type ErrorJSONEncode

type ErrorJSONEncode struct{}

func (ErrorJSONEncode) Error

func (e ErrorJSONEncode) Error() string

type ErrorReply

type ErrorReply struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

Jump to

Keyboard shortcuts

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