circleci

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 23 Imported by: 0

README

Go API client for CircleCI

GoDoc Build Status GitHub last commit License

This describes the resources that make up the CircleCI API v2. API v2 is currently in Preview. Additional documentation for this API can be found in the API Preview Docs. Breaking changes to the API will be announced in the Breaking Changes log.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: v2
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Example

Please see examples.

Documentation for API Endpoints

All URIs are relative to https://circleci.com/api/v2

Class Method HTTP request Description
InsightsApi GetProjectWorkflowMetrics Get /insights/{project-slug}/workflows Get summary metrics for a project's workflows
InsightsApi GetProjectWorkflowRuns Get /insights/{project-slug}/workflows/{workflow-name} Get recent runs of a workflow
JobApi CancelJob Post /project/{project-slug}/job/{job-number}/cancel Cancel job
JobApi GetJobArtifacts Get /project/{project-slug}/{job-number}/artifacts Get a job's artifacts
JobApi GetJobDetails Get /project/{project-slug}/job/{job-number} Get job details
JobApi GetTests Get /project/{project-slug}/{job-number}/tests Get test metadata
PipelineApi GetPipelineById Get /pipeline/{pipeline-id} Get a pipeline
PipelineApi GetPipelineByNumber Get /project/{project-slug}/pipeline/{pipeline-number} Get a pipeline
PipelineApi GetPipelineConfigById Get /pipeline/{pipeline-id}/config Get a pipeline's configuration
PipelineApi ListMyPipelines Get /project/{project-slug}/pipeline/mine Get your pipelines
PipelineApi ListPipelinesForProject Get /project/{project-slug}/pipeline Get all pipelines
PipelineApi ListWorkflowsByPipelineId Get /pipeline/{pipeline-id}/workflow Get a pipeline's workflows
PipelineApi TriggerPipeline Post /project/{project-slug}/pipeline Trigger a new pipeline
PreviewApi CancelJob Post /project/{project-slug}/job/{job-number}/cancel Cancel job
PreviewApi CreateCheckoutKey Post /project/{project-slug}/checkout-key Create a new checkout key
PreviewApi CreateEnvVar Post /project/{project-slug}/envvar Create an environment variable
PreviewApi DeleteCheckoutKey Delete /project/{project-slug}/checkout-key/{fingerprint} Delete a checkout key
PreviewApi DeleteEnvVar Delete /project/{project-slug}/envvar/{name} Delete an environment variable
PreviewApi GetCheckoutKey Get /project/{project-slug}/checkout-key/{fingerprint} Get a checkout key
PreviewApi GetCollaborations Get /me/collaborations Collaborations
PreviewApi GetCurrentUser Get /me User Information
PreviewApi GetEnvVar Get /project/{project-slug}/envvar/{name} Get a masked environment variable
PreviewApi GetJobArtifacts Get /project/{project-slug}/{job-number}/artifacts Get a job's artifacts
PreviewApi GetJobDetails Get /project/{project-slug}/job/{job-number} Get job details
PreviewApi GetProjectBySlug Get /project/{project-slug} Get a project
PreviewApi GetProjectWorkflowMetrics Get /insights/{project-slug}/workflows Get summary metrics for a project's workflows
PreviewApi GetProjectWorkflowRuns Get /insights/{project-slug}/workflows/{workflow-name} Get recent runs of a workflow
PreviewApi GetTests Get /project/{project-slug}/{job-number}/tests Get test metadata
PreviewApi GetUser Get /user/{id} User Information
PreviewApi ListCheckoutKeys Get /project/{project-slug}/checkout-key Get all checkout keys
PreviewApi ListEnvVars Get /project/{project-slug}/envvar List all environment variables
ProjectApi CreateCheckoutKey Post /project/{project-slug}/checkout-key Create a new checkout key
ProjectApi CreateEnvVar Post /project/{project-slug}/envvar Create an environment variable
ProjectApi DeleteCheckoutKey Delete /project/{project-slug}/checkout-key/{fingerprint} Delete a checkout key
ProjectApi DeleteEnvVar Delete /project/{project-slug}/envvar/{name} Delete an environment variable
ProjectApi GetCheckoutKey Get /project/{project-slug}/checkout-key/{fingerprint} Get a checkout key
ProjectApi GetEnvVar Get /project/{project-slug}/envvar/{name} Get a masked environment variable
ProjectApi GetProjectBySlug Get /project/{project-slug} Get a project
ProjectApi ListCheckoutKeys Get /project/{project-slug}/checkout-key Get all checkout keys
ProjectApi ListEnvVars Get /project/{project-slug}/envvar List all environment variables
UserApi GetCollaborations Get /me/collaborations Collaborations
UserApi GetCurrentUser Get /me User Information
UserApi GetUser Get /user/{id} User Information
WorkflowApi CancelWorkflow Post /workflow/{id}/cancel Cancel a workflow
WorkflowApi GetWorkflowById Get /workflow/{id} Get a workflow
WorkflowApi ListWorkflowJobs Get /workflow/{id}/job Get a workflow's jobs
WorkflowApi RerunWorkflow Post /workflow/{id}/rerun Rerun a workflow

Documentation For Models

License

MIT

About the license of code generated by OpenAPI Generator, please see the document of OpenAPI Generator.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	InsightsApi *InsightsApiService

	JobApi *JobApiService

	PipelineApi *PipelineApiService

	PreviewApi *PreviewApiService

	ProjectApi *ProjectApiService

	UserApi *UserApiService

	WorkflowApi *WorkflowApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the CircleCI API API vv2 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

ChangeBasePath changes base path to allow switching to mocks

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResonse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type Artifact

