Documentation ¶
Index ¶
- Constants
- func ParseWebHook(messageType string, payload []byte) (interface{}, error)
- func ValidatePayload(r *http.Request, secretKey []byte) (payload []byte, err error)
- func WebHookType(r *http.Request) string
- func WithBaseURL(baseURL string) clientOpt
- func WithHTTPClient(client *http.Client) clientOpt
- func WithHTTPDebug(debug bool) clientOpt
- func WithTokenAuth(token string) clientOpt
- func WithUserAgent(userAgent string) clientOpt
- 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(ctx context.Context, org string, agent Agent) (Agent, *Response, error)
- func (as *AgentsService) Delete(ctx context.Context, org string, id string) (*Response, error)
- func (as *AgentsService) Get(ctx context.Context, org string, id string) (Agent, *Response, error)
- func (as *AgentsService) List(ctx context.Context, org string, opt *AgentListOptions) ([]Agent, *Response, error)
- func (as *AgentsService) Stop(ctx context.Context, 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(ctx context.Context, url string, w io.Writer) (*Response, error)
- func (as *ArtifactsService) ListByBuild(ctx context.Context, org string, pipeline string, build string, ...) ([]Artifact, *Response, error)
- func (as *ArtifactsService) ListByJob(ctx context.Context, org string, pipeline string, build string, job string, ...) ([]Artifact, *Response, error)
- type Author
- type BitbucketSettings
- type Build
- type BuildEvent
- type BuildFailingEvent
- type BuildFinishedEvent
- type BuildRunningEvent
- type BuildScheduledEvent
- type BuildsListOptions
- type BuildsService
- func (bs *BuildsService) Cancel(ctx context.Context, org, pipeline, build string) (Build, error)
- func (bs *BuildsService) Create(ctx context.Context, org string, pipeline string, b CreateBuild) (Build, *Response, error)
- func (bs *BuildsService) Get(ctx context.Context, org string, pipeline string, id string, ...) (Build, *Response, error)
- func (bs *BuildsService) List(ctx context.Context, opt *BuildsListOptions) ([]Build, *Response, error)
- func (bs *BuildsService) ListByOrg(ctx context.Context, org string, opt *BuildsListOptions) ([]Build, *Response, error)
- func (bs *BuildsService) ListByPipeline(ctx context.Context, org string, pipeline string, opt *BuildsListOptions) ([]Build, *Response, error)
- func (bs *BuildsService) Rebuild(ctx context.Context, org, pipeline, build string) (Build, error)
- type ClaimRule
- type Client
- type Cluster
- type ClusterCreate
- type ClusterCreator
- type ClusterQueue
- type ClusterQueueCreate
- type ClusterQueuePause
- type ClusterQueueUpdate
- type ClusterQueuesListOptions
- type ClusterQueuesService
- func (cqs *ClusterQueuesService) Create(ctx context.Context, org, clusterID string, qc ClusterQueueCreate) (ClusterQueue, *Response, error)
- func (cqs *ClusterQueuesService) Delete(ctx context.Context, org, clusterID, queueID string) (*Response, error)
- func (cqs *ClusterQueuesService) Get(ctx context.Context, org, clusterID, queueID string) (ClusterQueue, *Response, error)
- func (cqs *ClusterQueuesService) List(ctx context.Context, org, clusterID string, opt *ClusterQueuesListOptions) ([]ClusterQueue, *Response, error)
- func (cqs *ClusterQueuesService) Pause(ctx context.Context, org, clusterID, queueID string, qp ClusterQueuePause) (ClusterQueue, *Response, error)
- func (cqs *ClusterQueuesService) Resume(ctx context.Context, org, clusterID, queueID string) (*Response, error)
- func (cqs *ClusterQueuesService) Update(ctx context.Context, org, clusterID, queueID string, qu ClusterQueueUpdate) (ClusterQueue, *Response, error)
- type ClusterToken
- type ClusterTokenCreateUpdate
- type ClusterTokensListOptions
- type ClusterTokensService
- func (cts *ClusterTokensService) Create(ctx context.Context, org, clusterID string, ctc ClusterTokenCreateUpdate) (ClusterToken, *Response, error)
- func (cts *ClusterTokensService) Delete(ctx context.Context, org, clusterID, tokenID string) (*Response, error)
- func (cts *ClusterTokensService) Get(ctx context.Context, org, clusterID, tokenID string) (ClusterToken, *Response, error)
- func (cts *ClusterTokensService) List(ctx context.Context, org, clusterID string, opt *ClusterTokensListOptions) ([]ClusterToken, *Response, error)
- func (cts *ClusterTokensService) Update(ctx context.Context, org, clusterID, tokenID string, ...) (ClusterToken, *Response, error)
- type ClusterUpdate
- type ClustersListOptions
- type ClustersService
- func (cs *ClustersService) Create(ctx context.Context, org string, cc ClusterCreate) (Cluster, *Response, error)
- func (cs *ClustersService) Delete(ctx context.Context, org, id string) (*Response, error)
- func (cs *ClustersService) Get(ctx context.Context, org, id string) (Cluster, *Response, error)
- func (cs *ClustersService) List(ctx context.Context, org string, opt *ClustersListOptions) ([]Cluster, *Response, error)
- func (cs *ClustersService) Update(ctx context.Context, org, id string, cu ClusterUpdate) (Cluster, *Response, error)
- type CreateBuild
- type CreatePackageInput
- type CreatePackageRegistryInput
- type CreatePipeline
- type CreateTeam
- type CreateTeamMember
- type CreateTeamPipelines
- type CreateTeamSuites
- 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(ctx context.Context, org string, pipeline string, buildNumber string, ...) (JobEnvs, *Response, error)
- func (js *JobsService) GetJobLog(ctx context.Context, org string, pipeline string, buildNumber string, ...) (JobLog, *Response, error)
- func (js *JobsService) RetryJob(ctx context.Context, org string, pipeline string, buildNumber string, ...) (Job, *Response, error)
- func (js *JobsService) UnblockJob(ctx context.Context, org string, pipeline string, buildNumber string, ...) (Job, *Response, error)
- type ListOptions
- type MetaDataFilters
- type OIDCPolicyStatement
- type Organization
- type OrganizationListOptions
- type OrganizationsService
- type Package
- type PackagePresignedUpload
- type PackagePresignedUploadForm
- type PackageRegistriesService
- func (rs *PackageRegistriesService) Create(ctx context.Context, organizationSlug string, cpri CreatePackageRegistryInput) (PackageRegistry, *Response, error)
- func (rs *PackageRegistriesService) Delete(ctx context.Context, organizationSlug, registrySlug string) (*Response, error)
- func (rs *PackageRegistriesService) Get(ctx context.Context, organizationSlug, registrySlug string) (PackageRegistry, *Response, error)
- func (rs *PackageRegistriesService) List(ctx context.Context, organizationSlug string) ([]PackageRegistry, *Response, error)
- func (rs *PackageRegistriesService) Update(ctx context.Context, organizationSlug, registrySlug string, ...) (PackageRegistry, *Response, error)
- type PackageRegistry
- type PackageRegistryOIDCPolicy
- type PackagesService
- func (ps *PackagesService) Create(ctx context.Context, organizationSlug, registrySlug string, ...) (Package, *Response, error)
- func (ps *PackagesService) Get(ctx context.Context, organizationSlug, registrySlug, packageID string) (Package, *Response, error)
- func (ps *PackagesService) RequestPresignedUpload(ctx context.Context, organizationSlug, registrySlug string) (*PackagePresignedUpload, *Response, error)
- type PingEvent
- type Pipeline
- type PipelineListOptions
- type PipelineTemplate
- type PipelineTemplateCreateUpdate
- type PipelineTemplateCreator
- type PipelineTemplateListOptions
- type PipelineTemplatesService
- func (pts *PipelineTemplatesService) Create(ctx context.Context, org string, ptc PipelineTemplateCreateUpdate) (PipelineTemplate, *Response, error)
- func (pts *PipelineTemplatesService) Delete(ctx context.Context, org, templateUUID string) (*Response, error)
- func (pts *PipelineTemplatesService) Get(ctx context.Context, org, templateUUID string) (PipelineTemplate, *Response, error)
- func (pts *PipelineTemplatesService) List(ctx context.Context, org string, opt *PipelineTemplateListOptions) ([]PipelineTemplate, *Response, error)
- func (pts *PipelineTemplatesService) Update(ctx context.Context, org, templateUUID string, ...) (PipelineTemplate, *Response, error)
- type PipelinesService
- func (ps *PipelinesService) AddWebhook(ctx context.Context, org string, slug string) (*Response, error)
- func (ps *PipelinesService) Archive(ctx context.Context, org string, slug string) (*Response, error)
- func (ps *PipelinesService) Create(ctx context.Context, org string, p CreatePipeline) (Pipeline, *Response, error)
- func (ps *PipelinesService) Delete(ctx context.Context, org, slug string) (*Response, error)
- func (ps *PipelinesService) Get(ctx context.Context, org string, slug string) (Pipeline, *Response, error)
- func (ps *PipelinesService) List(ctx context.Context, org string, opt *PipelineListOptions) ([]Pipeline, *Response, error)
- func (ps *PipelinesService) Unarchive(ctx context.Context, org string, slug string) (*Response, error)
- func (ps *PipelinesService) Update(ctx context.Context, org, slug string, up UpdatePipeline) (Pipeline, *Response, error)
- type Plugin
- type Plugins
- type Provider
- type ProviderSettings
- type PullRequest
- type RebuiltFrom
- type Response
- type Step
- type Team
- type TeamMember
- type TeamMemberService
- func (ts *TeamMemberService) CreateTeamMember(ctx context.Context, org string, teamID string, t CreateTeamMember) (TeamMember, *Response, error)
- func (ts *TeamMemberService) DeleteTeamMember(ctx context.Context, org string, teamID string, userID string) (*Response, error)
- func (ts *TeamMemberService) GetTeamMember(ctx context.Context, org string, teamID string, userID string) (TeamMember, error)
- func (ts *TeamMemberService) ListTeamMembers(ctx context.Context, org string, id string, opt *TeamMembersListOptions) ([]TeamMember, *Response, error)
- func (ts *TeamMemberService) UpdateTeamMember(ctx context.Context, org string, teamID string, userID string, role string) (TeamMember, *Response, error)
- type TeamMembersListOptions
- type TeamPipeline
- type TeamPipelinesListOptions
- type TeamPipelinesService
- func (tps *TeamPipelinesService) Create(ctx context.Context, org string, teamID string, ctp CreateTeamPipelines) (TeamPipeline, *Response, error)
- func (tps *TeamPipelinesService) Delete(ctx context.Context, org string, teamID string, pipelineID string) (*Response, error)
- func (tps *TeamPipelinesService) Get(ctx context.Context, org string, teamID string, pipelineID string) (TeamPipeline, *Response, error)
- func (tps *TeamPipelinesService) List(ctx context.Context, org string, id string, opt *TeamPipelinesListOptions) ([]TeamPipeline, *Response, error)
- func (tps *TeamPipelinesService) Update(ctx context.Context, org string, teamID string, pipelineID string, ...) (TeamPipeline, *Response, error)
- type TeamSuites
- type TeamSuitesListOptions
- type TeamSuitesService
- func (tss *TeamSuitesService) Create(ctx context.Context, org string, teamID string, cts CreateTeamSuites) (TeamSuites, *Response, error)
- func (tss *TeamSuitesService) Delete(ctx context.Context, org string, teamID string, suiteID string) (*Response, error)
- func (tss *TeamSuitesService) Get(ctx context.Context, org string, teamID string, suiteID string) (TeamSuites, *Response, error)
- func (tss *TeamSuitesService) List(ctx context.Context, org string, id string, opt *TeamSuitesListOptions) ([]TeamSuites, *Response, error)
- func (tss *TeamSuitesService) Update(ctx context.Context, org string, teamID string, pipelineID string, ...) (TeamSuites, *Response, error)
- type TeamsListOptions
- type TeamsService
- func (ts *TeamsService) CreateTeam(ctx context.Context, org string, t CreateTeam) (Team, *Response, error)
- func (ts *TeamsService) DeleteTeam(ctx context.Context, org string, id string) (*Response, error)
- func (ts *TeamsService) GetTeam(ctx context.Context, org string, id string) (Team, error)
- func (ts *TeamsService) List(ctx context.Context, org string, opt *TeamsListOptions) ([]Team, *Response, error)
- func (ts *TeamsService) UpdateTeam(ctx context.Context, org string, id string, t CreateTeam) (Team, *Response, error)
- type Test
- type TestRun
- type TestRunsListOptions
- type TestRunsService
- type TestSuite
- type TestSuiteCreate
- type TestSuiteListOptions
- type TestSuitesService
- func (tss *TestSuitesService) Create(ctx context.Context, org string, ts TestSuiteCreate) (TestSuite, *Response, error)
- func (tss *TestSuitesService) Delete(ctx context.Context, org, slug string) (*Response, error)
- func (tss *TestSuitesService) Get(ctx context.Context, org, slug string) (TestSuite, *Response, error)
- func (tss *TestSuitesService) List(ctx context.Context, org string, opt *TestSuiteListOptions) ([]TestSuite, *Response, error)
- func (tss *TestSuitesService) Update(ctx context.Context, org, slug string, ts TestSuite) (TestSuite, *Response, error)
- type TestsService
- type Timestamp
- type Token
- type TriggeredBuild
- type TriggeredFrom
- type UnblockedBy
- type UpdatePackageRegistryInput
- type UpdatePipeline
- type UpdateTeamPipelines
- type UpdateTeamSuites
- type User
- type UserService
Constants ¶
const ( DefaultBaseURL = "https://api.buildkite.com/" DefaultUserAgent = "go-buildkite/" + Version )
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 = "4.1.0"
Version the library version number
Variables ¶
This section is empty.
Functions ¶
func ParseWebHook ¶
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 ValidatePayload ¶
ValidatePayload validates an incoming Buildkite Webhook event request and returns the (JSON) payload. secretKey is the Buildkite Webhook token.
Example usage:
func WebHookType ¶
WebHookType returns the event type of webhook request r.
Buildkite API docs: https://buildkite.com/docs/apis/webhooks
func WithBaseURL ¶
func WithBaseURL(baseURL string) clientOpt
WithBaseURL configures the buildkite.Client to use the provided base URL, instead of the default of https://api.buildkite.com/
func WithHTTPClient ¶
WithHTTPClient configures the buildkite.Client to use the provided http.Client. This can be used to customise the client's transport (e.g. to use a custom TLS configuration) or to provide a mock client
func WithHTTPDebug ¶
func WithHTTPDebug(debug bool) clientOpt
WithHTTPDebug configures the buildkite.Client to print debug information about HTTP requests and responses as it makes them
func WithTokenAuth ¶
func WithTokenAuth(token string) clientOpt
WithTokenAuth configures the buildkite.Client to use the provided token for authentication. This is the recommended way to authenticate with the buildkite API Note that at least one of WithTokenAuth or [WithBasicAuth] must be provided to NewOpts
func WithUserAgent ¶
func WithUserAgent(userAgent string) clientOpt
WithUserAgent configures the buildkite.Client to use the provided user agent string, instead of the default of "go-buildkite/<version>"
Types ¶
type AccessToken ¶
type AccessTokensService ¶
type AccessTokensService struct {
// contains filtered or unexported fields
}
func (*AccessTokensService) Get ¶
func (ats *AccessTokensService) Get(ctx context.Context) (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(ctx context.Context) (*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"` GraphQLID string `json:"graphql_id,omitempty"` URL string `json:"url,omitempty"` WebURL string `json:"web_url,omitempty"` Name string `json:"name,omitempty"` ConnectedState string `json:"connection_state,omitempty"` AgentToken string `json:"access_token,omitempty"` Hostname string `json:"hostname,omitempty"` IPAddress string `json:"ip_address,omitempty"` UserAgent string `json:"user_agent,omitempty"` Version string `json:"version,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` LastJobFinishedAt *Timestamp `json:"last_job_finished_at,omitempty"` Priority *int `json:"priority,omitempty"` Metadata []string `json:"meta_data,omitempty"` // the user that created the agent Creator *User `json:"creator,omitempty"` Job *Job `json:"job,omitempty"` }
Agent represents a buildkite build agent.
type AgentConnectedEvent ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (as *AgentsService) Create(ctx context.Context, org string, agent Agent) (Agent, *Response, error)
Create a new buildkite agent.
buildkite API docs: https://buildkite.com/docs/api/agents#create-an-agent
func (*AgentsService) Delete ¶
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(ctx context.Context, 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
type Annotation ¶
type Annotation struct { ID string `json:"id,omitempty"` Context string `json:"context,omitempty"` Style string `json:"style,omitempty"` BodyHTML string `json:"body_html,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` }
Annotation represents an annotation which has been stored from a build
type AnnotationCreate ¶
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 ¶
func (as *AnnotationsService) Create(ctx context.Context, org, pipeline, build string, ac AnnotationCreate) (Annotation, *Response, error)
func (*AnnotationsService) ListByBuild ¶
func (as *AnnotationsService) ListByBuild(ctx context.Context, 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"` JobID string `json:"job_id,omitempty"` URL string `json:"url,omitempty"` DownloadURL string `json:"download_url,omitempty"` State string `json:"state,omitempty"` Path string `json:"path,omitempty"` Dirname string `json:"dirname,omitempty"` Filename string `json:"filename,omitempty"` MimeType string `json:"mime_type,omitempty"` FileSize int64 `json:"file_size,omitempty"` GlobPath string `json:"glob_path,omitempty"` OriginalPath string `json:"original_path,omitempty"` SHA1 string `json:"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 ¶
func (as *ArtifactsService) DownloadArtifactByURL(ctx context.Context, url string, w io.Writer) (*Response, error)
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(ctx context.Context, 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(ctx context.Context, 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"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` }
Author of a commit (used in CreateBuild)
type BitbucketSettings ¶
type BitbucketSettings struct { BuildPullRequests bool `json:"build_pull_requests,omitempty"` BuildBranches bool `json:"build_branches,omitempty"` PullRequestBranchFilterEnabled bool `json:"pull_request_branch_filter_enabled,omitempty"` PullRequestBranchFilterConfiguration string `json:"pull_request_branch_filter_configuration,omitempty"` SkipPullRequestBuildsForExistingCommits bool `json:"skip_pull_request_builds_for_existing_commits,omitempty"` BuildTags bool `json:"build_tags,omitempty"` PublishCommitStatus bool `json:"publish_commit_status,omitempty"` PublishCommitStatusPerStep bool `json:"publish_commit_status_per_step,omitempty"` // Read-only Repository string `json:"repository,omitempty"` }
BitbucketSettings are settings for pipelines building from Bitbucket repositories.
type Build ¶
type Build struct { ID string `json:"id,omitempty"` GraphQLID string `json:"graphql_id,omitempty"` URL string `json:"url,omitempty"` WebURL string `json:"web_url,omitempty"` Number int `json:"number,omitempty"` State string `json:"state,omitempty"` Blocked bool `json:"blocked,omitempty"` Message string `json:"message,omitempty"` Commit string `json:"commit,omitempty"` Branch string `json:"branch,omitempty"` Author Author `json:"author,omitempty"` Env map[string]interface{} `json:"env,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` ScheduledAt *Timestamp `json:"scheduled_at,omitempty"` StartedAt *Timestamp `json:"started_at,omitempty"` FinishedAt *Timestamp `json:"finished_at,omitempty"` MetaData map[string]string `json:"meta_data,omitempty"` Creator Creator `json:"creator,omitempty"` Source string `json:"source,omitempty"` // jobs run during the build Jobs []Job `json:"jobs,omitempty"` // the pipeline this build is associated with Pipeline *Pipeline `json:"pipeline,omitempty"` // the build this build is a rebuild of RebuiltFrom *RebuiltFrom `json:"rebuilt_from,omitempty"` // the pull request this build is associated with PullRequest *PullRequest `json:"pull_request,omitempty"` // the build that this build is triggered from // https://buildkite.com/docs/pipelines/trigger-step TriggeredFrom *TriggeredFrom `json:"triggered_from,omitempty"` }
Build represents a build which has run in buildkite
type BuildEvent ¶
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 ¶
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 ¶
type BuildFinishedEvent struct {
BuildEvent
}
BuildFinishedEvent is triggered when a build finishes
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildRunningEvent ¶
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 ¶
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 ¶
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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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 ¶
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 PackagesService *PackagesService PackageRegistriesService *PackageRegistriesService Pipelines *PipelinesService PipelineTemplates *PipelineTemplatesService User *UserService Teams *TeamsService TeamMember *TeamMemberService TeamPipelines *TeamPipelinesService TeamSuites *TeamSuitesService 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 with the provided options. Note that at WithTokenAuth must be provided for requests to the buildkite API to succeed. Otherwise, sensible defaults are used.
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 ¶
func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
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 ¶
type Cluster struct { ID string `json:"id,omitempty"` GraphQLID string `json:"graphql_id,omitempty"` DefaultQueueID string `json:"default_queue_id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Emoji string `json:"emoji,omitempty"` Color string `json:"color,omitempty"` URL string `json:"url,omitempty"` WebURL string `json:"web_url,omitempty"` QueuesURL string `json:"queues_url,omitempty"` DefaultQueueURL string `json:"default_queue_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` CreatedBy ClusterCreator `json:"created_by,omitempty"` }
type ClusterCreate ¶
type ClusterCreator ¶
type ClusterQueue ¶
type ClusterQueue struct { ID string `json:"id,omitempty"` GraphQLID string `json:"graphql_id,omitempty"` Key string `json:"key,omitempty"` Description string `json:"description,omitempty"` URL string `json:"url,omitempty"` WebURL string `json:"web_url,omitempty"` ClusterURL string `json:"cluster_url,omitempty"` DispatchPaused bool `json:"dispatch_paused,omitempty"` DispatchPausedBy *ClusterCreator `json:"dispatch_paused_by,omitempty"` DispatchPausedAt *Timestamp `json:"dispatch_paused_at,omitempty"` DispatchPausedNote string `json:"dispatch_paused_note,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` CreatedBy ClusterCreator `json:"created_by,omitempty"` }
type ClusterQueueCreate ¶
type ClusterQueuePause ¶
type ClusterQueuePause struct {
Note string `json:"dispatch_paused_note,omitempty"`
}
type ClusterQueueUpdate ¶
type ClusterQueueUpdate struct {
Description string `json:"description,omitempty"`
}
type ClusterQueuesListOptions ¶
type ClusterQueuesListOptions struct {
ListOptions
}
type ClusterQueuesService ¶
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 ¶
func (cqs *ClusterQueuesService) Create(ctx context.Context, org, clusterID string, qc ClusterQueueCreate) (ClusterQueue, *Response, error)
func (*ClusterQueuesService) Get ¶
func (cqs *ClusterQueuesService) Get(ctx context.Context, org, clusterID, queueID string) (ClusterQueue, *Response, error)
func (*ClusterQueuesService) List ¶
func (cqs *ClusterQueuesService) List(ctx context.Context, org, clusterID string, opt *ClusterQueuesListOptions) ([]ClusterQueue, *Response, error)
func (*ClusterQueuesService) Pause ¶
func (cqs *ClusterQueuesService) Pause(ctx context.Context, org, clusterID, queueID string, qp ClusterQueuePause) (ClusterQueue, *Response, error)
func (*ClusterQueuesService) Update ¶
func (cqs *ClusterQueuesService) Update(ctx context.Context, org, clusterID, queueID string, qu ClusterQueueUpdate) (ClusterQueue, *Response, error)
type ClusterToken ¶
type ClusterToken struct { ID string `json:"id,omitempty"` GraphQLID string `json:"graphql_id,omitempty"` Description string `json:"description,omitempty"` AllowedIPAddresses string `json:"allowed_ip_addresses,omitempty"` URL string `json:"url,omitempty"` ClusterURL string `json:"cluster_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` CreatedBy ClusterCreator `json:"created_by,omitempty"` Token string `json:"token,omitempty"` }
type ClusterTokensListOptions ¶
type ClusterTokensListOptions struct {
ListOptions
}
type ClusterTokensService ¶
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 ¶
func (cts *ClusterTokensService) Create(ctx context.Context, org, clusterID string, ctc ClusterTokenCreateUpdate) (ClusterToken, *Response, error)
func (*ClusterTokensService) Get ¶
func (cts *ClusterTokensService) Get(ctx context.Context, org, clusterID, tokenID string) (ClusterToken, *Response, error)
func (*ClusterTokensService) List ¶
func (cts *ClusterTokensService) List(ctx context.Context, org, clusterID string, opt *ClusterTokensListOptions) ([]ClusterToken, *Response, error)
func (*ClusterTokensService) Update ¶
func (cts *ClusterTokensService) Update(ctx context.Context, org, clusterID, tokenID string, ctc ClusterTokenCreateUpdate) (ClusterToken, *Response, error)
type ClusterUpdate ¶
type ClustersListOptions ¶
type ClustersListOptions struct{ ListOptions }
type ClustersService ¶
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 ¶
func (cs *ClustersService) Create(ctx context.Context, org string, cc ClusterCreate) (Cluster, *Response, error)
func (*ClustersService) List ¶
func (cs *ClustersService) List(ctx context.Context, org string, opt *ClustersListOptions) ([]Cluster, *Response, error)
func (*ClustersService) Update ¶
func (cs *ClustersService) Update(ctx context.Context, org, id string, cu ClusterUpdate) (Cluster, *Response, error)
type CreateBuild ¶
type CreateBuild struct { Commit string `json:"commit"` Branch string `json:"branch"` Message string `json:"message"` // Optional fields Author Author `json:"author,omitempty"` CleanCheckout bool `json:"clean_checkout,omitempty"` Env map[string]string `json:"env,omitempty"` MetaData map[string]string `json:"meta_data,omitempty"` IgnorePipelineBranchFilters bool `json:"ignore_pipeline_branch_filters,omitempty"` PullRequestBaseBranch string `json:"pull_request_base_branch,omitempty"` PullRequestID int64 `json:"pull_request_id,omitempty"` PullRequestRepository string `json:"pull_request_repository,omitempty"` }
CreateBuild - Create a build.
type CreatePackageInput ¶
type CreatePackageInput struct { Package io.Reader // The package to upload. This can be an [os.File], or any other [io.Reader]. Filename string // The name of the file to upload. If PackageFile is an [os.File], this can be omitted, and the file's name will be used. }
CreatePackageInput specifies the input parameters for the Create method. All fields are required, but if PackageFile is an os.File, Filename can be omitted.
type CreatePackageRegistryInput ¶
type CreatePackageRegistryInput struct { Name string `json:"name,omitempty"` // The name of the package registry Ecosystem string `json:"ecosystem,omitempty"` // The ecosystem of the package registry Description string `json:"description,omitempty"` // A description for the package registry Emoji string `json:"emoji,omitempty"` // An emoji for the package registry, in buildkite format (eg ":rocket:") Color string `json:"color,omitempty"` // A color for the package registry, in hex format (eg "#FF0000") OIDCPolicy PackageRegistryOIDCPolicy `json:"oidc_policy,omitempty"` // The OIDC policy for the package registry, as a YAML or JSON string }
CreatePackageRegistryInput represents the input to create a package registry.
type CreatePipeline ¶
type CreatePipeline struct { Name string `json:"name"` Repository string `json:"repository"` // Either configuration needs to be specified as a yaml string or steps. Configuration string `json:"configuration,omitempty"` Steps []Step `json:"steps,omitempty"` // Optional fields DefaultBranch string `json:"default_branch,omitempty"` Description string `json:"description,omitempty"` Env map[string]string `json:"env,omitempty"` ProviderSettings ProviderSettings `json:"provider_settings,omitempty"` BranchConfiguration string `json:"branch_configuration,omitempty"` SkipQueuedBranchBuilds bool `json:"skip_queued_branch_builds,omitempty"` SkipQueuedBranchBuildsFilter string `json:"skip_queued_branch_builds_filter,omitempty"` CancelRunningBranchBuilds bool `json:"cancel_running_branch_builds,omitempty"` CancelRunningBranchBuildsFilter string `json:"cancel_running_branch_builds_filter,omitempty"` TeamUuids []string `json:"team_uuids,omitempty"` ClusterID string `json:"cluster_id,omitempty"` Visibility string `json:"visibility,omitempty"` Tags []string `json:"tags,omitempty"` }
CreatePipeline - Create a Pipeline.
type CreateTeam ¶ added in v4.1.0
type CreateTeam struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Privacy string `json:"privacy,omitempty"` IsDefaultTeam bool `json:"is_default_team,omitempty"` DefaultMemberRole string `json:"default_member_role,omitempty"` MembersCanCreatePipelines bool `json:"members_can_create_pipelines,omitempty"` }
CreateTeam represents a request to create a team.
type CreateTeamMember ¶ added in v4.1.0
type CreateTeamMember struct { UserID string `json:"user_id,omitempty"` Role string `json:"role,omitempty"` }
CreateTeamMember represents a request to create a team member.
type CreateTeamPipelines ¶ added in v4.1.0
type CreateTeamSuites ¶ added in v4.1.0
type Creator ¶
type Creator struct { AvatarURL string `json:"avatar_url"` CreatedAt *Timestamp `json:"created_at"` Email string `json:"email"` ID string `json:"id"` Name string `json:"name"` }
Creator represents who created a build
type ErrorResponse ¶
type ErrorResponse struct { Response *http.Response // HTTP response that caused this error Message string `json:"message"` // error message RawBody []byte `json:"-"` // Raw Response Body }
ErrorResponse provides a message.
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type Event ¶
type Event struct { Type string `json:"type"` RawPayload *json.RawMessage `json:"payload,omitempty"` }
Event represents a Buildkite webhook event
func (*Event) ParsePayload ¶
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 ¶
type FlakyTest struct { ID string `json:"id,omitempty"` WebURL string `json:"web_url,omitempty"` Scope string `json:"scope,omitempty"` Name string `json:"name,omitempty"` Location string `json:"location,omitempty"` FileName string `json:"file_name,omitempty"` Instances int `json:"instances,omitempty"` MostRecentInstanceAt *Timestamp `json:"most_recent_instance_at,omitempty"` }
type FlakyTestsListOptions ¶
type FlakyTestsListOptions struct{ ListOptions }
type FlakyTestsService ¶
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 ¶
func (fts *FlakyTestsService) List(ctx context.Context, org, slug string, opt *FlakyTestsListOptions) ([]FlakyTest, *Response, error)
type GitHubEnterpriseSettings ¶
type GitHubEnterpriseSettings struct { TriggerMode string `json:"trigger_mode,omitempty"` BuildPullRequests bool `json:"build_pull_requests,omitempty"` BuildBranches bool `json:"build_branches,omitempty"` PullRequestBranchFilterEnabled bool `json:"pull_request_branch_filter_enabled,omitempty"` PullRequestBranchFilterConfiguration string `json:"pull_request_branch_filter_configuration,omitempty"` SkipPullRequestBuildsForExistingCommits bool `json:"skip_pull_request_builds_for_existing_commits,omitempty"` BuildTags bool `json:"build_tags,omitempty"` PublishCommitStatus bool `json:"publish_commit_status,omitempty"` PublishCommitStatusPerStep bool `json:"publish_commit_status_per_step,omitempty"` // Read-only Repository string `json:"repository,omitempty"` }
GitHubEnterpriseSettings are settings for pipelines building from GitHub Enterprise repositories.
type GitHubSettings ¶
type GitHubSettings struct { TriggerMode string `json:"trigger_mode,omitempty"` BuildPullRequests bool `json:"build_pull_requests,omitempty"` BuildBranches bool `json:"build_branches,omitempty"` PullRequestBranchFilterEnabled bool `json:"pull_request_branch_filter_enabled,omitempty"` PullRequestBranchFilterConfiguration string `json:"pull_request_branch_filter_configuration,omitempty"` SkipPullRequestBuildsForExistingCommits bool `json:"skip_pull_request_builds_for_existing_commits,omitempty"` BuildPullRequestForks bool `json:"build_pull_request_forks,omitempty"` PrefixPullRequestForkBranchNames bool `json:"prefix_pull_request_fork_branch_names,omitempty"` BuildTags bool `json:"build_tags,omitempty"` PublishCommitStatus bool `json:"publish_commit_status,omitempty"` PublishCommitStatusPerStep bool `json:"publish_commit_status_per_step,omitempty"` FilterEnabled bool `json:"filter_enabled,omitempty"` FilterCondition string `json:"filter_condition,omitempty"` SeparatePullRequestStatuses bool `json:"separate_pull_request_statuses,omitempty"` PublishBlockedAsPending bool `json:"publish_blocked_as_pending,omitempty"` // Read-only Repository string `json:"repository,omitempty"` }
GitHubSettings are settings for pipelines building from GitHub repositories.
type GitLabSettings ¶
type GitLabSettings struct { // Read-only Repository string `json:"repository,omitempty"` }
GitLabSettings are settings for pipelines building from GitLab repositories.
type Job ¶
type Job struct { ID string `json:"id,omitempty"` GraphQLID string `json:"graphql_id,omitempty"` Type string `json:"type,omitempty"` Name string `json:"name,omitempty"` Label string `json:"label,omitempty"` StepKey string `json:"step_key,omitempty"` GroupKey string `json:"group_key,omitempty"` State string `json:"state,omitempty"` LogsURL string `json:"logs_url,omitempty"` RawLogsURL string `json:"raw_log_url,omitempty"` Command string `json:"command,omitempty"` ExitStatus *int `json:"exit_status,omitempty"` ArtifactPaths string `json:"artifact_paths,omitempty"` ArtifactsURL string `json:"artifacts_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` ScheduledAt *Timestamp `json:"scheduled_at,omitempty"` RunnableAt *Timestamp `json:"runnable_at,omitempty"` StartedAt *Timestamp `json:"started_at,omitempty"` FinishedAt *Timestamp `json:"finished_at,omitempty"` UnblockedAt *Timestamp `json:"unblocked_at,omitempty"` Agent Agent `json:"agent,omitempty"` AgentQueryRules []string `json:"agent_query_rules,omitempty"` WebURL string `json:"web_url"` Retried bool `json:"retried,omitempty"` RetriedInJobID string `json:"retried_in_job_id,omitempty"` RetriesCount int `json:"retries_count,omitempty"` RetrySource *JobRetrySource `json:"retry_source,omitempty"` RetryType string `json:"retry_type,omitempty"` SoftFailed bool `json:"soft_failed,omitempty"` UnblockedBy *UnblockedBy `json:"unblocked_by,omitempty"` Unblockable bool `json:"unblockable,omitempty"` UnblockURL string `json:"unblock_url,omitempty"` ParallelGroupIndex *int `json:"parallel_group_index,omitempty"` ParallelGroupTotal *int `json:"parallel_group_total,omitempty"` ClusterID string `json:"cluster_id,omitempty"` ClusterQueueID string `json:"cluster_queue_id,omitempty"` TriggeredBuild *TriggeredBuild `json:"triggered_build,omitempty"` Priority *JobPriority `json:"priority"` }
Job represents a job run during a build in buildkite
type JobActivatedEvent ¶
type JobActivatedEvent struct {
JobEvent
}
JobActivatedEvent is triggered when a job is activated
Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobEvent ¶
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 ¶
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 ¶
type JobPriority struct {
Number int `json:"number,omitempty"`
}
JobPriority represents the priority of the job
type JobRetrySource ¶
type JobRetrySource struct { JobID string `json:"job_id,omitempty"` RetryType string `json:"retry_type,omitempty"` }
JobRetrySource represents what triggered this retry.
type JobScheduledEvent ¶
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 ¶
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 ¶
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 ¶
func (js *JobsService) GetJobEnvironmentVariables(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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 ¶
func (MetaDataFilters) EncodeValues ¶
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 OIDCPolicyStatement ¶
type Organization ¶
type Organization struct { ID string `json:"id,omitempty"` GraphQLID string `json:"graphql_id,omitempty"` URL string `json:"url,omitempty"` WebURL string `json:"web_url,omitempty"` Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` Repository string `json:"repository,omitempty"` PipelinesURL string `json:"pipelines_url,omitempty"` EmojisURL string `json:"emojis_url,omitempty"` AgentsURL string `json:"agents_url,omitempty"` CreatedAt *Timestamp `json:"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(ctx context.Context, 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(ctx context.Context, opt *OrganizationListOptions) ([]Organization, *Response, error)
List the organizations for the current user.
buildkite API docs: https://buildkite.com/docs/api/organizations#list-organizations
type Package ¶
type Package struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` WebURL string `json:"web_url"` Organization Organization `json:"organization"` Registry PackageRegistry `json:"registry"` }
Package represents a package which has been stored in a registry
type PackagePresignedUpload ¶
type PackagePresignedUpload struct { OrganizationSlug string `json:"-"` RegistrySlug string `json:"-"` URI string `json:"uri"` Form PackagePresignedUploadForm `json:"form"` // contains filtered or unexported fields }
PackagePresignedUpload represents a presigned upload URL for a Buildkite package, returned by the Buildkite API
func (*PackagePresignedUpload) Finalize ¶
func (ppu *PackagePresignedUpload) Finalize(ctx context.Context, s3URL string) (Package, *Response, error)
Finalize creates a package in the registry for the organization, using the S3 URL of the uploaded package file.
func (*PackagePresignedUpload) Perform ¶
Perform performs uploads the package file referred to by `file` to the presigned upload URL. It does not create the package in the registry, only uploads the file to the package host. The returned string is the URL of the uploaded file in S3, which can then be passed to [Finalize] to create the package in the registry.
type PackageRegistriesService ¶
type PackageRegistriesService struct {
// contains filtered or unexported fields
}
PackageRegistriesService handles communication with the package registries related Buildkite APIs
func (*PackageRegistriesService) Create ¶
func (rs *PackageRegistriesService) Create(ctx context.Context, organizationSlug string, cpri CreatePackageRegistryInput) (PackageRegistry, *Response, error)
Create creates a package registry for an organization
func (*PackageRegistriesService) Delete ¶
func (rs *PackageRegistriesService) Delete(ctx context.Context, organizationSlug, registrySlug string) (*Response, error)
Delete deletes a package registry for an organization
func (*PackageRegistriesService) Get ¶
func (rs *PackageRegistriesService) Get(ctx context.Context, organizationSlug, registrySlug string) (PackageRegistry, *Response, error)
Get retrieves a package registry for an organization
func (*PackageRegistriesService) List ¶
func (rs *PackageRegistriesService) List(ctx context.Context, organizationSlug string) ([]PackageRegistry, *Response, error)
List retrieves a list of package all package registries for an organization
func (*PackageRegistriesService) Update ¶
func (rs *PackageRegistriesService) Update(ctx context.Context, organizationSlug, registrySlug string, upri UpdatePackageRegistryInput) (PackageRegistry, *Response, error)
Update updates a package registry for an organization
type PackageRegistry ¶
type PackageRegistry struct { ID string `json:"id"` GraphQLID string `json:"graphql_id"` Slug string `json:"slug"` URL string `json:"url"` WebURL string `json:"web_url"` Name string `json:"name"` Ecosystem string `json:"ecosystem"` Description string `json:"description"` Emoji string `json:"emoji"` Color string `json:"color"` Public bool `json:"public"` OIDCPolicy string `json:"oidc_policy"` }
PackageRegistry represents a package registry within Buildkite
type PackageRegistryOIDCPolicy ¶
type PackageRegistryOIDCPolicy []OIDCPolicyStatement
type PackagesService ¶
type PackagesService struct {
// contains filtered or unexported fields
}
PackagesService handles communication with packages Buildkite API endpoints
func (*PackagesService) Create ¶
func (ps *PackagesService) Create(ctx context.Context, organizationSlug, registrySlug string, cpi CreatePackageInput) (Package, *Response, error)
Create creates a package in a registry for an organization
func (*PackagesService) RequestPresignedUpload ¶
func (ps *PackagesService) RequestPresignedUpload(ctx context.Context, organizationSlug, registrySlug string) (*PackagePresignedUpload, *Response, error)
RequestPresignedUpload requests a presigned upload URL for a Buildkite package from the buildkite API
type PingEvent ¶
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"` GraphQLID string `json:"graphql_id,omitempty"` URL string `json:"url,omitempty"` WebURL string `json:"web_url,omitempty"` Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` Repository string `json:"repository,omitempty"` BuildsURL string `json:"builds_url,omitempty"` BadgeURL string `json:"badge_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` ArchivedAt *Timestamp `json:"archived_at,omitempty"` DefaultBranch string `json:"default_branch,omitempty"` Description string `json:"description,omitempty"` BranchConfiguration string `json:"branch_configuration,omitempty"` SkipQueuedBranchBuilds bool `json:"skip_queued_branch_builds,omitempty"` SkipQueuedBranchBuildsFilter string `json:"skip_queued_branch_builds_filter,omitempty"` CancelRunningBranchBuilds bool `json:"cancel_running_branch_builds,omitempty"` CancelRunningBranchBuildsFilter string `json:"cancel_running_branch_builds_filter,omitempty"` ClusterID string `json:"cluster_id,omitempty"` Visibility string `json:"visibility,omitempty"` Tags []string `json:"tags,omitempty"` ScheduledBuildsCount int `json:"scheduled_builds_count,omitempty"` RunningBuildsCount int `json:"running_builds_count,omitempty"` ScheduledJobsCount int `json:"scheduled_jobs_count,omitempty"` RunningJobsCount int `json:"running_jobs_count,omitempty"` WaitingJobsCount int `json:"waiting_jobs_count,omitempty"` // the provider of sources Provider Provider `json:"provider,omitempty"` // build steps Steps []Step `json:"steps,omitempty"` Configuration string `json:"configuration,omitempty"` Env map[string]any `json:"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 ¶
type PipelineTemplate struct { UUID string `json:"uuid,omitempty"` GraphQLID string `json:"graphql_id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Configuration string `json:"configuration,omitempty"` Available bool `json:"available,omitempty"` URL string `json:"url,omitempty"` WebURL string `json:"web_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` CreatedBy PipelineTemplateCreator `json:"created_by,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` UpdatedBy PipelineTemplateCreator `json:"updated_by,omitempty"` }
type PipelineTemplateCreator ¶
type PipelineTemplateListOptions ¶
type PipelineTemplateListOptions struct {
ListOptions
}
type PipelineTemplatesService ¶
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 ¶
func (pts *PipelineTemplatesService) Create(ctx context.Context, org string, ptc PipelineTemplateCreateUpdate) (PipelineTemplate, *Response, error)
func (*PipelineTemplatesService) Get ¶
func (pts *PipelineTemplatesService) Get(ctx context.Context, org, templateUUID string) (PipelineTemplate, *Response, error)
func (*PipelineTemplatesService) List ¶
func (pts *PipelineTemplatesService) List(ctx context.Context, org string, opt *PipelineTemplateListOptions) ([]PipelineTemplate, *Response, error)
func (*PipelineTemplatesService) Update ¶
func (pts *PipelineTemplatesService) Update(ctx context.Context, org, templateUUID string, ptu PipelineTemplateCreateUpdate) (PipelineTemplate, *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(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, 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 ¶
Delete a pipeline.
buildkite API docs: https://buildkite.com/docs/rest-api/pipelines#delete-a-pipeline
func (*PipelinesService) Get ¶
func (ps *PipelinesService) Get(ctx context.Context, org string, slug string) (Pipeline, *Response, error)
Get fetches a pipeline.
buildkite API docs: https://buildkite.com/docs/rest-api/pipelines#get-a-pipeline
func (*PipelinesService) List ¶
func (ps *PipelinesService) List(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, org, slug string, up UpdatePipeline) (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 ¶
Support deprecated map structure as well as array structure
type Provider ¶
type Provider struct { ID string `json:"id"` WebhookURL string `json:"webhook_url"` Settings ProviderSettings `json:"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"` Base string `json:"base,omitempty"` Repository string `json:"repository,omitempty"` }
PullRequest represents a Github PR
type RebuiltFrom ¶
type RebuiltFrom struct { ID string `json:"id"` Number int `json:"number"` URL string `json:"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"` Name string `json:"name,omitempty"` Label string `json:"label,omitempty"` Command string `json:"command,omitempty"` ArtifactPaths string `json:"artifact_paths,omitempty"` BranchConfiguration string `json:"branch_configuration,omitempty"` Env map[string]string `json:"env,omitempty"` TimeoutInMinutes *int `json:"timeout_in_minutes,omitempty"` AgentQueryRules []string `json:"agent_query_rules,omitempty"` Plugins Plugins `json:"plugins,omitempty"` }
Step represents a build step in buildkites build pipeline
type Team ¶
type Team struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` Description string `json:"description,omitempty"` Privacy string `json:"privacy,omitempty"` Default bool `json:"default,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` CreatedBy *User `json:"created_by,omitempty"` }
Team represents a buildkite team.
type TeamMember ¶ added in v4.1.0
type TeamMember struct { ID string `json:"user_id,omitempty"` UserName string `json:"user_name,omitempty"` Role string `json:"role,omitempty"` CreatedAt Timestamp `json:"created_at,omitempty"` }
TeamMember represents a member of a team.
type TeamMemberService ¶ added in v4.1.0
type TeamMemberService struct {
// contains filtered or unexported fields
}
TeamMemberService handles communication with the teams related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api
func (*TeamMemberService) CreateTeamMember ¶ added in v4.1.0
func (ts *TeamMemberService) CreateTeamMember(ctx context.Context, org string, teamID string, t CreateTeamMember) (TeamMember, *Response, error)
CreateTeamMember creates a team member.
func (*TeamMemberService) DeleteTeamMember ¶ added in v4.1.0
func (ts *TeamMemberService) DeleteTeamMember(ctx context.Context, org string, teamID string, userID string) (*Response, error)
DeleteTeamMember deletes a team member.
func (*TeamMemberService) GetTeamMember ¶ added in v4.1.0
func (ts *TeamMemberService) GetTeamMember(ctx context.Context, org string, teamID string, userID string) (TeamMember, error)
GetTeamMember gets a team member.
func (*TeamMemberService) ListTeamMembers ¶ added in v4.1.0
func (ts *TeamMemberService) ListTeamMembers(ctx context.Context, org string, id string, opt *TeamMembersListOptions) ([]TeamMember, *Response, error)
ListTeamMembers lists the members of a team.
func (*TeamMemberService) UpdateTeamMember ¶ added in v4.1.0
func (ts *TeamMemberService) UpdateTeamMember(ctx context.Context, org string, teamID string, userID string, role string) (TeamMember, *Response, error)
UpdateTeamMember updates a team member.
type TeamMembersListOptions ¶ added in v4.1.0
type TeamMembersListOptions struct {
ListOptions
}
TeamMembersListOptions specifies the optional parameters to the ListTeamMembers method.
type TeamPipeline ¶ added in v4.1.0
type TeamPipelinesListOptions ¶ added in v4.1.0
type TeamPipelinesListOptions struct {
ListOptions
}
type TeamPipelinesService ¶ added in v4.1.0
type TeamPipelinesService struct {
// contains filtered or unexported fields
}
func (*TeamPipelinesService) Create ¶ added in v4.1.0
func (tps *TeamPipelinesService) Create(ctx context.Context, org string, teamID string, ctp CreateTeamPipelines) (TeamPipeline, *Response, error)
func (*TeamPipelinesService) Get ¶ added in v4.1.0
func (tps *TeamPipelinesService) Get(ctx context.Context, org string, teamID string, pipelineID string) (TeamPipeline, *Response, error)
func (*TeamPipelinesService) List ¶ added in v4.1.0
func (tps *TeamPipelinesService) List(ctx context.Context, org string, id string, opt *TeamPipelinesListOptions) ([]TeamPipeline, *Response, error)
func (*TeamPipelinesService) Update ¶ added in v4.1.0
func (tps *TeamPipelinesService) Update(ctx context.Context, org string, teamID string, pipelineID string, utp UpdateTeamPipelines) (TeamPipeline, *Response, error)
type TeamSuites ¶ added in v4.1.0
type TeamSuitesListOptions ¶ added in v4.1.0
type TeamSuitesListOptions struct {
ListOptions
}
type TeamSuitesService ¶ added in v4.1.0
type TeamSuitesService struct {
// contains filtered or unexported fields
}
func (*TeamSuitesService) Create ¶ added in v4.1.0
func (tss *TeamSuitesService) Create(ctx context.Context, org string, teamID string, cts CreateTeamSuites) (TeamSuites, *Response, error)
func (*TeamSuitesService) Get ¶ added in v4.1.0
func (tss *TeamSuitesService) Get(ctx context.Context, org string, teamID string, suiteID string) (TeamSuites, *Response, error)
func (*TeamSuitesService) List ¶ added in v4.1.0
func (tss *TeamSuitesService) List(ctx context.Context, org string, id string, opt *TeamSuitesListOptions) ([]TeamSuites, *Response, error)
func (*TeamSuitesService) Update ¶ added in v4.1.0
func (tss *TeamSuitesService) Update(ctx context.Context, org string, teamID string, pipelineID string, utp UpdateTeamSuites) (TeamSuites, *Response, error)
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
}
TeamsService handles communication with the teams related methods of the buildkite API.
buildkite API docs: https://buildkite.com/docs/api
func (*TeamsService) CreateTeam ¶ added in v4.1.0
func (ts *TeamsService) CreateTeam(ctx context.Context, org string, t CreateTeam) (Team, *Response, error)
CreateTeam creates a team.
func (*TeamsService) DeleteTeam ¶ added in v4.1.0
DeleteTeam deletes a team.
func (*TeamsService) List ¶
func (ts *TeamsService) List(ctx context.Context, org string, opt *TeamsListOptions) ([]Team, *Response, error)
Get the teams for an org.
buildkite API docs: https://buildkite.com/docs/api
func (*TeamsService) UpdateTeam ¶ added in v4.1.0
func (ts *TeamsService) UpdateTeam(ctx context.Context, org string, id string, t CreateTeam) (Team, *Response, error)
UpdateTeam updates a team.
type TestRunsListOptions ¶
type TestRunsListOptions struct {
ListOptions
}
type TestRunsService ¶
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) List ¶
func (trs *TestRunsService) List(ctx context.Context, org, slug string, opt *TestRunsListOptions) ([]TestRun, *Response, error)
type TestSuite ¶
type TestSuite struct { ID string `json:"id,omitempty"` GraphQLID string `json:"graphql_id,omitempty"` Slug string `json:"slug,omitempty"` Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` WebURL string `json:"web_url,omitempty"` DefaultBranch string `json:"default_branch,omitempty"` }
type TestSuiteCreate ¶
type TestSuiteListOptions ¶
type TestSuiteListOptions struct{ ListOptions }
type TestSuitesService ¶
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 ¶
func (tss *TestSuitesService) Create(ctx context.Context, org string, ts TestSuiteCreate) (TestSuite, *Response, error)
func (*TestSuitesService) List ¶
func (tss *TestSuitesService) List(ctx context.Context, org string, opt *TestSuiteListOptions) ([]TestSuite, *Response, error)
type TestsService ¶
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"` Type string `json:"token_type,omitempty"` }
Token an oauth access token for the buildkite service
type TriggeredBuild ¶
type TriggeredFrom ¶
type UnblockedBy ¶
type UnblockedBy struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` AvatarURL string `json:"avatar_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` }
UnblockedBy represents the unblocked status of a job, when present
type UpdatePackageRegistryInput ¶
type UpdatePackageRegistryInput struct { Name string `json:"name,omitempty"` // The name of the package registry Description string `json:"description,omitempty"` // A description for the package registry Emoji string `json:"emoji,omitempty"` // An emoji for the package registry, in buildkite format (eg ":rocket:") Color string `json:"color,omitempty"` // A color for the package registry, in hex format (eg "#FF0000") OIDCPolicy PackageRegistryOIDCPolicy `json:"oidc_policy,omitempty"` // The OIDC policy for the package registry, as a YAML or JSON string }
type UpdatePipeline ¶
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"` Steps []Step `json:"steps,omitempty"` Name string `json:"name,omitempty"` Repository string `json:"repository,omitempty"` DefaultBranch string `json:"default_branch,omitempty"` Description string `json:"description,omitempty"` ProviderSettings ProviderSettings `json:"provider_settings,omitempty"` BranchConfiguration string `json:"branch_configuration,omitempty"` SkipQueuedBranchBuilds bool `json:"skip_queued_branch_builds,omitempty"` SkipQueuedBranchBuildsFilter string `json:"skip_queued_branch_builds_filter,omitempty"` CancelRunningBranchBuilds bool `json:"cancel_running_branch_builds,omitempty"` CancelRunningBranchBuildsFilter string `json:"cancel_running_branch_builds_filter,omitempty"` ClusterID string `json:"cluster_id,omitempty"` Visibility string `json:"visibility,omitempty"` Tags []string `json:"tags,omitempty"` }
type UpdateTeamPipelines ¶ added in v4.1.0
type UpdateTeamPipelines struct {
AccessLevel string `json:"access_level,omitempty"`
}
type UpdateTeamSuites ¶ added in v4.1.0
type UpdateTeamSuites struct {
AccessLevel []string `json:"access_level,omitempty"`
}
type User ¶
type User struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` CreatedAt *Timestamp `json:"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) CurrentUser ¶
CurrentUser returns the user associated with the access token being used
buildkite API docs: https://buildkite.com/docs/api
Source Files ¶
- access_tokens.go
- agents.go
- annotations.go
- artifacts.go
- buildkite.go
- builds.go
- cluster_queues.go
- cluster_tokens.go
- clusters.go
- flaky_tests.go
- jobs.go
- misc.go
- organizations.go
- package_registries.go
- package_uploads.go
- packages.go
- pipeline_templates.go
- pipelines.go
- providers.go
- team_member.go
- team_pipelines.go
- team_suites.go
- teams.go
- test_runs.go
- test_suites.go
- tests.go
- timestamp.go
- user.go
- version.go
- webhook.go
- webhook_events.go