Versions in this module Expand all Collapse all v1 v1.1.0 Oct 25, 2022 Changes in this version + var ErrNoJobAvailable = errors.New("no job available") + type AppendJobTraceParam struct + ContentLength int + JobID int + JobToken string + RangeStart int + Reader io.Reader + type Client struct + func NewClient(opt ClientOpt) (client *Client, err error) + func (c *Client) AppendJobTrace(ctx context.Context, param AppendJobTraceParam) (nextRangeStart int, err error) + func (c *Client) Register(ctx context.Context, param RegisterParam) (accessToken string, err error) + func (c *Client) RequestJob(ctx context.Context, accessToken string) (job RequestJobResp, err error) + func (c *Client) UpdateJob(ctx context.Context, param UpdateJobParam) (err error) + type ClientOpt struct + Endpoint string + Features Features + type FailureReason string + const FailureReasonArchivedFailure + const FailureReasonJobTimeout + const FailureReasonRunnerSystemFailure + const FailureReasonRunnerUnsupported + const FailureReasonScriptFailure + type Features struct + Artifacts bool + ArtifactsExclude bool + Cancelable bool + MultiBuildSteps bool + RawVariables bool + ReturnExitCode bool + Shared bool + TraceChecksum bool + TraceReset bool + TraceSize bool + UploadMultipleArtifacts bool + UploadRawArtifacts bool + Variables bool + type GitInfo struct + BeforeSha string + Depth int + Ref string + RefSpecs []string + RefType string + RepoURL string + Sha string + type Info struct + Architecture string + Executor string + Features Features + Name string + Platform string + Revision string + Shell string + Version string + type JobCredential struct + Password string + Type string + URL string + Username string + type JobInfo struct + ID int + Name string + ProjectID int + ProjectName string + Stage string + type JobState string + const JobStateFailed + const JobStateRunning + const JobStateSuccess + type JobStep struct + AllowFailure bool + Name string + Script []string + Timeout int + When string + type JobTrace struct + func NewJobTrace(opt JobTraceOpt) (trace *JobTrace, err error) + func (t *JobTrace) Complete(ctx context.Context) error + func (t *JobTrace) Fail(ctx context.Context, exitCode int, reason FailureReason) error + func (t *JobTrace) Write(p []byte) (n int, err error) + type JobTraceOpt struct + Client *Client + JobID int + JobToken string + Logger *zap.Logger + type JobVariable struct + Key string + Masked bool + Public bool + Value string + type RegisterParam struct + Description string + Token string + type RegisterReq struct + Description string + Info Info + Locked bool + MaintenanceNote string + Paused bool + RunUntagged bool + Token string + type RegisterResp struct + ID int + Token string + type RequestJobReq struct + Info Info + LastUpdate string + Token string + type RequestJobResp struct + AllowGitFetch bool + Artifacts interface{} + Credentials []JobCredential + GitInfo GitInfo + ID int + JobInfo JobInfo + Steps []JobStep + Token string + Variables []JobVariable + type TraceSummary struct + ByteSize int + Checksum string + type UpdateJobParam struct + ExitCode int + FailureReason FailureReason + JobID int + JobToken string + State JobState + TraceByteSize int + TraceChecksum string + type UpdateJobReq struct + Checksum string + ExitCode int + FailureReason FailureReason + Info Info + Output TraceSummary + State JobState + Token string