type Artifact struct {
	// The artifact path.
	Path string `json:"path"`
	// The index of the node that stored the artifact.
	NodeIndex int64 `json:"node_index"`
	// The URL to download the artifact contents.
	Url string `json:"url"`
}

Artifact An artifact

type ArtifactListResponse

type ArtifactListResponse struct {
	Items []Artifact `json:"items"`
	// A token to pass as a `page-token` query parameter to return the next page of results.
	NextPageToken string `json:"next_page_token"`
}

ArtifactListResponse struct for ArtifactListResponse

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type CheckoutKey

type CheckoutKey struct {
	// A public SSH key.
	PublicKey string `json:"public-key"`
	// The type of checkout key. This may be either `deploy-key` or `github-user-key`.
	Type string `json:"type"`
	// An SSH key fingerprint.
	Fingerprint string `json:"fingerprint"`
	// A boolean value that indicates if this key is preferred.
	Preferred bool `json:"preferred"`
	// The date and time the checkout key was created.
	CreatedAt time.Time `json:"created-at"`
}

CheckoutKey struct for CheckoutKey

type CheckoutKeyInput

type CheckoutKeyInput struct {
	// The type of checkout key to create. This may be either `deploy-key` or `user-key`.
	Type string `json:"type"`
}

CheckoutKeyInput struct for CheckoutKeyInput

type CheckoutKeyListResponse

type CheckoutKeyListResponse struct {
	Items []CheckoutKey `json:"items"`
	// A token to pass as a `page-token` query parameter to return the next page of results.
	NextPageToken string `json:"next_page_token"`
}

CheckoutKeyListResponse struct for CheckoutKeyListResponse

type Collaboration

type Collaboration struct {
	// The VCS provider
	VcsType string `json:"vcs-type"`
	// The name of the organization
	Name string `json:"name"`
	// URL to the user's avatar on the VCS
	AvatarUrl string `json:"avatar_url"`
}

Collaboration struct for Collaboration

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	Servers       []ServerConfiguration
	HTTPClient    *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerUrl

func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error)

ServerUrl returns URL based on server settings

type CreateCheckoutKeyOpts

type CreateCheckoutKeyOpts struct {
	CheckoutKeyInput optional.Interface
}

CreateCheckoutKeyOpts Optional parameters for the method 'CreateCheckoutKey'

type CreateEnvVarOpts

type CreateEnvVarOpts struct {
	EnvironmentVariablePair1 optional.Interface
}

CreateEnvVarOpts Optional parameters for the method 'CreateEnvVar'

type EnvironmentVariableListResponse

type EnvironmentVariableListResponse struct {
	Items []EnvironmentVariablePair `json:"items"`
	// A token to pass as a `page-token` query parameter to return the next page of results.
	NextPageToken string `json:"next_page_token"`
}

EnvironmentVariableListResponse struct for EnvironmentVariableListResponse

type EnvironmentVariablePair

type EnvironmentVariablePair struct {
	// The name of the environment variable.
	Name string `json:"name"`
	// The value of the environment variable.
	Value string `json:"value"`
}

EnvironmentVariablePair struct for EnvironmentVariablePair

type EnvironmentVariablePair1

type EnvironmentVariablePair1 struct {
	// The name of the environment variable.
	Name string `json:"name"`
	// The value of the environment variable.
	Value string `json:"value"`
}

EnvironmentVariablePair1 struct for EnvironmentVariablePair1

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GetProjectWorkflowMetricsOpts

type GetProjectWorkflowMetricsOpts struct {
	PageToken optional.String
	Branch    optional.String
}

GetProjectWorkflowMetricsOpts Optional parameters for the method 'GetProjectWorkflowMetrics'

type GetProjectWorkflowRunsOpts

type GetProjectWorkflowRunsOpts struct {
	Branch optional.String
}

GetProjectWorkflowRunsOpts Optional parameters for the method 'GetProjectWorkflowRuns'

type InlineResponse200

type InlineResponse200 struct {
	// Workflow summary metrics.
	Items []InlineResponse200Items `json:"items"`
	// A token to pass as a `page-token` query parameter to return the next page of results.
	NextPageToken string `json:"next_page_token"`
}

InlineResponse200 Paged workflow summary metrics.

type InlineResponse2001

type InlineResponse2001 struct {
	// Recent workflow runs.
	Items []InlineResponse2001Items `json:"items"`
}

InlineResponse2001 Recent workflow runs.

type InlineResponse2001Items

type InlineResponse2001Items struct {
	// The unique ID of the workflow.
	Id string `json:"id"`
	// The duration in seconds of a run.
	Duration int64 `json:"duration"`
	// The date and time the workflow was created.
	CreatedAt time.Time `json:"created_at"`
	// The date and time the workflow stopped.
	StoppedAt time.Time `json:"stopped_at"`
	// The number of credits used during execution
	CreditsUsed int64 `json:"credits-used"`
	// Workflow status.
	Status string `json:"status"`
}

InlineResponse2001Items struct for InlineResponse2001Items

type InlineResponse200Items

type InlineResponse200Items struct {
	// The name of the workflow.
	Name string `json:"name"`
	// The start of the aggregation window for workflow metrics.
	WindowStart time.Time `json:"window_start"`
	// The end of the aggregation window for workflow metrics.
	WindowEnd time.Time                `json:"window_end"`
	Metrics   InlineResponse200Metrics `json:"metrics"`
}

InlineResponse200Items struct for InlineResponse200Items

type InlineResponse200Metrics

