Documentation ¶
Index ¶
Constants ¶
View Source
const ( JobStatusSuccess = "2xx" JobStatusUserInputError = "4xx" JobStatusInternalError = "5xx" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientErrorCode ¶
type ClientErrorCode int
const ( ErrorNoDynamicArgs ClientErrorCode = 1 ErrorInvalidTargetConfig ClientErrorCode = 2 ErrorSharingTarget ClientErrorCode = 3 ErrorInvalidTarget ClientErrorCode = 4 ErrorDepsolveDependency ClientErrorCode = 5 ErrorReadingJobStatus ClientErrorCode = 6 ErrorParsingDynamicArgs ClientErrorCode = 7 ErrorManifestGeneration ClientErrorCode = 8 ErrorManifestDependency ClientErrorCode = 9 ErrorBuildJob ClientErrorCode = 10 ErrorUploadingImage ClientErrorCode = 11 ErrorImportingImage ClientErrorCode = 12 ErrorKojiFailedDependency ClientErrorCode = 13 ErrorKojiBuild ClientErrorCode = 14 ErrorKojiInit ClientErrorCode = 15 ErrorKojiFinalize ClientErrorCode = 16 ErrorInvalidConfig ClientErrorCode = 17 ErrorOldResultCompatible ClientErrorCode = 18 ErrorEmptyManifest ClientErrorCode = 19 ErrorDNFDepsolveError ClientErrorCode = 20 ErrorDNFMarkingErrors ClientErrorCode = 21 ErrorDNFOtherError ClientErrorCode = 22 ErrorRPMMDError ClientErrorCode = 23 ErrorEmptyPackageSpecs ClientErrorCode = 24 ErrorDNFRepoError ClientErrorCode = 25 ErrorJobDependency ClientErrorCode = 26 ErrorJobMissingHeartbeat ClientErrorCode = 27 ErrorTargetError ClientErrorCode = 28 ErrorParsingJobArgs ClientErrorCode = 29 ErrorContainerResolution ClientErrorCode = 30 ErrorContainerDependency ClientErrorCode = 31 ErrorOSTreeRefInvalid ClientErrorCode = 32 ErrorOSTreeRefResolution ClientErrorCode = 33 ErrorOSTreeParamsInvalid ClientErrorCode = 34 ErrorOSTreeDependency ClientErrorCode = 35 ErrorRemoteFileResolution ClientErrorCode = 36 )
type Error ¶
type Error struct { ID ClientErrorCode `json:"id"` Reason string `json:"reason"` Details interface{} `json:"details,omitempty"` }
func WorkerClientError ¶
func WorkerClientError(code ClientErrorCode, reason string, details interface{}) *Error
func (*Error) IsDependencyError ¶
IsDependencyError returns true if the error means that a dependency of a job failed
type StatusCode ¶
type StatusCode string
func GetStatusCode ¶
func GetStatusCode(err *Error) StatusCode
func (*StatusCode) ToString ¶
func (s *StatusCode) ToString() string
Click to show internal directories.
Click to hide internal directories.