Documentation ¶
Overview ¶
Package circleci provides a Client for making requests to CircleCI.
Index ¶
- type BuildAction
- type BuildResponse
- type BuildStep
- type Client
- func (c *Client) Build(ctx context.Context, num uint64) (*BuildResponse, error)
- func (c *Client) BuildActionOutput(ctx context.Context, b *BuildAction) (string, error)
- func (c *Client) Pipelines(ctx context.Context, branch string, limit uint64) ([]*Pipeline, error)
- func (c *Client) RetryWorkflow(ctx context.Context, workflowID string) (string, error)
- type Job
- type Pipeline
- type Project
- type Workflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildAction ¶
BuildAction is used to Marshal the response from CircleCI when retreiving the output of a build. A BuildAction contains a URL that has to the full output of a single action.
type BuildResponse ¶
type BuildResponse struct {
Steps []*BuildStep `json:"steps"`
}
BuildResponse is used to Marshal the response from CircleCI when retreiving the output of a Build.
type BuildStep ¶
type BuildStep struct { Name string `json:"name"` Actions []*BuildAction `json:"actions"` }
BuildStep is used to Marshal the response from CircleCI when retreiving the output of a Build. A Build can have multiple steps.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is used to make HTTP requests to CircleCI.
func (*Client) BuildActionOutput ¶
BuildActionOutput is used to get the full output for a BuildAction. If the BuildAction has output, it will retrieve the full output from the OutputURL.
func (*Client) Pipelines ¶
Pipelines returns a summary of the most recent Pipeline execution for the given branch.
func (*Client) RetryWorkflow ¶
RetryWorkflow will re-run the given workflow. The endpoint documentation appears to allow specifying the job ids to presumably only run a single job in a workflow. However, this does not seem to be the behavior, instead it runs the full workflow even if a single job is specified.
type Job ¶
type Job struct { ID string `json:"id"` Number uint64 `json:"job_number"` Name string `json:"name"` Status string `json:"status"` }
Job provides a summary of a Job. A workflow contains one or more Jobs.
type Pipeline ¶
type Pipeline struct { ID string `json:"id"` Number uint64 `json:"number"` State string `json:"state"` Updated *time.Time `json:"updated_at"` Workflows []*Workflow `json:"-"` }
Pipeline provides a summary of a single pipeline execution.