type InlineResponse200Metrics struct {
	// The ratio of successful runs / total runs.
	SuccessRate float32 `json:"success_rate"`
	// The total number of runs.
	TotalRuns int64 `json:"total_runs"`
	// The number of failed runs.
	FailedRuns int64 `json:"failed_runs"`
	// The number of successful runs.
	SuccessfulRuns int64 `json:"successful_runs"`
	// The average number of workflow runs per day.
	Throughput float32 `json:"throughput"`
	// The mean time to recovery (mean time between failures and their next success) in seconds.
	Mttr int64 `json:"mttr"`
	// The total credits consumed by the workflow in the aggregation window.
	TotalCreditsUsed int64                                   `json:"total_credits_used"`
	DurationMetrics  InlineResponse200MetricsDurationMetrics `json:"duration_metrics"`
}

InlineResponse200Metrics Metrics relating to a workflow's runs.

type InlineResponse200MetricsDurationMetrics

type InlineResponse200MetricsDurationMetrics struct {
	// The minimum duration, in seconds, among a group of runs.
	Min int64 `json:"min"`
	// The mean duration, in seconds, among a group of runs.
	Mean int64 `json:"mean"`
	// The median duration, in seconds, among a group of runs.
	Median int64 `json:"median"`
	// The 95th percentile duration, in seconds, among a group of runs.
	P95 int64 `json:"p95"`
	// The max duration, in seconds, among a group of runs.
	Max int64 `json:"max"`
	// The standard deviation, in seconds, among a group of runs.
	StandardDeviation float32 `json:"standard_deviation"`
}

InlineResponse200MetricsDurationMetrics Metrics relating to the duration of runs for a workflow.

type InsightsApiService

type InsightsApiService service

InsightsApiService InsightsApi service

func (*InsightsApiService) GetProjectWorkflowMetrics

func (a *InsightsApiService) GetProjectWorkflowMetrics(ctx _context.Context, projectSlug string, localVarOptionals *GetProjectWorkflowMetricsOpts) (InlineResponse200, *_nethttp.Response, error)

GetProjectWorkflowMetrics Get summary metrics for a project's workflows Get summary metrics for a project's workflows. The past 250 workflow runs, going back at most 90 days, are included in the aggregations.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param optional nil or *GetProjectWorkflowMetricsOpts - Optional Parameters:
  • @param "PageToken" (optional.String) - A token to retrieve the next page of results.
  • @param "Branch" (optional.String) - The name of a vcs branch.

@return InlineResponse200

func (*InsightsApiService) GetProjectWorkflowRuns

func (a *InsightsApiService) GetProjectWorkflowRuns(ctx _context.Context, projectSlug string, workflowName string, localVarOptionals *GetProjectWorkflowRunsOpts) (InlineResponse2001, *_nethttp.Response, error)

GetProjectWorkflowRuns Get recent runs of a workflow Get recent runs of a workflow. The past 250 workflow runs, going back at most 90 days, are returned.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param workflowName The name of the workflow.
  • @param optional nil or *GetProjectWorkflowRunsOpts - Optional Parameters:
  • @param "Branch" (optional.String) - The name of a vcs branch.

@return InlineResponse2001

type Job

type Job struct {
	// The unique ID of the user.
	CanceledBy string `json:"canceled_by,omitempty"`
	// A sequence of the unique job IDs for the jobs that this job depends upon in the workflow.
	Dependencies []string `json:"dependencies"`
	// The number of the job.
	JobNumber int64 `json:"job_number"`
	// The unique ID of the job.
	Id string `json:"id"`
	// The date and time the job started.
	StartedAt time.Time `json:"started_at"`
	// The name of the job.
	Name string `json:"name"`
	// The unique ID of the user.
	ApprovedBy string `json:"approved_by,omitempty"`
	// The project-slug for the job.
	ProjectSlug string `json:"project_slug"`
	// The current status of the job.
	Status map[string]interface{} `json:"status"`
	// The type of job.
	Type string `json:"type"`
	// The time when the job stopped.
	StoppedAt time.Time `json:"stopped_at,omitempty"`
}

Job Job

type JobApiService

type JobApiService service

JobApiService JobApi service

func (*JobApiService) CancelJob

func (a *JobApiService) CancelJob(ctx _context.Context, jobNumber map[string]interface{}, projectSlug string) (MessageResponse, *_nethttp.Response, error)

CancelJob Cancel job Cancel job with a given job number.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param jobNumber The number of the job.
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return MessageResponse

func (*JobApiService) GetJobArtifacts

func (a *JobApiService) GetJobArtifacts(ctx _context.Context, jobNumber map[string]interface{}, projectSlug string) (ArtifactListResponse, *_nethttp.Response, error)

GetJobArtifacts Get a job's artifacts Returns a job's artifacts.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param jobNumber The number of the job.
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return ArtifactListResponse

func (*JobApiService) GetJobDetails

func (a *JobApiService) GetJobDetails(ctx _context.Context, jobNumber map[string]interface{}, projectSlug string) (JobDetails, *_nethttp.Response, error)

GetJobDetails Get job details Returns job details.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param jobNumber The number of the job.
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return JobDetails

func (*JobApiService) GetTests

func (a *JobApiService) GetTests(ctx _context.Context, jobNumber map[string]interface{}, projectSlug string) (TestsResponse, *_nethttp.Response, error)

GetTests Get test metadata Get test metadata for a build.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param jobNumber The number of the job.
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return TestsResponse

type JobDetails

