errs

package
v0.0.0-...-57b83e3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package errs define some system errors with specified types.

Index

Constants

View Source
const (
	// ReadRequestBodyErrorCode is code for the error of reading http request body error
	ReadRequestBodyErrorCode = 10000 + iota
	// HandleJSONDataErrorCode is code for the error of handling json data error
	HandleJSONDataErrorCode
	// MissingBackendHandlerErrorCode is code for the error of missing backend controller
	MissingBackendHandlerErrorCode
	// LaunchJobErrorCode is code for the error of launching job
	LaunchJobErrorCode
	// CheckStatsErrorCode is code for the error of checking stats of worker worker
	CheckStatsErrorCode
	// GetJobStatsErrorCode is code for the error of getting stats of enqueued job
	GetJobStatsErrorCode
	// StopJobErrorCode is code for the error of stopping job
	StopJobErrorCode
	// RetryJobErrorCode is code for the error of retrying job
	RetryJobErrorCode
	// UnknownActionNameErrorCode is code for the case of unknown action name
	UnknownActionNameErrorCode
	// GetJobLogErrorCode is code for the error of getting job log
	GetJobLogErrorCode
	// NoObjectFoundErrorCode is code for the error of no object found
	NoObjectFoundErrorCode
	// UnAuthorizedErrorCode is code for the error of unauthorized accessing
	UnAuthorizedErrorCode
	// ResourceConflictsErrorCode is code for the error of resource conflicting
	ResourceConflictsErrorCode
	// BadRequestErrorCode is code for the error of bad request
	BadRequestErrorCode
	// GetJobsErrorCode is code for the error of getting scheduled jobs
	GetJobsErrorCode
	// GetPeriodicExecutionErrorCode is code for the error of getting periodic executions
	GetPeriodicExecutionErrorCode
	// StatusMismatchErrorCode is code for the error of mismatching status
	StatusMismatchErrorCode
)

Variables

This section is empty.

Functions

func BadRequestError

func BadRequestError(object interface{}) error

BadRequestError returns the error of handing bad request case

func CheckStatsError

func CheckStatsError(err error) error

CheckStatsError is error wrapper for the error of checking stats failed

func ConflictError

func ConflictError(object string) error

ConflictError is error for the case of resource conflicting

func GetJobLogError

func GetJobLogError(err error) error

GetJobLogError is error for the case of getting job log failed

func GetJobStatsError

func GetJobStatsError(err error) error

GetJobStatsError is error wrapper for the error of getting job stats

func GetJobsError

func GetJobsError(q *query.Parameter, err error) error

GetJobsError is error for the case of getting jobs failed

func GetPeriodicExecutionError

func GetPeriodicExecutionError(err error) error

GetPeriodicExecutionError is error for the case of getting periodic jobs failed

func HandleJSONDataError

func HandleJSONDataError(err error) error

HandleJSONDataError is error wrapper for the error of handling json data.

func IsBadRequestError

func IsBadRequestError(err error) bool

IsBadRequestError returns true if the error is badRequestError

func IsConflictError

func IsConflictError(err error) bool

IsConflictError returns true if the error is conflictError

func IsObjectNotFoundError

func IsObjectNotFoundError(err error) bool

IsObjectNotFoundError return true if the error is objectNotFoundError

func IsStatusMismatchError

func IsStatusMismatchError(err error) bool

IsStatusMismatchError returns true if the error is statusMismatchError

func LaunchJobError

func LaunchJobError(err error) error

LaunchJobError is error wrapper for the error of launching job failed.

func MissingBackendHandlerError

func MissingBackendHandlerError(err error) error

MissingBackendHandlerError is error wrapper for the error of missing backend controller.

func New

func New(code uint16, err string, description string) error

New customized errors

func NoObjectFoundError

func NoObjectFoundError(object string) error

NoObjectFoundError is error wrapper for the case of no object found

func ReadRequestBodyError

func ReadRequestBodyError(err error) error

ReadRequestBodyError is error wrapper for the error of reading request body.

func RetryJobError

func RetryJobError(err error) error

RetryJobError is error for the case of retrying job failed

func StatusMismatchError

func StatusMismatchError(current, target string) error

StatusMismatchError returns the error of job status mismatching

func StopJobError

func StopJobError(err error) error

StopJobError is error for the case of stopping job failed

func UnauthorizedError

func UnauthorizedError(err error) error

UnauthorizedError is error for the case of unauthorized accessing

func UnknownActionNameError

func UnknownActionNameError(err error) error

UnknownActionNameError is error for the case of getting unknown job action

Types

This section is empty.

Jump to

Keyboard shortcuts

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