Documentation
¶
Index ¶
- func IsErrorResponse(errorType string) bool
- func ProcessBuildError(build *BuildResponse, fallbackMessage string) error
- func ProcessCommitError(commit *Commit, fallbackMessage string) error
- func ProcessMergedCommitError(mcErr *MergedCommit, fallbackMessage string) error
- func ProcessProjectCreatedError(pcErr *ProjectCreated, fallbackMessage string) error
- func ProcessProjectError(project *ProjectResponse, fallbackMessage string) error
- func ProcessRevertCommitError(rcErr *RevertedCommit, fallbackMessage string) error
- type ArtifactResponse
- type BuildExprError
- type BuildPlannerError
- type BuildResponse
- type Commit
- type CommitError
- type Error
- type ErrorWithSubErrors
- type GenericSolveError
- type MergedCommit
- type MergedCommitError
- type ProjectCreated
- type ProjectCreatedError
- type ProjectResponse
- type RevertCommitError
- type RevertedCommit
- type SolverErrorValidationError
- type TargetNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrorResponse ¶
func ProcessBuildError ¶
func ProcessBuildError(build *BuildResponse, fallbackMessage string) error
func ProcessCommitError ¶
func ProcessMergedCommitError ¶
func ProcessMergedCommitError(mcErr *MergedCommit, fallbackMessage string) error
func ProcessProjectCreatedError ¶
func ProcessProjectCreatedError(pcErr *ProjectCreated, fallbackMessage string) error
func ProcessProjectError ¶
func ProcessProjectError(project *ProjectResponse, fallbackMessage string) error
func ProcessRevertCommitError ¶
func ProcessRevertCommitError(rcErr *RevertedCommit, fallbackMessage string) error
Types ¶
type ArtifactResponse ¶
type BuildExprError ¶
type BuildExprError struct { Type string `json:"__typename"` Message string `json:"message"` *TargetNotFoundError *GenericSolveError }
BuildExprError represents a location in the build script where an error occurred.
type BuildPlannerError ¶
func (*BuildPlannerError) Error ¶
func (e *BuildPlannerError) Error() string
func (*BuildPlannerError) InputError ¶
func (e *BuildPlannerError) InputError() bool
InputError returns true as we want to treat all build planner errors as input errors and not report them to Rollbar. We defer the responsibility of logging these errors to the maintainers of the build planner.
func (*BuildPlannerError) LocaleError ¶
func (e *BuildPlannerError) LocaleError() string
LocaleError returns the error message to be displayed to the user. This function is added so that BuildPlannerErrors will be displayed to the user
func (*BuildPlannerError) Unwrap ¶
func (e *BuildPlannerError) Unwrap() error
type BuildResponse ¶
type BuildResponse struct { Type string `json:"__typename"` Artifacts []ArtifactResponse `json:"artifacts"` Status string `json:"status"` RawMessage json.RawMessage `json:"rawMessage"` *Error *ErrorWithSubErrors }
func (*BuildResponse) MarshalJSON ¶
func (b *BuildResponse) MarshalJSON() ([]byte, error)
func (*BuildResponse) UnmarshalJSON ¶
func (b *BuildResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON lets us record both the raw json message as well as unmarshal the parts we care about because without this function only the RawMessage itself would be set, the rest of the field would be empty. This is effectively working around a silly json library limitation.
type Commit ¶
type Commit struct { Type string `json:"__typename"` AtTime strfmt.DateTime `json:"atTime"` Expression json.RawMessage `json:"expr"` CommitID strfmt.UUID `json:"commitId"` ParentID strfmt.UUID `json:"parentId"` Build *BuildResponse `json:"build"` *Error *ErrorWithSubErrors }
Commit contains the build and any errors.
type CommitError ¶
type CommitError struct { Type string Message string *locale.LocalizedError // for legacy, non-user-facing error usages }
type ErrorWithSubErrors ¶
type ErrorWithSubErrors struct {
SubErrors []*BuildExprError `json:"subErrors"`
}
type GenericSolveError ¶
type GenericSolveError struct { IsTransient bool `json:"isTransient"` ValidationErrors []*SolverErrorValidationError `json:"validationErrors"` }
type MergedCommit ¶
type MergedCommit struct { Type string `json:"__typename"` Commit *Commit `json:"commit"` *Error *ErrorWithSubErrors }
MergedCommit is the result of a merge commit mutation. The resulting commit is only pushed to the platform automatically if the target ref was a named branch and the merge strategy was FastForward.
type MergedCommitError ¶
func (*MergedCommitError) Error ¶
func (m *MergedCommitError) Error() string
type ProjectCreated ¶
type ProjectCreatedError ¶
func (*ProjectCreatedError) Error ¶
func (p *ProjectCreatedError) Error() string
type ProjectResponse ¶
type ProjectResponse struct { Type string `json:"__typename"` Commit *Commit `json:"commit"` *Error }
ProjectResponse contains the commit and any errors.
func (*ProjectResponse) PostProcess ¶
func (pr *ProjectResponse) PostProcess() error
PostProcess must satisfy gqlclient.PostProcessor interface
type RevertCommitError ¶
func (*RevertCommitError) Error ¶
func (m *RevertCommitError) Error() string
type RevertedCommit ¶
type SolverErrorValidationError ¶
type SolverErrorValidationError struct { JSONPath string `json:"jsonPath"` Error string `json:"error"` }
SolverErrorValidationError represents a validation error that occurred during planning.
type TargetNotFoundError ¶
func (*TargetNotFoundError) Error ¶
func (e *TargetNotFoundError) Error() string
func (*TargetNotFoundError) InputError ¶
func (e *TargetNotFoundError) InputError() bool