type JobDetails struct {
	// URL of the job in CircleCI Web UI.
	WebUrl  string            `json:"web_url"`
	Project JobDetailsProject `json:"project"`
	// Info about parallels runs and their status.
	ParallelRuns []JobDetailsParallelRuns `json:"parallel_runs"`
	// The date and time the job started.
	StartedAt      time.Time                `json:"started_at"`
	LatestWorkflow JobDetailsLatestWorkflow `json:"latest_workflow"`
	// The name of the job.
	Name     string             `json:"name"`
	Executor JobDetailsExecutor `json:"executor"`
	// A number of parallel runs the job has.
	Parallelism int64 `json:"parallelism"`
	// The current status of the job.
	Status map[string]interface{} `json:"status"`
	// The number of the job.
	Number   int64              `json:"number"`
	Pipeline JobDetailsPipeline `json:"pipeline"`
	// Duration of a job in milliseconds.
	Duration int64 `json:"duration"`
	// The time when the job was created.
	CreatedAt time.Time `json:"created_at"`
	// Messages from CircleCI execution platform.
	Messages []JobDetailsMessages `json:"messages"`
	// List of contexts used by the job.
	Contexts     []JobDetailsContexts   `json:"contexts"`
	Organization JobDetailsOrganization `json:"organization"`
	// The time when the job was placed in a queue.
	QueuedAt time.Time `json:"queued_at"`
	// The time when the job stopped.
	StoppedAt time.Time `json:"stopped_at,omitempty"`
}

JobDetails Job Details

type JobDetailsContexts

type JobDetailsContexts struct {
	// The name of the context.
	Name string `json:"name"`
}

JobDetailsContexts Information about the context.

type JobDetailsExecutor

type JobDetailsExecutor struct {
	// Executor type.
	Type string `json:"type"`
	// Resource class name.
	ResourceClass string `json:"resource_class"`
}

JobDetailsExecutor Information about executor used for a job.

type JobDetailsLatestWorkflow

type JobDetailsLatestWorkflow struct {
	// The unique ID of the workflow.
	Id string `json:"id"`
	// The name of the workflow.
	Name string `json:"name"`
}

JobDetailsLatestWorkflow Info about the latest workflow the job was a part of.

type JobDetailsMessages

type JobDetailsMessages struct {
	// Message type.
	Type string `json:"type"`
	// Information describing message.
	Message string `json:"message"`
	// Value describing the reason for message to be added to the job.
	Reason string `json:"reason,omitempty"`
}

JobDetailsMessages Message from CircleCI execution platform.

type JobDetailsOrganization

type JobDetailsOrganization struct {
	// The name of the organization.
	Name string `json:"name"`
}

JobDetailsOrganization Information about an organization.

type JobDetailsParallelRuns

type JobDetailsParallelRuns struct {
	// Index of the parallel run.
	Index int64 `json:"index"`
	// Status of the parallel run.
	Status string `json:"status"`
}

JobDetailsParallelRuns Info about a status of the parallel run.

type JobDetailsPipeline

type JobDetailsPipeline struct {
	// The unique ID of the pipeline.
	Id string `json:"id"`
}

JobDetailsPipeline Info about a pipeline the job is a part of.

type JobDetailsProject

type JobDetailsProject struct {
	// Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
	Slug string `json:"slug"`
	// The name of the project
	Name string `json:"name"`
	// URL to the repository hosting the project's code
	ExternalUrl string `json:"external_url"`
}

JobDetailsProject Information about a project.

type ListMyPipelinesOpts

type ListMyPipelinesOpts struct {
	PageToken optional.String
}

ListMyPipelinesOpts Optional parameters for the method 'ListMyPipelines'

type ListPipelinesForProjectOpts

type ListPipelinesForProjectOpts struct {
	Branch    optional.String
	PageToken optional.String
}

ListPipelinesForProjectOpts Optional parameters for the method 'ListPipelinesForProject'

type ListWorkflowsByPipelineIdOpts

type ListWorkflowsByPipelineIdOpts struct {
	PageToken optional.String
}

ListWorkflowsByPipelineIdOpts Optional parameters for the method 'ListWorkflowsByPipelineId'

type MessageResponse

type MessageResponse struct {
	// A human-readable message
	Message string `json:"message"`
}

MessageResponse message response

type Pipeline

type Pipeline struct {
	// The unique ID of the pipeline.
	Id string `json:"id"`
	// A sequence of errors that have occurred within the pipeline.
	Errors []PipelineErrors `json:"errors"`
	// The project-slug for the pipeline.
	ProjectSlug string `json:"project_slug"`
	// The date and time the pipeline was last updated.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// The number of the pipeline.
	Number int64 `json:"number"`
	// The current state of the pipeline.
	State string `json:"state"`
	// The date and time the pipeline was created.
	CreatedAt time.Time       `json:"created_at"`
	Trigger   PipelineTrigger `json:"trigger"`
	Vcs       PipelineVcs     `json:"vcs,omitempty"`
}

Pipeline NOTE: The definition of pipeline is subject to change.

type PipelineApiService

type PipelineApiService service

PipelineApiService PipelineApi service

func (*PipelineApiService) GetPipelineById

func (a *PipelineApiService) GetPipelineById(ctx _context.Context, pipelineId string) (Pipeline, *_nethttp.Response, error)

GetPipelineById Get a pipeline Returns a pipeline by ID.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param pipelineId The unique ID of the pipeline.

@return Pipeline

func (*PipelineApiService) GetPipelineByNumber

func (a *PipelineApiService) GetPipelineByNumber(ctx _context.Context, projectSlug string, pipelineNumber map[string]interface{}) (Pipeline, *_nethttp.Response, error)

GetPipelineByNumber Get a pipeline Returns a pipeline by number.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param pipelineNumber The number of the pipeline.

@return Pipeline

func (*PipelineApiService) GetPipelineConfigById

func (a *PipelineApiService) GetPipelineConfigById(ctx _context.Context, pipelineId string) (PipelineConfig, *_nethttp.Response, error)

GetPipelineConfigById Get a pipeline's configuration Returns a pipeline's configuration by ID.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param pipelineId The unique ID of the pipeline.

@return PipelineConfig

func (*PipelineApiService) ListMyPipelines

