Documentation ¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func Int(v int) *int
- func ParseWebHook(messageType string, payload []byte) (interface{}, error)
- func SetHttpDebug(flag bool)
- func String(v string) *string
- func ValidatePayload(r *http.Request, secretKey []byte) (payload []byte, err error)
- func WebHookType(r *http.Request) string
- type AccessToken
- type AccessTokensService
- type Agent
- type AgentConnectedEvent
- type AgentDisconnectedEvent
- type AgentEvent
- type AgentListOptions
- type AgentLostEvent
- type AgentStoppedEvent
- type AgentStoppingEvent
- type AgentsService
- func (as *AgentsService) Create(org string, agent *Agent) (*Agent, *Response, error)
- func (as *AgentsService) Delete(org string, id string) (*Response, error)
- func (as *AgentsService) Get(org string, id string) (*Agent, *Response, error)
- func (as *AgentsService) List(org string, opt *AgentListOptions) ([]Agent, *Response, error)
- func (as *AgentsService) Stop(org string, id string, force bool) (*Response, error)
- type Annotation
- type AnnotationCreate
- type AnnotationListOptions
- type AnnotationsService
- type Artifact
- type ArtifactListOptions
- type ArtifactsService
- func (as *ArtifactsService) DownloadArtifactByURL(url string, w io.Writer) (*Response, error)
- func (as *ArtifactsService) ListByBuild(org string, pipeline string, build string, opt *ArtifactListOptions) ([]Artifact, *Response, error)
- func (as *ArtifactsService) ListByJob(org string, pipeline string, build string, job string, ...) ([]Artifact, *Response, error)
- type Author
- type BasicAuthTransport
- type BitbucketSettings
- type Build
- type BuildEvent
- type BuildFailingEvent
- type BuildFinishedEvent
- type BuildRunningEvent
- type BuildScheduledEvent
- type BuildsListOptions
- type BuildsService
- func (bs *BuildsService) Cancel(org, pipeline, build string) (*Build, error)
- func (bs *BuildsService) Create(org string, pipeline string, b *CreateBuild) (*Build, *Response, error)
- func (bs *BuildsService) Get(org string, pipeline string, id string, opt *BuildsListOptions) (*Build, *Response, error)
- func (bs *BuildsService) List(opt *BuildsListOptions) ([]Build, *Response, error)
- func (bs *BuildsService) ListByOrg(org string, opt *BuildsListOptions) ([]Build, *Response, error)
- func (bs *BuildsService) ListByPipeline(org string, pipeline string, opt *BuildsListOptions) ([]Build, *Response, error)
- func (bs *BuildsService) Rebuild(org, pipeline, build string) (*Build, error)
- type Client
- type Cluster
- type ClusterCreate
- type ClusterCreator
- type ClusterQueue
- type ClusterQueueCreate
- type ClusterQueuePause
- type ClusterQueueUpdate
- type ClusterQueuesListOptions
- type ClusterQueuesService
- func (cqs *ClusterQueuesService) Create(org, clusterID string, qc *ClusterQueueCreate) (*ClusterQueue, *Response, error)
- func (cqs *ClusterQueuesService) Delete(org, clusterID, queueID string) (*Response, error)
- func (cqs *ClusterQueuesService) Get(org, clusterID, queueID string) (*ClusterQueue, *Response, error)
- func (cqs *ClusterQueuesService) List(org, clusterID string, opt *ClusterQueuesListOptions) ([]ClusterQueue, *Response, error)
- func (cqs *ClusterQueuesService) Pause(org, clusterID, queueID string, qp *ClusterQueuePause) (*Response, error)
- func (cqs *ClusterQueuesService) Resume(org, clusterID, queueID string) (*Response, error)
- func (cqs *ClusterQueuesService) Update(org, clusterID, queueID string, qu *ClusterQueueUpdate) (*Response, error)
- type ClusterToken
- type ClusterTokenCreateUpdate
- type ClusterTokensListOptions
- type ClusterTokensService
- func (cts *ClusterTokensService) Create(org, clusterID string, ctc *ClusterTokenCreateUpdate) (*ClusterToken, *Response, error)
- func (cts *ClusterTokensService) Delete(org, clusterID, tokenID string) (*Response, error)
- func (cts *ClusterTokensService) Get(org, clusterID, tokenID string) (*ClusterToken, *Response, error)
- func (cts *ClusterTokensService) List(org, clusterID string, opt *ClusterTokensListOptions) ([]ClusterToken, *Response, error)
- func (cts *ClusterTokensService) Update(org, clusterID, tokenID string, ctc *ClusterTokenCreateUpdate) (*Response, error)
- type ClusterUpdate
- type ClustersListOptions
- type ClustersService
- func (cs *ClustersService) Create(org string, cc *ClusterCreate) (*Cluster, *Response, error)
- func (cs *ClustersService) Delete(org, id string) (*Response, error)
- func (cs *ClustersService) Get(org, id string) (*Cluster, *Response, error)
- func (cs *ClustersService) List(org string, opt *ClustersListOptions) ([]Cluster, *Response, error)
- func (cs *ClustersService) Update(org, id string, cu *ClusterUpdate) (*Response, error)
- type CreateBuild
- type CreatePipeline
- type Creator
- type Emoji
- type ErrorResponse
- type Event
- type FlakyTest
- type FlakyTestsListOptions
- type FlakyTestsService
- type GitHubEnterpriseSettings
- type GitHubSettings
- type GitLabSettings
- type Job
- type JobActivatedEvent
- type JobEnvs
- type JobEvent
- type JobFinishedEvent
- type JobLog
- type JobPriority
- type JobRetrySource
- type JobScheduledEvent
- type JobStartedEvent
- type JobUnblockOptions
- type JobsService
- func (js *JobsService) GetJobEnvironmentVariables(org string, pipeline string, buildNumber string, jobID string) (*JobEnvs, *Response, error)
- func (js *JobsService) GetJobLog(org string, pipeline string, buildNumber string, jobID string) (*JobLog, *Response, error)
- func (js *JobsService) RetryJob(org string, pipeline string, buildNumber string, jobID string) (*Job, *Response, error)
- func (js *JobsService) UnblockJob(org string, pipeline string, buildNumber string, jobID string, ...) (*Job, *Response, error)
- type ListOptions
- type MetaDataFilters
- type Organization
- type OrganizationListOptions
- type OrganizationsService
- type PingEvent
- type Pipeline
- type PipelineListOptions
- type PipelineTemplate
- type PipelineTemplateCreateUpdate
- type PipelineTemplateCreator
- type PipelineTemplateListOptions
- type PipelineTemplatesService
- func (pts *PipelineTemplatesService) Create(org string, ptc *PipelineTemplateCreateUpdate) (*PipelineTemplate, *Response, error)
- func (pts *PipelineTemplatesService) Delete(org, templateUUID string) (*Response, error)
- func (pts *PipelineTemplatesService) Get(org, templateUUID string) (*PipelineTemplate, *Response, error)
- func (pts *PipelineTemplatesService) List(org string, opt *PipelineTemplateListOptions) ([]PipelineTemplate, *Response, error)
- func (pts *PipelineTemplatesService) Update(org, templateUUID string, ptu *PipelineTemplateCreateUpdate) (*Response, error)
- type PipelinesService
- func (ps *PipelinesService) AddWebhook(org string, slug string) (*Response, error)
- func (ps *PipelinesService) Archive(org string, slug string) (*Response, error)
- func (ps *PipelinesService) Create(org string, p *CreatePipeline) (*Pipeline, *Response, error)
- func (ps *PipelinesService) Delete(org string, slug string) (*Response, error)
- func (ps *PipelinesService) Get(org string, slug string) (*Pipeline, *Response, error)
- func (ps *PipelinesService) List(org string, opt *PipelineListOptions) ([]Pipeline, *Response, error)
- func (ps *PipelinesService) Unarchive(org string, slug string) (*Response, error)
- func (ps *PipelinesService) Update(org string, p *Pipeline) (*Response, error)
- type Plugin
- type Plugins
- type Provider
- type ProviderSettings
- type PullRequest
- type RebuiltFrom
- type Response
- type Step
- type Team
- type TeamsListOptions
- type TeamsService
- type Test
- type TestRun
- type TestRunsListOptions
- type TestRunsService
- type TestSuite
- type TestSuiteCreate
- type TestSuiteListOptions
- type TestSuitesService
- func (tss *TestSuitesService) Create(org string, ts *TestSuiteCreate) (*TestSuite, *Response, error)
- func (tss *TestSuitesService) Delete(org, slug string) (*Response, error)
- func (tss *TestSuitesService) Get(org, slug string) (*TestSuite, *Response, error)
- func (tss *TestSuitesService) List(org string, opt *TestSuiteListOptions) ([]TestSuite, *Response, error)
- func (tss *TestSuitesService) Update(org string, ts *TestSuite) (*Response, error)
- type TestsService
- type Timestamp
- type Token
- type TokenAuthTransport
- type TriggeredBuild
- type TriggeredFrom
- type UnblockedBy
- type UpdatePipeline
- type User
- type UserService
Constants ¶
const ( // EventTypeHeader is the Buildkite header key used to pass the event type EventTypeHeader = "X-Buildkite-Event" // SignatureHeader is the Buildkite header key used to pass the HMAC hexdigest. SignatureHeader = "X-Buildkite-Signature" )
const BuildKiteDateFormat = time.RFC3339Nano
BuildKiteDateFormat is the format of the dates used throughout the api, note this odd string is used to parse/format dates in go
const BuildKiteEventDateFormat = "2006-01-02 15:04:05 MST"
BuildKiteEventDateFormat is the format of the dates used in webhook events.
const Version = "3.11.0"
Version the library version number
Variables ¶
This section is empty.
Functions ¶
func Int ¶
Int is a helper routine that allocates a new int value to store v and returns a pointer to it, but unlike Int its argument value is an int.
func ParseWebHook ¶ added in v3.1.0
ParseWebHook parses the event payload. For recognized event types, a value of the corresponding struct type will be returned (as returned by Event.ParsePayload()). An error will be returned for unrecognized event types.
func SetHttpDebug ¶
func SetHttpDebug(flag bool)
SetHttpDebug this enables global http request/response dumping for this API
func String ¶
String is a helper routine that allocates a new string value to store v and returns a pointer to it.
func ValidatePayload ¶ added in v3.1.0
ValidatePayload validates an incoming Buildkite Webhook event request and returns the (JSON) payload. secretKey is the Buildkite Webhook token.
Example usage:
func WebHookType ¶ added in v3.1.0
WebHookType returns the event type of webhook request r.
Buildkite API docs: https://buildkite.com/docs/apis/webhooks
Types ¶
type AccessToken ¶
type AccessTokensService ¶
type AccessTokensService struct {
// contains filtered or unexported fields
}
func (*AccessTokensService) Get ¶
func (ats *AccessTokensService) Get() (*AccessToken, *Response, error)
Get gets the current token which was used to authenticate the request
buildkite API docs: https://buildkite.com/docs/rest-api/access-token
func (*AccessTokensService) Revoke ¶
func (ats *AccessTokensService) Revoke() (*Response, error)
Revokes the current token which was used to authenticate the request
buildkite API docs: https://buildkite.com/docs/rest-api/access-token
type Agent ¶
type Agent struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` ConnectedState *string `json:"connection_state,omitempty" yaml:"connection_state,omitempty"` AgentToken *string `json:"access_token,omitempty" yaml:"access_token,omitempty"` Hostname *string `json:"hostname,omitempty" yaml:"hostname,omitempty"` IPAddress *string `json:"ip_address,omitempty" yaml:"ip_address,omitempty"` UserAgent *string `json:"user_agent,omitempty" yaml:"user_agent,omitempty"` Version *string `json:"version,omitempty" yaml:"version,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` LastJobFinishedAt *Timestamp `json:"last_job_finished_at,omitempty" yaml:"last_job_finished_at,omitempty"` Priority *int `json:"priority,omitempty" yaml:"priority,omitempty"` Metadata []string `json:"meta_data,omitempty" yaml:"meta_data,omitempty"` // the user that created the agent Creator *User `json:"creator,omitempty" yaml:"creator,omitempty"` Job *Job `json:"job,omitempty" yaml:"job,omitempty"` }
Agent represents a buildkite build agent.
type AgentConnectedEvent ¶ added in v3.1.0
type AgentConnectedEvent struct {
AgentEvent
}
AgentConnectedEvent is triggered when an agent has connected to the API
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentDisconnectedEvent ¶ added in v3.1.0
type AgentDisconnectedEvent struct {
AgentEvent
}
AgentDisconnectedEvent is triggered when an agent has disconnected.
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentEvent ¶ added in v3.11.0
type AgentEvent struct { Event *string `json:"event"` Agent *Agent `json:"agent"` Sender *User `json:"sender"` }
agentEvent is a wrapper for an agent event notification
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentListOptions ¶
type AgentListOptions struct { // Filters the results by the given agent name Name string `url:"name,omitempty"` // Filters the results by the given hostname Hostname string `url:"hostname,omitempty"` // Filters the results by the given exact version number Version string `url:"version,omitempty"` ListOptions }
AgentListOptions specifies the optional parameters to the AgentService.List method.
type AgentLostEvent ¶ added in v3.1.0
type AgentLostEvent struct {
AgentEvent
}
AgentLostEvent is triggered when an agent has been marked as lost.
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentStoppedEvent ¶ added in v3.1.0
type AgentStoppedEvent struct {
AgentEvent
}
AgentStoppedEvent is triggered when an agent has stopped.
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentStoppingEvent ¶ added in v3.1.0
type AgentStoppingEvent struct {
AgentEvent
}
AgentStoppingEvent is triggered when an agent is stopping.
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentsService ¶
type AgentsService struct {
// contains filtered or unexported fields
}
AgentsService handles communication with the agent related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api/agents
func (*AgentsService) Create ¶
Create a new buildkite agent.
buildkite API docs: https://buildkite.com/docs/api/agents#create-an-agent
func (*AgentsService) Delete ¶
func (as *AgentsService) Delete(org string, id string) (*Response, error)
Delete an agent.
buildkite API docs: https://buildkite.com/docs/api/agents#delete-an-agent
func (*AgentsService) Get ¶
Get fetches an agent.
buildkite API docs: https://buildkite.com/docs/api/agents#get-an-agent
func (*AgentsService) List ¶
func (as *AgentsService) List(org string, opt *AgentListOptions) ([]Agent, *Response, error)
List the agents for a given orginisation.
buildkite API docs: https://buildkite.com/docs/api/agents#list-agents
func (*AgentsService) Stop ¶
Stop an agent.
buildkite API docs: https://buildkite.com/docs/apis/rest-api/agents#stop-an-agent
type Annotation ¶
type Annotation struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` Context *string `json:"context,omitempty" yaml:"context,omitempty"` Style *string `json:"style,omitempty" yaml:"style,omitempty"` BodyHTML *string `json:"body_html,omitempty" yaml:"body_html,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty" yaml:"updated_at,omitempty"` }
Annotation represents an annotation which has been stored from a build
type AnnotationCreate ¶ added in v3.8.0
type AnnotationListOptions ¶
type AnnotationListOptions struct {
ListOptions
}
AnnotationListOptions specifies the optional parameters to the AnnoationsService.List method.
type AnnotationsService ¶
type AnnotationsService struct {
// contains filtered or unexported fields
}
AnnotationsService handles communication with the annotation related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api/annotations
func (*AnnotationsService) Create ¶ added in v3.8.0
func (as *AnnotationsService) Create(org, pipeline, build string, ac *AnnotationCreate) (*Annotation, *Response, error)
func (*AnnotationsService) ListByBuild ¶
func (as *AnnotationsService) ListByBuild(org string, pipeline string, build string, opt *AnnotationListOptions) ([]Annotation, *Response, error)
ListByBuild gets annotations for a specific build
buildkite API docs: https://buildkite.com/docs/apis/rest-api/annotations#list-annotations-for-a-build
type Artifact ¶
type Artifact struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` JobID *string `json:"job_id,omitempty" yaml:"job_id,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` DownloadURL *string `json:"download_url,omitempty" yaml:"download_url,omitempty"` State *string `json:"state,omitempty" yaml:"state,omitempty"` Path *string `json:"path,omitempty" yaml:"path,omitempty"` Dirname *string `json:"dirname,omitempty" yaml:"dirname,omitempty"` Filename *string `json:"filename,omitempty" yaml:"filename,omitempty"` MimeType *string `json:"mime_type,omitempty" yaml:"mime_type,omitempty"` FileSize *int64 `json:"file_size,omitempty" yaml:"file_size,omitempty"` GlobPath *string `json:"glob_path,omitempty" yaml:"glob_path,omitempty"` OriginalPath *string `json:"original_path,omitempty" yaml:"original_path,omitempty"` SHA1 *string `json:"sha1sum,omitempty" yaml:"sha1sum,omitempty"` }
Artifact represents an artifact which has been stored from a build
type ArtifactListOptions ¶
type ArtifactListOptions struct {
ListOptions
}
ArtifactListOptions specifies the optional parameters to the ArtifactsService.List method.
type ArtifactsService ¶
type ArtifactsService struct {
// contains filtered or unexported fields
}
ArtifactsService handles communication with the artifact related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api/artifacts
func (*ArtifactsService) DownloadArtifactByURL ¶
DownloadArtifactByURL gets artifacts for a specific build
buildkite API docs: https://buildkite.com/docs/api/artifacts#list-artifacts-for-a-build
func (*ArtifactsService) ListByBuild ¶
func (as *ArtifactsService) ListByBuild(org string, pipeline string, build string, opt *ArtifactListOptions) ([]Artifact, *Response, error)
ListByBuild gets artifacts for a specific build
buildkite API docs: https://buildkite.com/docs/api/artifacts#list-artifacts-for-a-build
func (*ArtifactsService) ListByJob ¶
func (as *ArtifactsService) ListByJob(org string, pipeline string, build string, job string, opt *ArtifactListOptions) ([]Artifact, *Response, error)
ListByJob gets artifacts for a specific build
buildkite API docs: https://buildkite.com/docs/apis/rest-api/artifacts#list-artifacts-for-a-job
type Author ¶
type Author struct { Username string `json:"username,omitempty" yaml:"username,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Email string `json:"email,omitempty" yaml:"email,omitempty"` }
Author of a commit (used in CreateBuild)
type BasicAuthTransport ¶
BasicAuthTransport manages injection of the authorization header
func NewBasicConfig ¶
func NewBasicConfig(username string, password string) (*BasicAuthTransport, error)
NewBasicConfig configure authentication using the supplied credentials
func (*BasicAuthTransport) Client ¶
func (bat *BasicAuthTransport) Client() *http.Client
Client builds a new http client.
type BitbucketSettings ¶
type BitbucketSettings struct { BuildPullRequests *bool `json:"build_pull_requests,omitempty" yaml:"build_pull_requests,omitempty"` BuildBranches *bool `json:"build_branches,omitempty" yaml:"build_branches,omitempty"` PullRequestBranchFilterEnabled *bool `json:"pull_request_branch_filter_enabled,omitempty" yaml:"pull_request_branch_filter_enabled,omitempty"` PullRequestBranchFilterConfiguration *string `json:"pull_request_branch_filter_configuration,omitempty" yaml:"pull_request_branch_filter_configuration,omitempty"` SkipPullRequestBuildsForExistingCommits *bool `json:"skip_pull_request_builds_for_existing_commits,omitempty" yaml:"skip_pull_request_builds_for_existing_commits,omitempty"` BuildTags *bool `json:"build_tags,omitempty" yaml:"build_tags,omitempty"` PublishCommitStatus *bool `json:"publish_commit_status,omitempty" yaml:"publish_commit_status,omitempty"` PublishCommitStatusPerStep *bool `json:"publish_commit_status_per_step,omitempty" yaml:"publish_commit_status_per_step,omitempty"` // Read-only Repository *string `json:"repository,omitempty" yaml:"repository,omitempty"` }
BitbucketSettings are settings for pipelines building from Bitbucket repositories.
type Build ¶
type Build struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` Number *int `json:"number,omitempty" yaml:"number,omitempty"` State *string `json:"state,omitempty" yaml:"state,omitempty"` Blocked *bool `json:"blocked,omitempty" yaml:"blocked,omitempty"` Message *string `json:"message,omitempty" yaml:"message,omitempty"` Commit *string `json:"commit,omitempty" yaml:"commit,omitempty"` Branch *string `json:"branch,omitempty" yaml:"branch,omitempty"` Author *Author `json:"author,omitempty" yaml:"author,omitempty"` Env map[string]interface{} `json:"env,omitempty" yaml:"env,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` ScheduledAt *Timestamp `json:"scheduled_at,omitempty" yaml:"scheduled_at,omitempty"` StartedAt *Timestamp `json:"started_at,omitempty" yaml:"started_at,omitempty"` FinishedAt *Timestamp `json:"finished_at,omitempty" yaml:"finished_at,omitempty"` MetaData map[string]string `json:"meta_data,omitempty" yaml:"meta_data,omitempty"` Creator *Creator `json:"creator,omitempty" yaml:"creator,omitempty"` Source *string `json:"source,omitempty" yaml:"source,omitempty"` // jobs run during the build Jobs []*Job `json:"jobs,omitempty" yaml:"jobs,omitempty"` // the pipeline this build is associated with Pipeline *Pipeline `json:"pipeline,omitempty" yaml:"pipeline,omitempty"` // the build this build is a rebuild of RebuiltFrom *RebuiltFrom `json:"rebuilt_from,omitempty" yaml:"rebuilt_from,omitempty"` // the pull request this build is associated with PullRequest *PullRequest `json:"pull_request,omitempty" yaml:"pull_request,omitempty"` // the build that this build is triggered from // https://buildkite.com/docs/pipelines/trigger-step TriggeredFrom *TriggeredFrom `json:"triggered_from,omitempty" yaml:"triggered_from,omitempty"` }
Build represents a build which has run in buildkite
type BuildEvent ¶ added in v3.11.0
type BuildEvent struct { Event *string `json:"event"` Build *Build `json:"build"` Pipeline *Pipeline `json:"pipeline"` Sender *User `json:"sender"` }
buildEvent is a wrapper for a build event notification
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildFailingEvent ¶ added in v3.4.0
type BuildFailingEvent struct {
BuildEvent
}
BuildFailingEvent is triggered when a build enters a failing state
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildFinishedEvent ¶ added in v3.1.0
type BuildFinishedEvent struct {
BuildEvent
}
BuildFinishedEvent is triggered when a build finishes
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildRunningEvent ¶ added in v3.1.0
type BuildRunningEvent struct {
BuildEvent
}
BuildRunningEvent is triggered when a build starts running
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildScheduledEvent ¶ added in v3.1.0
type BuildScheduledEvent struct {
BuildEvent
}
BuildScheduledEvent is triggered when a build is scheduled
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildsListOptions ¶
type BuildsListOptions struct { // Filters the results by the user who created the build Creator string `url:"creator,omitempty"` // Filters the results by builds created on or after the given time CreatedFrom time.Time `url:"created_from,omitempty"` // Filters the results by builds created before the given time CreatedTo time.Time `url:"created_to,omitempty"` // Filters the results by builds finished on or after the given time FinishedFrom time.Time `url:"finished_from,omitempty"` // State of builds to list. Possible values are: running, scheduled, passed, // failed, canceled, skipped and not_run. Default is "". State []string `url:"state,brackets,omitempty"` // Filters the results by branch name(s) Branch []string `url:"branch,brackets,omitempty"` // Filters the results by builds for the specific commit SHA (full, not shortened). Default is "". Commit string `url:"commit,omitempty"` // Include all retried jobs in each build’s jobs list IncludeRetriedJobs bool `url:"include_retried_jobs,omitempty"` // Filters results by metadata. MetaData MetaDataFilters `url:"meta_data,omitempty"` ListOptions }
BuildsListOptions specifies the optional parameters to the BuildsService.List method.
type BuildsService ¶
type BuildsService struct {
// contains filtered or unexported fields
}
BuildsService handles communication with the build related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api/builds
func (*BuildsService) Cancel ¶
func (bs *BuildsService) Cancel(org, pipeline, build string) (*Build, error)
Cancel - Trigger a cancel for the target build
buildkite API docs: https://buildkite.com/docs/apis/rest-api/builds#cancel-a-build
func (*BuildsService) Create ¶
func (bs *BuildsService) Create(org string, pipeline string, b *CreateBuild) (*Build, *Response, error)
Create - Create a pipeline
buildkite API docs: https://buildkite.com/docs/api/builds#create-a-build
func (*BuildsService) Get ¶
func (bs *BuildsService) Get(org string, pipeline string, id string, opt *BuildsListOptions) (*Build, *Response, error)
Get fetches a build.
buildkite API docs: https://buildkite.com/docs/api/builds#get-a-build
func (*BuildsService) List ¶
func (bs *BuildsService) List(opt *BuildsListOptions) ([]Build, *Response, error)
List the builds for the current user.
buildkite API docs: https://buildkite.com/docs/api/builds#list-all-builds
func (*BuildsService) ListByOrg ¶
func (bs *BuildsService) ListByOrg(org string, opt *BuildsListOptions) ([]Build, *Response, error)
ListByOrg lists the builds within the specified orginisation.
buildkite API docs: https://buildkite.com/docs/api/builds#list-builds-for-an-organization
func (*BuildsService) ListByPipeline ¶
func (bs *BuildsService) ListByPipeline(org string, pipeline string, opt *BuildsListOptions) ([]Build, *Response, error)
ListByPipeline lists the builds for a pipeline within the specified originisation.
buildkite API docs: https://buildkite.com/docs/api/builds#list-builds-for-a-pipeline
func (*BuildsService) Rebuild ¶
func (bs *BuildsService) Rebuild(org, pipeline, build string) (*Build, error)
Rebuild triggers a rebuild for the target build
buildkite API docs: https://buildkite.com/docs/apis/rest-api/builds#rebuild-a-build
type Client ¶
type Client struct { // Base URL for API requests. Defaults to the public buildkite API. BaseURL should // always be specified with a trailing slash. BaseURL *url.URL // User agent used when communicating with the buildkite API. UserAgent string // Services used for talking to different parts of the buildkite API. AccessTokens *AccessTokensService Agents *AgentsService Annotations *AnnotationsService Artifacts *ArtifactsService Builds *BuildsService Clusters *ClustersService ClusterQueues *ClusterQueuesService ClusterTokens *ClusterTokensService FlakyTests *FlakyTestsService Jobs *JobsService Organizations *OrganizationsService Pipelines *PipelinesService PipelineTemplates *PipelineTemplatesService User *UserService Teams *TeamsService Tests *TestsService TestRuns *TestRunsService TestSuites *TestSuitesService // contains filtered or unexported fields }
Client - A Client manages communication with the buildkite API.
func NewClient ¶
NewClient returns a new buildkite API client. As API calls require authentication you MUST supply a client which provides the required API key.
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.
func (*Client) ListEmojis ¶
ListEmojis list all the emojis for a given account, including custom emojis and aliases.
buildkite API docs: https://buildkite.com/docs/api/emojis
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type Cluster ¶ added in v3.6.0
type Cluster struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` DefaultQueueID *string `json:"default_queue_id,omitempty" yaml:"default_queue_id,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Emoji *string `json:"emoji,omitempty" yaml:"emoji,omitempty"` Color *string `json:"color,omitempty" yaml:"color,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` QueuesURL *string `json:"queues_url,omitempty" yaml:"queues_url,omitempty"` DefaultQueueURL *string `json:"default_queue_url,omitempty" yaml:"default_queue_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` CreatedBy *ClusterCreator `json:"created_by,omitempty" yaml:"created_by,omitempty"` }
type ClusterCreate ¶ added in v3.6.0
type ClusterCreator ¶ added in v3.6.0
type ClusterCreator struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Email *string `json:"email,omitempty" yaml:"email,omitempty"` AvatarURL *string `json:"avatar_url,omitempty" yaml:"avatar_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` }
type ClusterQueue ¶ added in v3.6.0
type ClusterQueue struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` Key *string `json:"key,omitempty" yaml:"key,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` ClusterURL *string `json:"cluster_url,omitempty" yaml:"cluster_url,omitempty"` DispatchPaused *bool `json:"dispatch_paused,omitempty" yaml:"dispatch_paused,omitempty"` DispatchPausedBy *ClusterCreator `json:"dispatch_paused_by,omitempty" yaml:"dispatch_paused_by,omitempty"` DispatchPausedAt *Timestamp `json:"dispatch_paused_at,omitempty" yaml:"dispatch_paused_at,omitempty"` DispatchPausedNote *string `json:"dispatch_paused_note,omitempty" yaml:"dispatch_paused_note,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` CreatedBy *ClusterCreator `json:"created_by,omitempty" yaml:"created_by,omitempty"` }
type ClusterQueueCreate ¶ added in v3.6.0
type ClusterQueuePause ¶ added in v3.6.0
type ClusterQueuePause struct {
Note *string `json:"dispatch_paused_note,omitempty" yaml:"dispatch_paused_note,omitempty"`
}
type ClusterQueueUpdate ¶ added in v3.6.0
type ClusterQueueUpdate struct {
Description *string `json:"description,omitempty" yaml:"description,omitempty"`
}
type ClusterQueuesListOptions ¶ added in v3.6.0
type ClusterQueuesListOptions struct {
ListOptions
}
type ClusterQueuesService ¶ added in v3.6.0
type ClusterQueuesService struct {
// contains filtered or unexported fields
}
ClusterQueuesService handles communication with cluster queue related methods of the Buildkite API.
Buildkite API docs: https://buildkite.com/docs/apis/rest-api/clusters#cluster-queues
func (*ClusterQueuesService) Create ¶ added in v3.6.0
func (cqs *ClusterQueuesService) Create(org, clusterID string, qc *ClusterQueueCreate) (*ClusterQueue, *Response, error)
func (*ClusterQueuesService) Delete ¶ added in v3.6.0
func (cqs *ClusterQueuesService) Delete(org, clusterID, queueID string) (*Response, error)
func (*ClusterQueuesService) Get ¶ added in v3.6.0
func (cqs *ClusterQueuesService) Get(org, clusterID, queueID string) (*ClusterQueue, *Response, error)
func (*ClusterQueuesService) List ¶ added in v3.6.0
func (cqs *ClusterQueuesService) List(org, clusterID string, opt *ClusterQueuesListOptions) ([]ClusterQueue, *Response, error)
func (*ClusterQueuesService) Pause ¶ added in v3.6.0
func (cqs *ClusterQueuesService) Pause(org, clusterID, queueID string, qp *ClusterQueuePause) (*Response, error)
func (*ClusterQueuesService) Resume ¶ added in v3.6.0
func (cqs *ClusterQueuesService) Resume(org, clusterID, queueID string) (*Response, error)
func (*ClusterQueuesService) Update ¶ added in v3.6.0
func (cqs *ClusterQueuesService) Update(org, clusterID, queueID string, qu *ClusterQueueUpdate) (*Response, error)
type ClusterToken ¶ added in v3.6.0
type ClusterToken struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` AllowedIPAddresses *string `json:"allowed_ip_addresses,omitempty" yaml:"allowed_ip_addresses,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` ClusterURL *string `json:"cluster_url,omitempty" yaml:"cluster_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` CreatedBy *ClusterCreator `json:"created_by,omitempty" yaml:"created_by,omitempty"` Token *string `json:"token,omitempty" yaml:"token,omitempty"` }
type ClusterTokenCreateUpdate ¶ added in v3.6.0
type ClusterTokensListOptions ¶ added in v3.6.0
type ClusterTokensListOptions struct {
ListOptions
}
type ClusterTokensService ¶ added in v3.6.0
type ClusterTokensService struct {
// contains filtered or unexported fields
}
ClusterTokensService handles communication with cluster token related methods of the Buildkite API.
Buildkite API docs: https://buildkite.com/docs/apis/rest-api/clusters#cluster-tokens
func (*ClusterTokensService) Create ¶ added in v3.6.0
func (cts *ClusterTokensService) Create(org, clusterID string, ctc *ClusterTokenCreateUpdate) (*ClusterToken, *Response, error)
func (*ClusterTokensService) Delete ¶ added in v3.6.0
func (cts *ClusterTokensService) Delete(org, clusterID, tokenID string) (*Response, error)
func (*ClusterTokensService) Get ¶ added in v3.6.0
func (cts *ClusterTokensService) Get(org, clusterID, tokenID string) (*ClusterToken, *Response, error)
func (*ClusterTokensService) List ¶ added in v3.6.0
func (cts *ClusterTokensService) List(org, clusterID string, opt *ClusterTokensListOptions) ([]ClusterToken, *Response, error)
func (*ClusterTokensService) Update ¶ added in v3.6.0
func (cts *ClusterTokensService) Update(org, clusterID, tokenID string, ctc *ClusterTokenCreateUpdate) (*Response, error)
type ClusterUpdate ¶ added in v3.6.0
type ClusterUpdate struct { Name *string `json:"name,omitempty" yaml:"name,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Emoji *string `json:"emoji,omitempty" yaml:"emoji,omitempty"` Color *string `json:"color,omitempty" yaml:"color,omitempty"` DefaultQueueID *string `json:"default_queue_id,omitempty" yaml:"default_queue_id,omitempty"` }
type ClustersListOptions ¶ added in v3.6.0
type ClustersListOptions struct {
ListOptions
}
type ClustersService ¶ added in v3.6.0
type ClustersService struct {
// contains filtered or unexported fields
}
ClustersService handles communication with cluster related methods of the Buildkite API.
Buildkite API docs: https://buildkite.com/docs/apis/rest-api/clusters#clusters
func (*ClustersService) Create ¶ added in v3.6.0
func (cs *ClustersService) Create(org string, cc *ClusterCreate) (*Cluster, *Response, error)
func (*ClustersService) Delete ¶ added in v3.6.0
func (cs *ClustersService) Delete(org, id string) (*Response, error)
func (*ClustersService) Get ¶ added in v3.6.0
func (cs *ClustersService) Get(org, id string) (*Cluster, *Response, error)
func (*ClustersService) List ¶ added in v3.6.0
func (cs *ClustersService) List(org string, opt *ClustersListOptions) ([]Cluster, *Response, error)
func (*ClustersService) Update ¶ added in v3.6.0
func (cs *ClustersService) Update(org, id string, cu *ClusterUpdate) (*Response, error)
type CreateBuild ¶
type CreateBuild struct { Commit string `json:"commit" yaml:"commit"` Branch string `json:"branch" yaml:"branch"` Message string `json:"message" yaml:"message"` // Optional fields Author Author `json:"author,omitempty" yaml:"author,omitempty"` CleanCheckout bool `json:"clean_checkout,omitempty" yaml:"clean_checkout,omitempty"` Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"` MetaData map[string]string `json:"meta_data,omitempty" yaml:"meta_data,omitempty"` IgnorePipelineBranchFilters bool `json:"ignore_pipeline_branch_filters,omitempty" yaml:"ignore_pipeline_branch_filters,omitempty"` PullRequestBaseBranch string `json:"pull_request_base_branch,omitempty" yaml:"pull_request_base_branch,omitempty"` PullRequestID int64 `json:"pull_request_id,omitempty" yaml:"pull_request_id,omitempty"` PullRequestRepository string `json:"pull_request_repository,omitempty" yaml:"pull_request_repository,omitempty"` }
CreateBuild - Create a build.
type CreatePipeline ¶
type CreatePipeline struct { Name string `json:"name" yaml:"name"` Repository string `json:"repository" yaml:"repository"` // Either configuration needs to be specified as a yaml string or steps. Configuration string `json:"configuration,omitempty" yaml:"configuration,omitempty"` Steps []Step `json:"steps,omitempty" yaml:"steps,omitempty"` // Optional fields DefaultBranch string `json:"default_branch,omitempty" yaml:"default_branch,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"` ProviderSettings ProviderSettings `json:"provider_settings,omitempty" yaml:"provider_settings,omitempty"` BranchConfiguration string `json:"branch_configuration,omitempty" yaml:"branch_configuration,omitempty"` SkipQueuedBranchBuilds bool `json:"skip_queued_branch_builds,omitempty" yaml:"skip_queued_branch_builds,omitempty"` SkipQueuedBranchBuildsFilter string `json:"skip_queued_branch_builds_filter,omitempty" yaml:"skip_queued_branch_builds_filter,omitempty"` CancelRunningBranchBuilds bool `json:"cancel_running_branch_builds,omitempty" yaml:"cancel_running_branch_builds,omitempty"` CancelRunningBranchBuildsFilter string `json:"cancel_running_branch_builds_filter,omitempty" yaml:"cancel_running_branch_builds_filter,omitempty"` TeamUuids []string `json:"team_uuids,omitempty" yaml:"team_uuids,omitempty"` ClusterID string `json:"cluster_id,omitempty" yaml:"cluster_id,omitempty"` Visibility *string `json:"visibility,omitempty" yaml:"visibility,omitempty"` Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"` }
CreatePipeline - Create a Pipeline.
type Creator ¶
type Creator struct { AvatarURL string `json:"avatar_url" yaml:"avatar_url"` CreatedAt *Timestamp `json:"created_at" yaml:"created_at"` Email string `json:"email" yaml:"email"` ID string `json:"id" yaml:"id"` Name string `json:"name" yaml:"name"` }
Creator represents who created a build
type Emoji ¶
type Emoji struct { Name *string `json:"name,omitempty" yaml:"name,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` }
Emoji emoji, what else can you say?
type ErrorResponse ¶
type ErrorResponse struct { Response *http.Response // HTTP response that caused this error Message string `json:"message" yaml:"message"` // error message RawBody []byte `json:"-" yaml:"-"` // Raw Response Body }
ErrorResponse provides a message.
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type Event ¶ added in v3.1.0
type Event struct { Type *string `json:"type"` RawPayload *json.RawMessage `json:"payload,omitempty"` }
Event represents a Buildkite webhook event
func (*Event) ParsePayload ¶ added in v3.1.0
ParsePayload parses the event payload. For recognized event types, a value of the corresponding struct type will be returned. An error will be returned for unrecognized event types.
Example usage:
type FlakyTest ¶ added in v3.4.0
type FlakyTest struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` Scope *string `json:"scope,omitempty" yaml:"scope,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Location *string `json:"location,omitempty" yaml:"location,omitempty"` FileName *string `json:"file_name,omitempty" yaml:"file_name,omitempty"` Instances *int `json:"instances,omitempty" yaml:"instances,omitempty"` MostRecentInstanceAt *Timestamp `json:"most_recent_instance_at,omitempty" yaml:"most_recent_instance_at,omitempty` }
type FlakyTestsListOptions ¶ added in v3.4.0
type FlakyTestsListOptions struct {
ListOptions
}
type FlakyTestsService ¶ added in v3.4.0
type FlakyTestsService struct {
// contains filtered or unexported fields
}
FlakyTestsService handles communication with flaky test related methods of the Buildkite Test Analytics API.
Buildkite API docs: https://buildkite.com/docs/apis/rest-api/analytics/flaky-tests
func (*FlakyTestsService) List ¶ added in v3.4.0
func (fts *FlakyTestsService) List(org, slug string, opt *FlakyTestsListOptions) ([]FlakyTest, *Response, error)
type GitHubEnterpriseSettings ¶
type GitHubEnterpriseSettings struct { TriggerMode *string `json:"trigger_mode,omitempty" yaml:"trigger_mode,omitempty"` BuildPullRequests *bool `json:"build_pull_requests,omitempty" yaml:"build_pull_requests,omitempty"` BuildBranches *bool `json:"build_branches,omitempty" yaml:"build_branches,omitempty"` PullRequestBranchFilterEnabled *bool `json:"pull_request_branch_filter_enabled,omitempty" yaml:"pull_request_branch_filter_enabled,omitempty"` PullRequestBranchFilterConfiguration *string `json:"pull_request_branch_filter_configuration,omitempty" yaml:"pull_request_branch_filter_configuration,omitempty"` SkipPullRequestBuildsForExistingCommits *bool `json:"skip_pull_request_builds_for_existing_commits,omitempty" yaml:"skip_pull_request_builds_for_existing_commits,omitempty"` BuildTags *bool `json:"build_tags,omitempty" yaml:"build_tags,omitempty"` PublishCommitStatus *bool `json:"publish_commit_status,omitempty" yaml:"publish_commit_status,omitempty"` PublishCommitStatusPerStep *bool `json:"publish_commit_status_per_step,omitempty" yaml:"publish_commit_status_per_step,omitempty"` // Read-only Repository *string `json:"repository,omitempty" yaml:"repository,omitempty"` }
GitHubEnterpriseSettings are settings for pipelines building from GitHub Enterprise repositories.
type GitHubSettings ¶
type GitHubSettings struct { TriggerMode *string `json:"trigger_mode,omitempty" yaml:"trigger_mode,omitempty"` BuildPullRequests *bool `json:"build_pull_requests,omitempty" yaml:"build_pull_requests,omitempty"` BuildBranches *bool `json:"build_branches,omitempty" yaml:"build_branches,omitempty"` PullRequestBranchFilterEnabled *bool `json:"pull_request_branch_filter_enabled,omitempty" yaml:"pull_request_branch_filter_enabled,omitempty"` PullRequestBranchFilterConfiguration *string `json:"pull_request_branch_filter_configuration,omitempty" yaml:"pull_request_branch_filter_configuration,omitempty"` SkipPullRequestBuildsForExistingCommits *bool `json:"skip_pull_request_builds_for_existing_commits,omitempty" yaml:"skip_pull_request_builds_for_existing_commits,omitempty"` BuildPullRequestForks *bool `json:"build_pull_request_forks,omitempty" yaml:"build_pull_request_forks,omitempty"` PrefixPullRequestForkBranchNames *bool `json:"prefix_pull_request_fork_branch_names,omitempty" yaml:"prefix_pull_request_fork_branch_names,omitempty"` BuildTags *bool `json:"build_tags,omitempty" yaml:"build_tags,omitempty"` PublishCommitStatus *bool `json:"publish_commit_status,omitempty" yaml:"publish_commit_status,omitempty"` PublishCommitStatusPerStep *bool `json:"publish_commit_status_per_step,omitempty" yaml:"publish_commit_status_per_step,omitempty"` FilterEnabled *bool `json:"filter_enabled,omitempty" yaml:"filter_enabled,omitempty"` FilterCondition *string `json:"filter_condition,omitempty" yaml:"filter_condition,omitempty"` SeparatePullRequestStatuses *bool `json:"separate_pull_request_statuses,omitempty" yaml:"separate_pull_request_statuses,omitempty"` PublishBlockedAsPending *bool `json:"publish_blocked_as_pending,omitempty" yaml:"publish_blocked_as_pending,omitempty"` // Read-only Repository *string `json:"repository,omitempty" yaml:"repository,omitempty"` }
GitHubSettings are settings for pipelines building from GitHub repositories.
type GitLabSettings ¶
type GitLabSettings struct { // Read-only Repository *string `json:"repository,omitempty" yaml:"repository,omitempty"` }
GitLabSettings are settings for pipelines building from GitLab repositories.
type Job ¶
type Job struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` Type *string `json:"type,omitempty" yaml:"type,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Label *string `json:"label,omitempty" yaml:"label,omitempty"` StepKey *string `json:"step_key,omitempty" yaml:"step_key,omitempty"` GroupKey *string `json:"group_key,omitempty" yaml:"group_key,omitempty"` State *string `json:"state,omitempty" yaml:"state,omitempty"` LogsURL *string `json:"logs_url,omitempty" yaml:"logs_url,omitempty"` RawLogsURL *string `json:"raw_log_url,omitempty" yaml:"raw_log_url,omitempty"` Command *string `json:"command,omitempty" yaml:"command,omitempty"` ExitStatus *int `json:"exit_status,omitempty" yaml:"exit_status,omitempty"` ArtifactPaths *string `json:"artifact_paths,omitempty" yaml:"artifact_paths,omitempty"` ArtifactsURL *string `json:"artifacts_url,omitempty" yaml:"artifacts_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` ScheduledAt *Timestamp `json:"scheduled_at,omitempty" yaml:"scheduled_at,omitempty"` RunnableAt *Timestamp `json:"runnable_at,omitempty" yaml:"runnable_at,omitempty"` StartedAt *Timestamp `json:"started_at,omitempty" yaml:"started_at,omitempty"` FinishedAt *Timestamp `json:"finished_at,omitempty" yaml:"finished_at,omitempty"` UnblockedAt *Timestamp `json:"unblocked_at,omitempty" yaml:"unblocked_at,omitempty"` Agent Agent `json:"agent,omitempty" yaml:"agent,omitempty"` AgentQueryRules []string `json:"agent_query_rules,omitempty" yaml:"agent_query_rules,omitempty"` WebURL string `json:"web_url" yaml:"web_url"` Retried bool `json:"retried,omitempty" yaml:"retried,omitempty"` RetriedInJobID string `json:"retried_in_job_id,omitempty" yaml:"retried_in_job_id,omitempty"` RetriesCount int `json:"retries_count,omitempty" yaml:"retries_count,omitempty"` RetrySource *JobRetrySource `json:"retry_source,omitempty" yaml:"retry_source,omitempty"` RetryType *string `json:"retry_type,omitempty" yaml:"retry_type,omitempty"` SoftFailed bool `json:"soft_failed,omitempty" yaml:"soft_failed,omitempty"` UnblockedBy *UnblockedBy `json:"unblocked_by,omitempty" yaml:"unblocked_by,omitempty"` Unblockable *bool `json:"unblockable,omitempty" yaml:"unblockable,omitempty"` UnblockURL *string `json:"unblock_url,omitempty" yaml:"unblock_url,omitempty"` ParallelGroupIndex *int `json:"parallel_group_index,omitempty" yaml:"parallel_group_index,omitempty"` ParallelGroupTotal *int `json:"parallel_group_total,omitempty" yaml:"parallel_group_total,omitempty"` ClusterID *string `json:"cluster_id,omitempty" yaml:"cluster_id,omitempty"` ClusterQueueID *string `json:"cluster_queue_id,omitempty" yaml:"cluster_queue_id,omitempty"` TriggeredBuild *TriggeredBuild `json:"triggered_build,omitempty" yaml:"triggered_build,omitempty"` Priority *JobPriority `json:"priority" yaml:"priority,omitempty"` }
Job represents a job run during a build in buildkite
type JobActivatedEvent ¶ added in v3.1.0
type JobActivatedEvent struct {
JobEvent
}
JobActivatedEvent is triggered when a job is activated
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobEnvs ¶ added in v3.1.0
type JobEnvs struct {
EnvironmentVariables *map[string]string `json:"env,string" yaml:"env,string"`
}
JobEnvs represent job environments output
type JobEvent ¶ added in v3.11.0
type JobEvent struct { Event *string `json:"event"` Build *Build `json:"build"` Job *Job `json:"job"` Pipeline *Pipeline `json:"pipeline"` Sender *User `json:"sender"` }
jobEvent is a wrapper for a job event notification
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobFinishedEvent ¶ added in v3.1.0
type JobFinishedEvent struct {
JobEvent
}
JobFinishedEvent is triggered when a job is finished
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobLog ¶
type JobLog struct { URL *string `json:"url"` Content *string `json:"content"` Size *int `json:"size"` HeaderTimes []int64 `json:"header_times"` }
JobLog represents a job log output
type JobPriority ¶ added in v3.11.0
type JobPriority struct {
Number *int `json:"number,omitempty" yaml:"number,omitempty"`
}
JobPriority represents the priority of the job
type JobRetrySource ¶ added in v3.11.0
type JobRetrySource struct { JobID string `json:"job_id,omitempty" yaml:"job_id,omitempty"` RetryType string `json:"retry_type,omitempty" yaml:"retry_type,omitempty"` }
JobRetrySource represents what triggered this retry.
type JobScheduledEvent ¶ added in v3.1.0
type JobScheduledEvent struct {
JobEvent
}
JobScheduledEvent is triggered when a job is scheduled
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobStartedEvent ¶ added in v3.1.0
type JobStartedEvent struct {
JobEvent
}
JobStartedEvent is triggered when a job is started
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobUnblockOptions ¶
type JobUnblockOptions struct {
Fields map[string]string `json:"fields,omitempty" yaml:"fields,omitempty"`
}
JobUnblockOptions specifies the optional parameters to UnblockJob
type JobsService ¶
type JobsService struct {
// contains filtered or unexported fields
}
JobsService handles communication with the job related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api/jobs
func (*JobsService) GetJobEnvironmentVariables ¶ added in v3.1.0
func (js *JobsService) GetJobEnvironmentVariables(org string, pipeline string, buildNumber string, jobID string) (*JobEnvs, *Response, error)
GetJobEnvironmentVariables - get a job’s environment variables
buildkite API docs: https://buildkite.com/docs/apis/rest-api/jobs#get-a-jobs-environment-variables
func (*JobsService) GetJobLog ¶
func (js *JobsService) GetJobLog(org string, pipeline string, buildNumber string, jobID string) (*JobLog, *Response, error)
GetJobLog - get a job’s log output
buildkite API docs: https://buildkite.com/docs/apis/rest-api/jobs#get-a-jobs-log-output
func (*JobsService) RetryJob ¶
func (js *JobsService) RetryJob(org string, pipeline string, buildNumber string, jobID string) (*Job, *Response, error)
RetryJob - retry a job
buildkite API docs: https://buildkite.com/docs/apis/rest-api/jobs#retry-a-job
func (*JobsService) UnblockJob ¶
func (js *JobsService) UnblockJob(org string, pipeline string, buildNumber string, jobID string, opt *JobUnblockOptions) (*Job, *Response, error)
UnblockJob - unblock a job
buildkite API docs: https://buildkite.com/docs/apis/rest-api/jobs#unblock-a-job
type ListOptions ¶
type ListOptions struct { // For paginated result sets, page of results to retrieve. Page int `url:"page,omitempty"` // For paginated result sets, the number of results to include per page. PerPage int `url:"per_page,omitempty"` }
ListOptions specifies the optional parameters to various List methods that support pagination.
type MetaDataFilters ¶ added in v3.3.0
func (MetaDataFilters) EncodeValues ¶ added in v3.3.0
func (mo MetaDataFilters) EncodeValues(parent_key string, v *url.Values) error
Encodes MetaData in the format expected by the buildkite API Example: ?meta_data[some-key]=some-value
type Organization ¶
type Organization struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Slug *string `json:"slug,omitempty" yaml:"slug,omitempty"` Repository *string `json:"repository,omitempty" yaml:"repository,omitempty"` PipelinesURL *string `json:"pipelines_url,omitempty" yaml:"pipelines_url,omitempty"` EmojisURL *string `json:"emojis_url,omitempty" yaml:"emojis_url,omitempty"` AgentsURL *string `json:"agents_url,omitempty" yaml:"agents_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` }
Organization represents a buildkite organization.
type OrganizationListOptions ¶
type OrganizationListOptions struct {
ListOptions
}
OrganizationListOptions specifies the optional parameters to the OrganizationsService.List method.
type OrganizationsService ¶
type OrganizationsService struct {
// contains filtered or unexported fields
}
OrganizationsService handles communication with the organization related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api/organizations
func (*OrganizationsService) Get ¶
func (os *OrganizationsService) Get(slug string) (*Organization, *Response, error)
Get fetches an organization
buildkite API docs: https://buildkite.com/docs/api/organizations#get-an-organization
func (*OrganizationsService) List ¶
func (os *OrganizationsService) List(opt *OrganizationListOptions) ([]Organization, *Response, error)
List the organizations for the current user.
buildkite API docs: https://buildkite.com/docs/api/organizations#list-organizations
type PingEvent ¶ added in v3.1.0
type PingEvent struct { Event *string `json:"event"` Organization *Organization `json:"organization"` Sender *User `json:"sender"` }
PingEvent is triggered when a webhook notification setting is changed
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/ping-events
type Pipeline ¶
type Pipeline struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Slug *string `json:"slug,omitempty" yaml:"slug,omitempty"` Repository *string `json:"repository,omitempty" yaml:"repository,omitempty"` BuildsURL *string `json:"builds_url,omitempty" yaml:"builds_url,omitempty"` BadgeURL *string `json:"badge_url,omitempty" yaml:"badge_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` ArchivedAt *Timestamp `json:"archived_at,omitempty" yaml:"archived_at,omitempty"` DefaultBranch *string `json:"default_branch,omitempty" yaml:"default_branch,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` BranchConfiguration *string `json:"branch_configuration,omitempty" yaml:"branch_configuration,omitempty"` SkipQueuedBranchBuilds *bool `json:"skip_queued_branch_builds,omitempty" yaml:"skip_queued_branch_builds,omitempty"` SkipQueuedBranchBuildsFilter *string `json:"skip_queued_branch_builds_filter,omitempty" yaml:"skip_queued_branch_builds_filter,omitempty"` CancelRunningBranchBuilds *bool `json:"cancel_running_branch_builds,omitempty" yaml:"cancel_running_branch_builds,omitempty"` CancelRunningBranchBuildsFilter *string `json:"cancel_running_branch_builds_filter,omitempty" yaml:"cancel_running_branch_builds_filter,omitempty"` ClusterID *string `json:"cluster_id,omitempty" yaml:"cluster_id,omitempty"` Visibility *string `json:"visibility,omitempty" yaml:"visibility,omitempty"` Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"` ScheduledBuildsCount *int `json:"scheduled_builds_count,omitempty" yaml:"scheduled_builds_count,omitempty"` RunningBuildsCount *int `json:"running_builds_count,omitempty" yaml:"running_builds_count,omitempty"` ScheduledJobsCount *int `json:"scheduled_jobs_count,omitempty" yaml:"scheduled_jobs_count,omitempty"` RunningJobsCount *int `json:"running_jobs_count,omitempty" yaml:"running_jobs_count,omitempty"` WaitingJobsCount *int `json:"waiting_jobs_count,omitempty" yaml:"waiting_jobs_count,omitempty"` // the provider of sources Provider *Provider `json:"provider,omitempty" yaml:"provider,omitempty"` // build steps Steps []*Step `json:"steps,omitempty" yaml:"steps,omitempty"` Configuration string `json:"configuration,omitempty" yaml:"configuration,omitempty"` Env map[string]interface{} `json:"env,omitempty" yaml:"env,omitempty"` }
Pipeline represents a buildkite pipeline.
type PipelineListOptions ¶
type PipelineListOptions struct {
ListOptions
}
PipelineListOptions specifies the optional parameters to the PipelinesService.List method.
type PipelineTemplate ¶ added in v3.9.0
type PipelineTemplate struct { UUID *string `json:"uuid,omitempty" yaml:"uuid,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Configuration *string `json:"configuration,omitempty" yaml:"configuration,omitempty"` Available *bool `json:"available,omitempty" yaml:"available,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` CreatedBy *PipelineTemplateCreator `json:"created_by,omitempty" yaml:"created_by,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty" yaml:"updated_at,omitempty"` UpdatedBy *PipelineTemplateCreator `json:"updated_by,omitempty" yaml:"updated_by,omitempty"` }
type PipelineTemplateCreateUpdate ¶ added in v3.9.0
type PipelineTemplateCreateUpdate struct { Name *string `json:"name,omitempty" yaml:"name,omitempty"` Configuration *string `json:"configuration,omitempty" yaml:"configuration,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Available *bool `json:"available,omitempty" yaml:"available,omitempty"` }
type PipelineTemplateCreator ¶ added in v3.9.0
type PipelineTemplateCreator struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Email *string `json:"email,omitempty" yaml:"email,omitempty"` AvatarURL *string `json:"avatar_url,omitempty" yaml:"avatar_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` }
type PipelineTemplateListOptions ¶ added in v3.9.0
type PipelineTemplateListOptions struct {
ListOptions
}
type PipelineTemplatesService ¶ added in v3.9.0
type PipelineTemplatesService struct {
// contains filtered or unexported fields
}
PipelineTemplatesService handles communication with pipeline template related methods of the Buildkite API.
Buildkite API docs: <to-fill>
func (*PipelineTemplatesService) Create ¶ added in v3.9.0
func (pts *PipelineTemplatesService) Create(org string, ptc *PipelineTemplateCreateUpdate) (*PipelineTemplate, *Response, error)
func (*PipelineTemplatesService) Delete ¶ added in v3.9.0
func (pts *PipelineTemplatesService) Delete(org, templateUUID string) (*Response, error)
func (*PipelineTemplatesService) Get ¶ added in v3.9.0
func (pts *PipelineTemplatesService) Get(org, templateUUID string) (*PipelineTemplate, *Response, error)
func (*PipelineTemplatesService) List ¶ added in v3.9.0
func (pts *PipelineTemplatesService) List(org string, opt *PipelineTemplateListOptions) ([]PipelineTemplate, *Response, error)
func (*PipelineTemplatesService) Update ¶ added in v3.9.0
func (pts *PipelineTemplatesService) Update(org, templateUUID string, ptu *PipelineTemplateCreateUpdate) (*Response, error)
type PipelinesService ¶
type PipelinesService struct {
// contains filtered or unexported fields
}
PipelinesService handles communication with the pipeline related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api/pipelines
func (*PipelinesService) AddWebhook ¶
func (ps *PipelinesService) AddWebhook(org string, slug string) (*Response, error)
AddWebhook - Adds webhook in github for pipeline.
buildkite API docs: https://buildkite.com/docs/apis/rest-api/pipelines#add-a-webhook
func (*PipelinesService) Archive ¶
func (ps *PipelinesService) Archive(org string, slug string) (*Response, error)
Archive - Archives a pipeline.
buildkite API docs: https://buildkite.com/docs/apis/rest-api/pipelines#archive-a-pipeline
func (*PipelinesService) Create ¶
func (ps *PipelinesService) Create(org string, p *CreatePipeline) (*Pipeline, *Response, error)
Create - Creates a pipeline for a given organisation.
buildkite API docs: https://buildkite.com/docs/rest-api/pipelines#create-a-pipeline
func (*PipelinesService) Delete ¶
func (ps *PipelinesService) Delete(org string, slug string) (*Response, error)
Delete a pipeline.
buildkite API docs: https://buildkite.com/docs/rest-api/pipelines#delete-a-pipeline
func (*PipelinesService) Get ¶
Get fetches a pipeline.
buildkite API docs: https://buildkite.com/docs/rest-api/pipelines#get-a-pipeline
func (*PipelinesService) List ¶
func (ps *PipelinesService) List(org string, opt *PipelineListOptions) ([]Pipeline, *Response, error)
List the pipelines for a given organisation.
buildkite API docs: https://buildkite.com/docs/api/pipelines#list-pipelines
func (*PipelinesService) Unarchive ¶
func (ps *PipelinesService) Unarchive(org string, slug string) (*Response, error)
Unarchive - Unarchive a pipeline.
buildkite API docs: https://buildkite.com/docs/apis/rest-api/pipelines#unarchive-a-pipeline
func (*PipelinesService) Update ¶
func (ps *PipelinesService) Update(org string, p *Pipeline) (*Response, error)
Update - Updates a pipeline.
buildkite API docs: https://buildkite.com/docs/rest-api/pipelines#update-a-pipeline
type Plugin ¶
type Plugin map[string]interface{}
This is kept vague (map of string to whatever) as there are a lot of custom plugins out there.
type Plugins ¶
func (*Plugins) UnmarshalJSON ¶ added in v3.1.0
Support deprecated map structure as well as array structure
type Provider ¶
type Provider struct { ID string `json:"id" yaml:"id"` WebhookURL *string `json:"webhook_url" yaml:"webhook_url"` Settings ProviderSettings `json:"settings" yaml:"settings"` }
Provider represents a source code provider. It is read-only, but settings may be written using Pipeline.ProviderSettings.
func (*Provider) UnmarshalJSON ¶
UnmarshalJSON decodes the Provider, choosing the type of the Settings from the ID.
type ProviderSettings ¶
type ProviderSettings interface {
// contains filtered or unexported methods
}
ProviderSettings represents the sum type of the settings for different source code providers.
type PullRequest ¶
type PullRequest struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` Base *string `json:"base,omitempty" yaml:"base,omitempty"` Repository *string `json:"repository,omitempty" yaml:"repository,omitempty"` }
PullRequest represents a Github PR
type RebuiltFrom ¶ added in v3.3.0
type RebuiltFrom struct { ID string `json:"id" yaml:"id"` Number int `json:"number" yaml:"number"` URL string `json:"url" yaml:"url"` }
RebuiltFrom references a previous build
type Response ¶
Response is a buildkite API response. This wraps the standard http.Response returned from buildkite and provides convenient access to things like pagination links.
type Step ¶
type Step struct { Type *string `json:"type,omitempty" yaml:"type,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Label *string `json:"label,omitempty" yaml:"label,omitempty"` Command *string `json:"command,omitempty" yaml:"command,omitempty"` ArtifactPaths *string `json:"artifact_paths,omitempty" yaml:"artifact_paths,omitempty"` BranchConfiguration *string `json:"branch_configuration,omitempty" yaml:"branch_configuration,omitempty"` Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"` TimeoutInMinutes *int `json:"timeout_in_minutes,omitempty" yaml:"timeout_in_minutes,omitempty"` AgentQueryRules []string `json:"agent_query_rules,omitempty" yaml:"agent_query_rules,omitempty"` Plugins Plugins `json:"plugins,omitempty" yaml:"plugins,omitempty"` }
Step represents a build step in buildkites build pipeline
type Team ¶
type Team struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Slug *string `json:"slug,omitempty" yaml:"slug,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Privacy *string `json:"privacy,omitempty" yaml:"privacy,omitempty"` Default *bool `json:"default,omitempty" yaml:"default,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` CreatedBy *User `json:"created_by,omitempty" yaml:"created_by,omitempty"` }
Team represents a buildkite team.
type TeamsListOptions ¶
type TeamsListOptions struct { ListOptions UserID string `url:"user_id,omitempty"` }
TeamsListOptions specifies the optional parameters to the TeamsService.List method.
type TeamsService ¶
type TeamsService struct {
// contains filtered or unexported fields
}
TeamService handles communication with the teams related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api
func (*TeamsService) List ¶
func (ts *TeamsService) List(org string, opt *TeamsListOptions) ([]Team, *Response, error)
Get the teams for an org.
buildkite API docs: https://buildkite.com/docs/api
type Test ¶ added in v3.4.0
type Test struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` Scope *string `json:"scope,omitempty" yaml:"scope,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Location *string `json:"location,omitempty" yaml:"location,omitempty"` FileName *string `json:"file_name,omitempty" yaml:"file_name,omitempty"` }
type TestRun ¶ added in v3.4.0
type TestRun struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` Branch *string `json:"branch,omitempty" yaml:"branch,omitempty"` CommitSHA *string `json:"commit_sha,omitempty" yaml:"commit_sha,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty` }
type TestRunsListOptions ¶ added in v3.4.0
type TestRunsListOptions struct {
ListOptions
}
type TestRunsService ¶ added in v3.4.0
type TestRunsService struct {
// contains filtered or unexported fields
}
TestRunsService handles communication with test run related methods of the Buildkite Test Analytics API.
Buildkite API docs: https://buildkite.com/docs/apis/rest-api/analytics/runs
func (*TestRunsService) Get ¶ added in v3.4.0
func (trs *TestRunsService) Get(org, slug, runID string) (*TestRun, *Response, error)
func (*TestRunsService) List ¶ added in v3.4.0
func (trs *TestRunsService) List(org, slug string, opt *TestRunsListOptions) ([]TestRun, *Response, error)
type TestSuite ¶ added in v3.4.0
type TestSuite struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` GraphQLID *string `json:"graphql_id,omitempty" yaml:"graphql_id,omitempty"` Slug *string `json:"slug,omitempty" yaml:"slug,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` URL *string `json:"url,omitempty" yaml:"url,omitempty"` WebURL *string `json:"web_url,omitempty" yaml:"web_url,omitempty"` DefaultBranch *string `json:"default_branch,omitempty" yaml:"default_branch,omitempty"` }
type TestSuiteCreate ¶ added in v3.4.0
type TestSuiteCreate struct { Name string `json:"name" yaml:"name"` DefaultBranch string `json:"default_branch,omitempty" yaml:"default_branch,omitempty"` ShowAPIToken bool `json:"show_api_token,omitempty" yaml:"show_api_token,omitempty"` TeamUUIDs []string `json:"team_ids,omitempty" yaml:"team_ids,omitempty"` }
type TestSuiteListOptions ¶ added in v3.4.0
type TestSuiteListOptions struct {
ListOptions
}
type TestSuitesService ¶ added in v3.4.0
type TestSuitesService struct {
// contains filtered or unexported fields
}
TestSuitesService handles communication with the test suite related methods of the Buildkite Test Analytics API.
Buildkite API docs: https://buildkite.com/docs/apis/rest-api/analytics/suites
func (*TestSuitesService) Create ¶ added in v3.4.0
func (tss *TestSuitesService) Create(org string, ts *TestSuiteCreate) (*TestSuite, *Response, error)
func (*TestSuitesService) Delete ¶ added in v3.4.0
func (tss *TestSuitesService) Delete(org, slug string) (*Response, error)
func (*TestSuitesService) Get ¶ added in v3.4.0
func (tss *TestSuitesService) Get(org, slug string) (*TestSuite, *Response, error)
func (*TestSuitesService) List ¶ added in v3.4.0
func (tss *TestSuitesService) List(org string, opt *TestSuiteListOptions) ([]TestSuite, *Response, error)
type TestsService ¶ added in v3.4.0
type TestsService struct {
// contains filtered or unexported fields
}
TestsService handles communication with test related methods of the Buildkite Test Analytics API.
Buildkite API docs: https://buildkite.com/docs/apis/rest-api/analytics/tests
type Timestamp ¶
Timestamp custom timestamp to support buildkite api timestamps
func NewTimestamp ¶
NewTimestamp make a new timestamp using the time suplied.
func (Timestamp) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Token ¶
type Token struct { AccessToken *string `json:"access_token,omitempty" yaml:"access_token,omitempty"` Type *string `json:"token_type,omitempty" yaml:"token_type,omitempty"` }
Token an oauth access token for the buildkite service
type TokenAuthTransport ¶
type TokenAuthTransport struct { APIToken string APIHost string Transport http.RoundTripper }
TokenAuthTransport manages injection of the API token for each request
func NewTokenConfig ¶
func NewTokenConfig(apiToken string, debug bool) (*TokenAuthTransport, error)
NewTokenConfig configure authentication using an API token NOTE: the debug flag is not used anymore.
func (*TokenAuthTransport) Client ¶
func (t *TokenAuthTransport) Client() *http.Client
Client builds a new http client.
type TriggeredBuild ¶ added in v3.11.0
type TriggeredFrom ¶ added in v3.11.0
type UnblockedBy ¶
type UnblockedBy struct { ID string `json:"id,omitempty" yaml:"id,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Email string `json:"email,omitempty" yaml:"email,omitempty"` AvatarURL string `json:"avatar_url,omitempty" yaml:"avatar_url,omitempty"` CreatedAt Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` }
UnblockedBy represents the unblocked status of a job, when present
type UpdatePipeline ¶ added in v3.4.0
type UpdatePipeline struct { // Either configuration needs to be specified as a yaml string or steps (based on what the pipeline uses) Configuration string `json:"configuration,omitempty" yaml:"configuration,omitempty"` Steps []*Step `json:"steps,omitempty" yaml:"steps,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Repository *string `json:"repository,omitempty" yaml:"repository,omitempty"` DefaultBranch *string `json:"default_branch,omitempty" yaml:"default_branch,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` ProviderSettings ProviderSettings `json:"provider_settings,omitempty" yaml:"provider_settings,omitempty"` BranchConfiguration *string `json:"branch_configuration,omitempty" yaml:"branch_configuration,omitempty"` SkipQueuedBranchBuilds *bool `json:"skip_queued_branch_builds,omitempty" yaml:"skip_queued_branch_builds,omitempty"` SkipQueuedBranchBuildsFilter *string `json:"skip_queued_branch_builds_filter,omitempty" yaml:"skip_queued_branch_builds_filter,omitempty"` CancelRunningBranchBuilds *bool `json:"cancel_running_branch_builds,omitempty" yaml:"cancel_running_branch_builds,omitempty"` CancelRunningBranchBuildsFilter *string `json:"cancel_running_branch_builds_filter,omitempty" yaml:"cancel_running_branch_builds_filter,omitempty"` ClusterID *string `json:"cluster_id,omitempty" yaml:"cluster_id,omitempty"` Visibility *string `json:"visibility,omitempty" yaml:"visibility,omitempty"` Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"` }
type User ¶
type User struct { ID *string `json:"id,omitempty" yaml:"id,omitempty"` Name *string `json:"name,omitempty" yaml:"name,omitempty"` Email *string `json:"email,omitempty" yaml:"email,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty" yaml:"created_at,omitempty"` }
User represents a buildkite user.
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService handles communication with the user related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api
func (*UserService) Get ¶
func (os *UserService) Get() (*User, *Response, error)
Get the current user.
buildkite API docs: https://buildkite.com/docs/api
Source Files ¶
- access_tokens.go
- agents.go
- annotations.go
- artifacts.go
- auth.go
- buildkite.go
- builds.go
- cluster_queues.go
- cluster_tokens.go
- clusters.go
- flaky_tests.go
- jobs.go
- misc.go
- organizations.go
- pipeline_templates.go
- pipelines.go
- providers.go
- teams.go
- test_runs.go
- test_suites.go
- tests.go
- timestamp.go
- user.go
- version.go
- webhook.go
- webhook_events.go