error

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidJobType        = errors.New("job type must be either HTTP or AMQP")
	ErrInvalidJobID          = errors.New("job ID must be a valid UUID")
	ErrInvalidJobStatus      = errors.New("job status must be either PENDING, SCHEDULED, SUCCESSFUL, or FAILED")
	ErrInvalidJobFields      = errors.New("job cannot have both HTTP and AMQP fields defined")
	ErrInvalidJobSchedule    = errors.New("job must have only one of execute_at and cron_schedule defined")
	ErrInvalidCronSchedule   = errors.New("invalid cron schedule")
	ErrInvalidExecuteAt      = errors.New("execute_at must be in the future")
	ErrEmptyHTTPJobURL       = errors.New("HTTP job URL cannot be empty")
	ErrHTTPJobNotDefined     = errors.New("HTTP job must be defined")
	ErrEmptyHTTPJobMethod    = errors.New("HTTP job method cannot be empty")
	ErrAMQPJobNotDefined     = errors.New("AMQP job must be defined")
	ErrAMQPConnectionInvalid = errors.New("AMQP connection string is invalid")
	ErrEmptyExchange         = errors.New("exchange must be defined for AMQP jobs")
	ErrEmptyRoutingKey       = errors.New("routing key must be defined for AMQP jobs")
	ErrInvalidAuthType       = errors.New("auth type must be either none, basic, or bearer")
	ErrEmptyUsername         = errors.New("username must be defined for basic auth")
	ErrEmptyPassword         = errors.New("password must be defined for basic auth")
	ErrEmptyBearerToken      = errors.New("bearer token must be defined for bearer auth")
	ErrAuthMethodNotDefined  = errors.New("auth method must be defined")
	ErrJobNotFound           = errors.New("job not found")
	ErrInvalidResponseCode   = errors.New("invalid response code")
	ErrInvalidBodyEncoding   = errors.New("invalid body encoding")
)

Functions

This section is empty.

Types

type CustomError

type CustomError struct {
	Err  error
	Code int
}

func ToCustomJobError

func ToCustomJobError(err error) *CustomError

func (*CustomError) Error

func (e *CustomError) Error() string

Jump to

Keyboard shortcuts

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