func (a *PipelineApiService) ListMyPipelines(ctx _context.Context, projectSlug string, localVarOptionals *ListMyPipelinesOpts) (PipelineListResponse, *_nethttp.Response, error)

ListMyPipelines Get your pipelines Returns a sequence of all pipelines for this project triggered by the user.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param optional nil or *ListMyPipelinesOpts - Optional Parameters:
  • @param "PageToken" (optional.String) - A token to retrieve the next page of results.

@return PipelineListResponse

func (*PipelineApiService) ListPipelinesForProject

func (a *PipelineApiService) ListPipelinesForProject(ctx _context.Context, projectSlug string, localVarOptionals *ListPipelinesForProjectOpts) (PipelineListResponse, *_nethttp.Response, error)

ListPipelinesForProject Get all pipelines Returns all pipelines for this project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param optional nil or *ListPipelinesForProjectOpts - Optional Parameters:
  • @param "Branch" (optional.String) - The name of a vcs branch.
  • @param "PageToken" (optional.String) - A token to retrieve the next page of results.

@return PipelineListResponse

func (*PipelineApiService) ListWorkflowsByPipelineId

func (a *PipelineApiService) ListWorkflowsByPipelineId(ctx _context.Context, pipelineId string, localVarOptionals *ListWorkflowsByPipelineIdOpts) (WorkflowListResponse, *_nethttp.Response, error)

ListWorkflowsByPipelineId Get a pipeline's workflows Returns a paginated list of workflows by pipeline ID.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param pipelineId The unique ID of the pipeline.
  • @param optional nil or *ListWorkflowsByPipelineIdOpts - Optional Parameters:
  • @param "PageToken" (optional.String) - A token to retrieve the next page of results.

@return WorkflowListResponse

func (*PipelineApiService) TriggerPipeline

func (a *PipelineApiService) TriggerPipeline(ctx _context.Context, projectSlug string, localVarOptionals *TriggerPipelineOpts) (PipelineLight, *_nethttp.Response, error)

TriggerPipeline Trigger a new pipeline Triggers a new pipeline on the project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param optional nil or *TriggerPipelineOpts - Optional Parameters:
  • @param "XAttributionLogin" (optional.String) - The login or user-readable identifier for the pipeline's triggerer.
  • @param "XAttributionActorId" (optional.String) - The id the integration uses to identify the pipeline's triggerer.
  • @param "TriggerPipelineParameters" (optional.Interface of TriggerPipelineParameters) -

@return PipelineLight

type PipelineConfig

type PipelineConfig struct {
	// The source configuration for the pipeline, before any config compilation has been performed. If there is no config, then this field will be empty.
	Source string `json:"source"`
	// The compiled configuration for the pipeline, after all orb expansion has been performed. If there were errors processing the pipeline's configuration, then this field may be empty.
	Compiled string `json:"compiled"`
}

PipelineConfig The configuration strings for the pipeline.

type PipelineErrors

type PipelineErrors struct {
	// The type of error.
	Type string `json:"type"`
	// A human-readable error message.
	Message string `json:"message"`
}

PipelineErrors An error with a type and message.

type PipelineLight

type PipelineLight struct {
	// The unique ID of the pipeline.
	Id string `json:"id"`
	// The current state of the pipeline.
	State string `json:"state"`
	// The number of the pipeline.
	Number int64 `json:"number"`
	// The date and time the pipeline was created.
	CreatedAt time.Time `json:"created_at"`
}

PipelineLight NOTE: The definition of pipeline is subject to change.

type PipelineListResponse

type PipelineListResponse struct {
	Items []Pipeline `json:"items"`
	// A token to pass as a `page-token` query parameter to return the next page of results.
	NextPageToken string `json:"next_page_token"`
}

PipelineListResponse List of pipelines

type PipelineTrigger

type PipelineTrigger struct {
	// The type of trigger.
	Type string `json:"type"`
	// The date and time the trigger was received.
	ReceivedAt time.Time            `json:"received_at"`
	Actor      PipelineTriggerActor `json:"actor"`
}

PipelineTrigger A summary of the trigger.

type PipelineTriggerActor

type PipelineTriggerActor struct {
	// The login information for the user on the VCS.
	Login string `json:"login"`
	// URL to the user's avatar on the VCS
	AvatarUrl string `json:"avatar_url"`
}

PipelineTriggerActor The user who triggered the Pipeline.

type PipelineVcs

type PipelineVcs struct {
	// Name of the VCS provider (e.g. GitHub, Bitbucket).
	ProviderName string `json:"provider_name"`
	// URL for the repository where the trigger originated. For fork-PR pipelines, this is the URL to the fork. For other pipelines the `origin_` and `target_repository_url`s will be the same.
	OriginRepositoryUrl string `json:"origin_repository_url"`
	// URL for the repository the trigger targets (i.e. the repository where the PR will be merged). For fork-PR pipelines, this is the URL to the parent repo. For other pipelines, the `origin_` and `target_repository_url`s will be the same.
	TargetRepositoryUrl string `json:"target_repository_url"`
	// The code revision the pipeline ran.
	Revision string `json:"revision"`
	// The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that `branch` and `tag` are mutually exclusive.
	Branch string `json:"branch,omitempty"`
	// The tag used by the pipeline. The commit that this tag points to was used for the pipeline. Note that `branch` and `tag` are mutually exclusive.
	Tag    string            `json:"tag,omitempty"`
	Commit PipelineVcsCommit `json:"commit,omitempty"`
}

PipelineVcs VCS information for the pipeline.

type PipelineVcsCommit

type PipelineVcsCommit struct {
	// The subject of the commit message.
	Subject string `json:"subject"`
	// The body of the commit message.
	Body string `json:"body"`
}

PipelineVcsCommit The latest commit in the pipeline.

type PreviewApiService

type PreviewApiService service

PreviewApiService PreviewApi service

func (*PreviewApiService) CancelJob

func (a *PreviewApiService) CancelJob(ctx _context.Context, jobNumber map[string]interface{}, projectSlug string) (MessageResponse, *_nethttp.Response, error)

CancelJob Cancel job Cancel job with a given job number.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param jobNumber The number of the job.
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return MessageResponse

func (*PreviewApiService) CreateCheckoutKey

func (a *PreviewApiService) CreateCheckoutKey(ctx _context.Context, projectSlug string, localVarOptionals *CreateCheckoutKeyOpts) (CheckoutKey, *_nethttp.Response, error)

CreateCheckoutKey Create a new checkout key Creates a new checkout key. This API request is only usable with a user API token.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param optional nil or *CreateCheckoutKeyOpts - Optional Parameters:
  • @param "CheckoutKeyInput" (optional.Interface of CheckoutKeyInput) -

@return CheckoutKey

func (*PreviewApiService) CreateEnvVar

func (a *PreviewApiService) CreateEnvVar(ctx _context.Context, projectSlug string, localVarOptionals *CreateEnvVarOpts) (EnvironmentVariablePair, *_nethttp.Response, error)

CreateEnvVar Create an environment variable Creates a new environment variable.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param optional nil or *CreateEnvVarOpts - Optional Parameters:
  • @param "EnvironmentVariablePair1" (optional.Interface of EnvironmentVariablePair1) -

@return EnvironmentVariablePair

func (*PreviewApiService) DeleteCheckoutKey

func (a *PreviewApiService) DeleteCheckoutKey(ctx _context.Context, projectSlug string, fingerprint string) (MessageResponse, *_nethttp.Response, error)

DeleteCheckoutKey Delete a checkout key Deletes the checkout key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param fingerprint An SSH key fingerprint.

@return MessageResponse

func (*PreviewApiService) DeleteEnvVar

func (a *PreviewApiService) DeleteEnvVar(ctx _context.Context, projectSlug string, name string) (MessageResponse, *_nethttp.Response, error)

DeleteEnvVar Delete an environment variable Deletes the environment variable named :name.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param name The name of the environment variable.

@return MessageResponse

func (*PreviewApiService) GetCheckoutKey

func (a *PreviewApiService) GetCheckoutKey(ctx _context.Context, projectSlug string, fingerprint string) (CheckoutKey, *_nethttp.Response, error)

GetCheckoutKey Get a checkout key Returns an individual checkout key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param fingerprint An SSH key fingerprint.

@return CheckoutKey

func (*PreviewApiService) GetCollaborations

func (a *PreviewApiService) GetCollaborations(ctx _context.Context) ([]Collaboration, *_nethttp.Response, error)

GetCollaborations Collaborations Provides the set of organizations of which a user is a member or a collaborator. The set of organizations that a user can collaborate on is composed of: * Organizations that the current user belongs to across VCS types (e.g. BitBucket, GitHub) * The parent organization of repository that the user can collaborate on, but is not necessarily a member of * The organization of the current user's account

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Collaboration

func (*PreviewApiService) GetCurrentUser

func (a *PreviewApiService) GetCurrentUser(ctx _context.Context) (User, *_nethttp.Response, error)

GetCurrentUser User Information Provides information about the user that is currently signed in.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return User

func (*PreviewApiService) GetEnvVar

func (a *PreviewApiService) GetEnvVar(ctx _context.Context, projectSlug string, name string) (EnvironmentVariablePair, *_nethttp.Response, error)

GetEnvVar Get a masked environment variable Returns the masked value of environment variable :name.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param name The name of the environment variable.

@return EnvironmentVariablePair

func (*PreviewApiService) GetJobArtifacts

func (a *PreviewApiService) GetJobArtifacts(ctx _context.Context, jobNumber map[string]interface{}, projectSlug string) (ArtifactListResponse, *_nethttp.Response, error)

GetJobArtifacts Get a job's artifacts Returns a job's artifacts.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param jobNumber The number of the job.
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return ArtifactListResponse

func (*PreviewApiService) GetJobDetails

func (a *PreviewApiService) GetJobDetails(ctx _context.Context, jobNumber map[string]interface{}, projectSlug string) (JobDetails, *_nethttp.Response, error)

GetJobDetails Get job details Returns job details.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param jobNumber The number of the job.
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return JobDetails

func (*PreviewApiService) GetProjectBySlug

func (a *PreviewApiService) GetProjectBySlug(ctx _context.Context, projectSlug string) (Project, *_nethttp.Response, error)

GetProjectBySlug Get a project Retrieves a project by project slug.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return Project

func (*PreviewApiService) GetProjectWorkflowMetrics

func (a *PreviewApiService) GetProjectWorkflowMetrics(ctx _context.Context, projectSlug string, localVarOptionals *GetProjectWorkflowMetricsOpts) (InlineResponse200, *_nethttp.Response, error)

GetProjectWorkflowMetrics Get summary metrics for a project's workflows Get summary metrics for a project's workflows. The past 250 workflow runs, going back at most 90 days, are included in the aggregations.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param optional nil or *GetProjectWorkflowMetricsOpts - Optional Parameters:
  • @param "PageToken" (optional.String) - A token to retrieve the next page of results.
  • @param "Branch" (optional.String) - The name of a vcs branch.

@return InlineResponse200

func (*PreviewApiService) GetProjectWorkflowRuns

func (a *PreviewApiService) GetProjectWorkflowRuns(ctx _context.Context, projectSlug string, workflowName string, localVarOptionals *GetProjectWorkflowRunsOpts) (InlineResponse2001, *_nethttp.Response, error)

GetProjectWorkflowRuns Get recent runs of a workflow Get recent runs of a workflow. The past 250 workflow runs, going back at most 90 days, are returned.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param workflowName The name of the workflow.
  • @param optional nil or *GetProjectWorkflowRunsOpts - Optional Parameters:
  • @param "Branch" (optional.String) - The name of a vcs branch.

@return InlineResponse2001

func (*PreviewApiService) GetTests

func (a *PreviewApiService) GetTests(ctx _context.Context, jobNumber map[string]interface{}, projectSlug string) (TestsResponse, *_nethttp.Response, error)

GetTests Get test metadata Get test metadata for a build.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param jobNumber The number of the job.
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return TestsResponse

func (*PreviewApiService) GetUser

GetUser User Information Provides information about the user with the given ID.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The unique ID of the user.

@return User

func (*PreviewApiService) ListCheckoutKeys

func (a *PreviewApiService) ListCheckoutKeys(ctx _context.Context, projectSlug string) (CheckoutKeyListResponse, *_nethttp.Response, error)

ListCheckoutKeys Get all checkout keys Returns a sequence of checkout keys for `:project`.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return CheckoutKeyListResponse

func (*PreviewApiService) ListEnvVars

ListEnvVars List all environment variables Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return EnvironmentVariableListResponse

type Project

type Project struct {
	// Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
	Slug string `json:"slug"`
	// The name of the project
	Name string `json:"name"`
	// The name of the organization the project belongs to
	OrganizationName string         `json:"organization_name"`
	VcsInfo          ProjectVcsInfo `json:"vcs_info"`
}

Project NOTE: The definition of Project is subject to change.

type ProjectApiService

type ProjectApiService service

ProjectApiService ProjectApi service

func (*ProjectApiService) CreateCheckoutKey

func (a *ProjectApiService) CreateCheckoutKey(ctx _context.Context, projectSlug string, localVarOptionals *CreateCheckoutKeyOpts) (CheckoutKey, *_nethttp.Response, error)

CreateCheckoutKey Create a new checkout key Creates a new checkout key. This API request is only usable with a user API token.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param optional nil or *CreateCheckoutKeyOpts - Optional Parameters:
  • @param "CheckoutKeyInput" (optional.Interface of CheckoutKeyInput) -

@return CheckoutKey

func (*ProjectApiService) CreateEnvVar

func (a *ProjectApiService) CreateEnvVar(ctx _context.Context, projectSlug string, localVarOptionals *CreateEnvVarOpts) (EnvironmentVariablePair, *_nethttp.Response, error)

CreateEnvVar Create an environment variable Creates a new environment variable.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param optional nil or *CreateEnvVarOpts - Optional Parameters:
  • @param "EnvironmentVariablePair1" (optional.Interface of EnvironmentVariablePair1) -

@return EnvironmentVariablePair

func (*ProjectApiService) DeleteCheckoutKey

func (a *ProjectApiService) DeleteCheckoutKey(ctx _context.Context, projectSlug string, fingerprint string) (MessageResponse, *_nethttp.Response, error)

DeleteCheckoutKey Delete a checkout key Deletes the checkout key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param fingerprint An SSH key fingerprint.

@return MessageResponse

func (*ProjectApiService) DeleteEnvVar

func (a *ProjectApiService) DeleteEnvVar(ctx _context.Context, projectSlug string, name string) (MessageResponse, *_nethttp.Response, error)

DeleteEnvVar Delete an environment variable Deletes the environment variable named :name.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param name The name of the environment variable.

@return MessageResponse

func (*ProjectApiService) GetCheckoutKey

func (a *ProjectApiService) GetCheckoutKey(ctx _context.Context, projectSlug string, fingerprint string) (CheckoutKey, *_nethttp.Response, error)

GetCheckoutKey Get a checkout key Returns an individual checkout key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param fingerprint An SSH key fingerprint.

@return CheckoutKey

func (*ProjectApiService) GetEnvVar

func (a *ProjectApiService) GetEnvVar(ctx _context.Context, projectSlug string, name string) (EnvironmentVariablePair, *_nethttp.Response, error)

GetEnvVar Get a masked environment variable Returns the masked value of environment variable :name.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.
  • @param name The name of the environment variable.

@return EnvironmentVariablePair

func (*ProjectApiService) GetProjectBySlug

func (a *ProjectApiService) GetProjectBySlug(ctx _context.Context, projectSlug string) (Project, *_nethttp.Response, error)

GetProjectBySlug Get a project Retrieves a project by project slug.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return Project

func (*ProjectApiService) ListCheckoutKeys

func (a *ProjectApiService) ListCheckoutKeys(ctx _context.Context, projectSlug string) (CheckoutKeyListResponse, *_nethttp.Response, error)

ListCheckoutKeys Get all checkout keys Returns a sequence of checkout keys for `:project`.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return CheckoutKeyListResponse

func (*ProjectApiService) ListEnvVars

ListEnvVars List all environment variables Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.

@return EnvironmentVariableListResponse

type ProjectVcsInfo

type ProjectVcsInfo struct {
	// URL to the repository hosting the project's code
	VcsUrl string `json:"vcs_url"`
	// The VCS provider
	Provider      string `json:"provider"`
	DefaultBranch string `json:"default_branch"`
}

ProjectVcsInfo Information about the VCS that hosts the project source code.

type RerunWorkflowOpts

type RerunWorkflowOpts struct {
	RerunWorkflowParameters optional.Interface
}

RerunWorkflowOpts Optional parameters for the method 'RerunWorkflow'

type RerunWorkflowParameters

type RerunWorkflowParameters struct {
	// A list of job IDs to rerun.
	Jobs []string `json:"jobs,omitempty"`
	// Whether to rerun the workflow from the failed job. Mutually exclusive with the jobs parameter.
	FromFailed bool `json:"from_failed,omitempty"`
}

RerunWorkflowParameters The information you can supply when rerunning a workflow.

type ServerConfiguration

type ServerConfiguration struct {
	Url         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type TestsResponse

type TestsResponse struct {
	Items []TestsResponseItems `json:"items"`
	// A token to pass as a `page-token` query parameter to return the next page of results.
	NextPageToken string `json:"next_page_token"`
}

TestsResponse struct for TestsResponse

type TestsResponseItems

type TestsResponseItems struct {
	// The failure message associated with the test.
	Message string `json:"message"`
	// The file in which the test is defined.
	File string `json:"file"`
	// Indication of whether the test succeeded.
	Result string `json:"result"`
	// The name of the test.
	Name string `json:"name"`
	// The programmatic location of the test.
	Classname string `json:"classname"`
}

TestsResponseItems struct for TestsResponseItems

type TriggerPipelineOpts

type TriggerPipelineOpts struct {
	XAttributionLogin         optional.String
	XAttributionActorId       optional.String
	TriggerPipelineParameters optional.Interface
}

TriggerPipelineOpts Optional parameters for the method 'TriggerPipeline'

type TriggerPipelineParameters

type TriggerPipelineParameters struct {
	// The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that `branch` and `tag` are mutually exclusive.
	Branch string `json:"branch,omitempty"`
	// The tag used by the pipeline. The commit that this tag points to was used for the pipeline. Note that `branch` and `tag` are mutually exclusive.
	Tag string `json:"tag,omitempty"`
	// An object containing pipeline parameters and their values.
	Parameters map[string]interface{} `json:"parameters,omitempty"`
}

TriggerPipelineParameters The information you can supply when triggering a pipeline.

type User

type User struct {
	// The unique ID of the user.
	Id string `json:"id"`
	// The login information for the user on the VCS.
	Login string `json:"login"`
	// The name of the user.
	Name string `json:"name"`
}

User struct for User

type UserApiService

type UserApiService service

UserApiService UserApi service

func (*UserApiService) GetCollaborations

func (a *UserApiService) GetCollaborations(ctx _context.Context) ([]Collaboration, *_nethttp.Response, error)

GetCollaborations Collaborations Provides the set of organizations of which a user is a member or a collaborator. The set of organizations that a user can collaborate on is composed of: * Organizations that the current user belongs to across VCS types (e.g. BitBucket, GitHub) * The parent organization of repository that the user can collaborate on, but is not necessarily a member of * The organization of the current user's account

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Collaboration

func (*UserApiService) GetCurrentUser

func (a *UserApiService) GetCurrentUser(ctx _context.Context) (User, *_nethttp.Response, error)

GetCurrentUser User Information Provides information about the user that is currently signed in.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return User

func (*UserApiService) GetUser

func (a *UserApiService) GetUser(ctx _context.Context, id string) (User, *_nethttp.Response, error)

GetUser User Information Provides information about the user with the given ID.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The unique ID of the user.

@return User

type Workflow

type Workflow struct {
	// The unique ID of the workflow.
	Id string `json:"id"`
	// The name of the workflow.
	Name string `json:"name"`
	// The current status of the workflow.
	Status string `json:"status"`
	// The date and time the workflow was created.
	CreatedAt time.Time `json:"created_at"`
	// The date and time the workflow stopped.
	StoppedAt time.Time `json:"stopped_at"`
	// The ID of the pipeline this workflow belongs to.
	PipelineId string `json:"pipeline_id"`
	// The number of the pipeline this workflow belongs to.
	PipelineNumber int64 `json:"pipeline_number"`
	// The project-slug for the pipeline this workflow belongs to.
	ProjectSlug string `json:"project_slug"`
}

Workflow A workflow

type WorkflowApiService

type WorkflowApiService service

WorkflowApiService WorkflowApi service

func (*WorkflowApiService) CancelWorkflow

CancelWorkflow Cancel a workflow Cancels a running workflow.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The unique ID of the workflow.

@return MessageResponse

func (*WorkflowApiService) GetWorkflowById

func (a *WorkflowApiService) GetWorkflowById(ctx _context.Context, id string) (Workflow, *_nethttp.Response, error)

GetWorkflowById Get a workflow Returns summary fields of a workflow by ID.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The unique ID of the workflow.

@return Workflow

func (*WorkflowApiService) ListWorkflowJobs

ListWorkflowJobs Get a workflow's jobs Returns a sequence of jobs for a workflow.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The unique ID of the workflow.

@return WorkflowJobListResponse

func (*WorkflowApiService) RerunWorkflow

func (a *WorkflowApiService) RerunWorkflow(ctx _context.Context, id string, localVarOptionals *RerunWorkflowOpts) (MessageResponse, *_nethttp.Response, error)

RerunWorkflow Rerun a workflow Reruns a workflow.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The unique ID of the workflow.
  • @param optional nil or *RerunWorkflowOpts - Optional Parameters:
  • @param "RerunWorkflowParameters" (optional.Interface of RerunWorkflowParameters) -

@return MessageResponse

type WorkflowJobListResponse

type WorkflowJobListResponse struct {
	Items []Job `json:"items"`
	// A token to pass as a `page-token` query parameter to return the next page of results.
	NextPageToken string `json:"next_page_token"`
}

WorkflowJobListResponse struct for WorkflowJobListResponse

type WorkflowListResponse

type WorkflowListResponse struct {
	// A list of workflows.
	Items []Workflow `json:"items"`
	// A token to pass as a `page-token` query parameter to return the next page of results.
	NextPageToken string `json:"next_page_token"`
}

WorkflowListResponse A list of workflows and associated pagination token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL