v1

package
v0.0.0-...-a7585ca Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package v1 provides the CircleCI v1.1 API.

Index

Constants

View Source
const (
	// APIVersion CircleCI REST API version.
	APIVersion = "v1.1"

	// UserAgent is the default of user-agent.
	UserAgent = "ccictl/" + APIVersion
)

Variables

This section is empty.

Functions

func SchemaDescriptor

func SchemaDescriptor() (interface{}, error)

SchemaDescriptor returns the Schema file descriptor which is generated code to this file.

Types

type API

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

API represents a CircleCI v1.1 API.

func NewAPI

func NewAPI(s *Service) *API

NewAPI returns the new API.

func (*API) AddHerokuKey

func (r *API) AddHerokuKey() *AddHerokuKeyCall

AddHerokuKey adds your Heroku API key to CircleCI, takes apikey as form param name.

func (*API) Build

func (r *API) Build(username, project string) *BuildCall

Build returns the build summary for each of the last 30 builds for a single git repo.

func (*API) BuildDetail

func (r *API) BuildDetail(username, project string, buildNum int) *BuildDetailCall

BuildDetail full details for a single build. The response includes all of the fields from the build summary.

This is also the payload for the notification webhooks, in which case this object is the value to a key named 'payload'.

func (*API) CancelBuild

func (r *API) CancelBuild(username, project string, buildNum int) *CancelBuildCall

CancelBuild cancels the build, returns a summary of the build.

func (*API) CheckoutKey

func (r *API) CheckoutKey(username, project, fingerprint string) *CheckoutKeyCall

CheckoutKey get a checkout key.

func (*API) CreateCheckoutKey

func (r *API) CreateCheckoutKey(username, project string) *CreateCheckoutKeyCall

CreateCheckoutKey creates a new checkout key.

Only usable with a user API token.

func (*API) CreateProjectEnvVar

func (r *API) CreateProjectEnvVar(username, project string) *CreateProjectEnvVarCall

CreateProjectEnvVar creates a new environment variable.

func (*API) CreateSSHKey

func (r *API) CreateSSHKey(username, project string, sshKey SSHKey) *CreateSSHKeyCall

CreateSSHKey create an ssh key used to access external systems that require SSH key-based authentication.

func (*API) DeleteBuildCache

func (r *API) DeleteBuildCache(username, project string) *DeleteBuildCacheCall

DeleteBuildCache clears the cache for a project.

func (*API) DeleteCheckoutKey

func (r *API) DeleteCheckoutKey(username, project, fingerprint string) *DeleteCheckoutKeyCall

DeleteCheckoutKey delete a checkout key.

func (*API) DeleteEnvVar

func (r *API) DeleteEnvVar(username, project, name string) *DeleteEnvVarCall

DeleteEnvVar deletes the environment variable named.

func (*API) HiddenEnvVar

func (r *API) HiddenEnvVar(username, project, name string) *HiddenEnvVarCall

HiddenEnvVar gets the hidden value of environment variable.

func (*API) ListArtifacts

func (r *API) ListArtifacts(username, project string, buildNum int) *ListArtifactsCall

ListArtifacts list the artifacts produced by a given build.

func (*API) ListCheckoutKey

func (r *API) ListCheckoutKey(username, project string) *ListCheckoutKeyCall

ListCheckoutKey lists checkout keys.

func (*API) ListProject

func (r *API) ListProject() *ListProjectCall

ListProject list of all the projects you're following on CircleCI, with build information organized by branch.

func (*API) ListProjectEnvVars

func (r *API) ListProjectEnvVars(username, project string) *ListProjectEnvVarsCall

ListProjectEnvVars lists the environment variables for project.

func (*API) Me

func (r *API) Me() *MeCall

Me returns the information about the signed in user.

func (*API) RecentBuilds

func (r *API) RecentBuilds() *RecentBuildsCall

RecentBuilds build summary for each of the last 30 recent builds, ordered by build_num.

func (*API) RetryBuild

func (r *API) RetryBuild(username, project string, buildNum int) *RetryBuildCall

RetryBuild retries the build, returns a summary of the new build.

func (*API) TestMetadata

func (r *API) TestMetadata(username, project string, buildNum int) *TestMetadataCall

TestMetadata provides test metadata for a build.

func (*API) TriggerBuildAndSummary

func (r *API) TriggerBuildAndSummary(username, project string, trigger *TriggerBuildSummary) *TriggerBuildAndSummaryCall

TriggerBuildAndSummary triggers a new build, and returns the summary of the build.

func (*API) TriggerNewBuild

func (r *API) TriggerNewBuild(username, project, branch string) *TriggerNewBuildCall

TriggerNewBuild triggers a new build, returns a summary of the build.

type AddHerokuKeyCall

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

AddHerokuKeyCall represents a adds your Heroku API key to CircleCI, takes apikey as form param name.

func (*AddHerokuKeyCall) Context

Context sets context.

func (*AddHerokuKeyCall) Do

func (c *AddHerokuKeyCall) Do() (*Response, error)

Do executes the AddHerokuKey.

type Artifact

type Artifact struct {
	NodeIndex  int32  `json:"node_index,omitempty"`
	Path       string `json:"path,omitempty"`
	PrettyPath string `json:"pretty_path,omitempty"`
	URL        string `json:"url,omitempty"`
}

Artifact represents a Artifact.

type Build

type Build struct {
	AllCommitDetails          []*CommitDetail        `json:"all_commit_details"`
	AllCommitDetailsTruncated bool                   `json:"all_commit_details_truncated"`
	AuthorDate                time.Time              `json:"author_date"`
	AuthorEmail               string                 `json:"author_email"`
	AuthorName                string                 `json:"author_name"`
	Body                      string                 `json:"body,omitempty"`
	Branch                    string                 `json:"branch"`
	BuildNumber               int                    `json:"build_num"`
	BuildParameters           map[string]interface{} `json:"build_parameters,omitempty"`
	BuildTimeMillis           int32                  `json:"build_time_millis"`
	BuildURL                  string                 `json:"build_url"`
	Canceled                  bool                   `json:"canceled"`
	Canceler                  string                 `json:"canceler,omitempty"`
	CircleYAML                string                 `json:"circle_yml,omitempty"`
	CommitterDate             time.Time              `json:"committer_date"`
	CommitterEmail            string                 `json:"committer_email"`
	CommitterName             string                 `json:"committer_name"`
	Compare                   string                 `json:"compare,omitempty"`
	ContextIDs                []string               `json:"context_ids,omitempty"`
	DontBuild                 string                 `json:"dont_build,omitempty"`
	Failed                    bool                   `json:"failed"`
	FailReason                string                 `json:"fail_reason,omitempty"`
	HasArtifacts              bool                   `json:"has_artifacts"`
	InfrastructureFail        bool                   `json:"infrastructure_fail"`
	IsFirstGreenBuild         bool                   `json:"is_first_green_build"`
	JobName                   string                 `json:"job_name,omitempty"`
	Lifecycle                 Lifecycle              `json:"lifecycle"`
	Message                   string                 `json:"message,omitempty"`
	Node                      string                 `json:"node,omitempty"`
	NoDependencyCache         bool                   `json:"no_dependency_cache"`
	Organization              string                 `json:"username"`
	OSS                       bool                   `json:"oss"`
	Outcome                   Outcome                `json:"outcome,omitempty"`
	Parallel                  int32                  `json:"parallel,omitempty"`
	Picard                    string                 `json:"picard,omitempty"`
	Platform                  string                 `json:"platform"`
	PreviousBuild             *PreviousBuild         `json:"previous"`
	PreviousSuccessfulBuild   bool                   `json:"previous_successful_build"`
	QueuedAt                  time.Time              `json:"queued_at"`
	RepoName                  string                 `json:"reponame"`
	Retries                   string                 `json:"retries,omitempty"`
	RetryOf                   int32                  `json:"retry_of"`
	SSHDisable                bool                   `json:"ssh_disabled"`
	SSHUesrs                  []string               `json:"ssh_uesrs,omitempty"`
	StartTime                 time.Time              `json:"start_time"`
	Status                    string                 `json:"status,omitempty"`
	StopTime                  time.Time              `json:"stop_time"`
	Subject                   string                 `json:"subject"`
	Timedout                  bool                   `json:"timedout"`
	UsageQueuedAt             time.Time              `json:"usage_queued_at,omitempty"`
	User                      *BuildUser             `json:"user,omitempty"`
	VCSRevision               string                 `json:"vcs_revision,omitempty"`
	VCSTag                    string                 `json:"vcs_tag,omitempty"`
	VCSType                   string                 `json:"vcs_type"`
	VCSURL                    string                 `json:"vcs_url"`
	Why                       string                 `json:"why"`
	Workflows                 *Workflows             `json:"workflows"`
}

Build represents a Build.

type BuildCall

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

BuildCall represents a build summary for each of the last 30 builds for a single git repo.

func (*BuildCall) Context

func (c *BuildCall) Context(ctx context.Context) *BuildCall

Context sets context.

func (*BuildCall) Do

func (c *BuildCall) Do() (*Build, error)

Do executes the Build.

func (*BuildCall) Filter

func (c *BuildCall) Filter(filter string) *BuildCall

Filter sets filter.

func (*BuildCall) Limit

func (c *BuildCall) Limit(limit int) *BuildCall

Limit sets limit.

func (*BuildCall) Offset

func (c *BuildCall) Offset(offset int) *BuildCall

Offset sets offset.

type BuildDetail

type BuildDetail struct {
	AllCommitDetails        []*CommitDetail `json:"all_commit_details,omitempty"`
	JobName                 string          `json:"job_name,omitempty"`
	PreviousSuccessfulBuild *PreviousBuild  `json:"previous_successful_build,omitempty"`
	UsageQueuedAt           time.Time       `json:"usage_queued_at,omitempty"`
	User                    *User           `json:"user,omitempty"`
}

BuildDetail previous build

type BuildDetailCall

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

BuildDetailCall represents a full details for a single build. The response includes all of the fields from the build summary.

func (*BuildDetailCall) Context

Context sets context.

func (*BuildDetailCall) Do

func (c *BuildDetailCall) Do() (*BuildDetail, error)

Do executes the BuildDetail.

type BuildSummary

type BuildSummary struct {
	AddedAt     time.Time `json:"added_at,omitempty"`
	BuildNum    int32     `json:"build_num,omitempty"`
	Outcome     Outcome   `json:"outcome,omitempty"`
	PushedAt    time.Time `json:"pushed_at,omitempty"`
	Status      *Status   `json:"status,omitempty"`
	VCSRevision string    `json:"vcs_revision,omitempty"`
}

BuildSummary represents a BuildSummary.

type BuildUser

type BuildUser struct {
	AvatarURL string `json:"avatar_url"`
	ID        int32  `json:"id"`
	IsUser    bool   `json:"is_user"`
	Login     string `json:"login"`
	Name      string `json:"name"`
	VCSType   string `json:"vcs_type"`
}

type CancelBuildCall

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

CancelBuildCall represents a cancels the build, returns a summary of the build.

func (*CancelBuildCall) Context

Context sets context.

func (*CancelBuildCall) Do

func (c *CancelBuildCall) Do() (*Build, error)

Do executes the CancelBuild.

type CheckoutKey

type CheckoutKey struct {
	Fingerprint string `json:"fingerprint,omitempty"`
	Preferred   bool   `json:"preferred,omitempty"`
	PublicKey   string `json:"public_key,omitempty"`
	// when the key was issued
	Time time.Time `json:"time,omitempty"`
	// can be "deploy-key" or "github-user-key"
	Type string `json:"type,omitempty"`
}

CheckoutKey represents a CheckoutKey.

type CheckoutKeyCall

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

CheckoutKeyCall represents a get a checkout key.

func (*CheckoutKeyCall) Context

Context sets context.

func (*CheckoutKeyCall) Do

func (c *CheckoutKeyCall) Do() (*CheckoutKey, error)

Do executes the CheckoutKey.

type CommitDetail

type CommitDetail struct {
	AuthorDate     time.Time `json:"author_date,omitempty"`
	AuthorEmail    string    `json:"author_email,omitempty"`
	AuthorLogin    string    `json:"author_login,omitempty"`
	AuthorName     string    `json:"author_name,omitempty"`
	Body           string    `json:"body,omitempty"`
	Commit         string    `json:"commit,omitempty"`
	CommitURL      string    `json:"commit_url,omitempty"`
	CommitterDate  time.Time `json:"committer_date,omitempty"`
	CommitterEmail string    `json:"committer_email,omitempty"`
	CommitterLogin string    `json:"committer_login,omitempty"`
	CommitterName  string    `json:"committer_name,omitempty"`
	Subject        string    `json:"subject,omitempty"`
}

CommitDetail represents a CommitDetail.

type CreateCheckoutKeyCall

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

CreateCheckoutKeyCall represents a creates a new checkout key.

func (*CreateCheckoutKeyCall) Context

Context sets context.

func (*CreateCheckoutKeyCall) Do

Do executes the CreateCheckoutKey.

type CreateProjectEnvVarCall

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

CreateProjectEnvVarCall represents a creates a new environment variable.

func (*CreateProjectEnvVarCall) Context

Context sets context.

func (*CreateProjectEnvVarCall) Do

func (c *CreateProjectEnvVarCall) Do() (*Envvar, error)

Do executes the CreateProjectEnvVar.

type CreateSSHKeyCall

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

CreateSSHKeyCall represents a create an ssh key used to access external systems that require SSH key-based authentication.

func (*CreateSSHKeyCall) Context

Context sets context.

func (*CreateSSHKeyCall) Do

func (c *CreateSSHKeyCall) Do() (*Response, error)

Do executes the CreateSSHKey.

type DeleteBuildCacheCall

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

DeleteBuildCacheCall represents a clears the cache for a project.

func (*DeleteBuildCacheCall) Context

Context sets context.

func (*DeleteBuildCacheCall) Do

func (c *DeleteBuildCacheCall) Do() (*Response, error)

Do executes the DeleteBuildCache.

type DeleteCheckoutKeyCall

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

DeleteCheckoutKeyCall represents a delete a checkout key.

func (*DeleteCheckoutKeyCall) Context

Context sets context.

func (*DeleteCheckoutKeyCall) Do

func (c *DeleteCheckoutKeyCall) Do() (*Response, error)

Do executes the DeleteCheckoutKey.

type DeleteEnvVarCall

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

DeleteEnvVarCall represents a deletes the environment variable named.

func (*DeleteEnvVarCall) Context

Context sets context.

func (*DeleteEnvVarCall) Do

func (c *DeleteEnvVarCall) Do() (*Response, error)

Do executes the DeleteEnvVar.

type Envvar

type Envvar struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

Envvar represents a Envvar.

type HiddenEnvVarCall

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

HiddenEnvVarCall represents a gets the hidden value of environment variable.

func (*HiddenEnvVarCall) Context

Context sets context.

func (*HiddenEnvVarCall) Do

func (c *HiddenEnvVarCall) Do() (*Envvar, error)

Do executes the HiddenEnvVar.

type Lifecycle

type Lifecycle string

Lifecycle the model 'Lifecycle'

const (
	LifecycleQueued     Lifecycle = "queued"
	LifecycleScheduled  Lifecycle = "scheduled"
	LifecycleNotRun     Lifecycle = "not_run"
	LifecycleNotRunning Lifecycle = "not_running"
	LifecycleRunning    Lifecycle = "running"
	LifecycleFinished   Lifecycle = "finished"
)

type ListArtifactsCall

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

ListArtifactsCall represents a list the artifacts produced by a given build.

func (*ListArtifactsCall) Context

Context sets context.

func (*ListArtifactsCall) Do

func (c *ListArtifactsCall) Do() ([]Artifact, error)

Do executes the ListArtifacts.

type ListCheckoutKeyCall

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

ListCheckoutKeyCall represents a lists checkout keys.

func (*ListCheckoutKeyCall) Context

Context sets context.

func (*ListCheckoutKeyCall) Do

func (c *ListCheckoutKeyCall) Do() ([]*CheckoutKey, error)

Do executes the ListCheckoutKey.

type ListProjectCall

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

ListProjectCall represents a list of all the projects you're following on CircleCI, with build information organized by branch.

func (*ListProjectCall) Context

Context sets context.

func (*ListProjectCall) Do

func (c *ListProjectCall) Do() ([]*Project, error)

Do executes the ListProject.

type ListProjectEnvVarsCall

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

ListProjectEnvVarsCall represents a lists the environment variables for project.

func (*ListProjectEnvVarsCall) Context

Context sets context.

func (*ListProjectEnvVarsCall) Do

func (c *ListProjectEnvVarsCall) Do() ([]Envvar, error)

Do executes the ListProjectEnvVars.

type MeCall

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

MeCall represents a provides information about the signed in user.

func (*MeCall) Context

func (c *MeCall) Context(ctx context.Context) *MeCall

Context sets context.

func (*MeCall) Do

func (c *MeCall) Do() (*User, error)

Do executes the Me.

type Outcome

type Outcome string

Outcome the model 'Outcome'

const (
	OutcomeCanceled           Outcome = "canceled"
	OutcomeInfrastructureFail Outcome = "infrastructure_fail"
	OutcomeTimedout           Outcome = "timedout"
	OutcomeFailed             Outcome = "failed"
	OutcomeNoTests            Outcome = "no_tests"
	OutcomeSuccess            Outcome = "success"
)

List of Outcome

type PreviousBuild

type PreviousBuild struct {
	BuildNum        int32  `json:"build_num,omitempty"`
	BuildTimeMillis int32  `json:"build_time_millis,omitempty"`
	Status          Status `json:"status,omitempty"`
}

PreviousBuild previous build

type Project

type Project struct {
	AWS                  map[string]string      `json:"aws,omitempty"`
	Branches             map[string]interface{} `json:"branches,omitempty"`
	CampfireNotifyPrefs  string                 `json:"campfire_notify_prefs,omitempty"`
	CampfireRoom         string                 `json:"campfire_room,omitempty"`
	CampfireSubdomain    string                 `json:"campfire_subdomain,omitempty"`
	CampfireToken        string                 `json:"campfire_token,omitempty"`
	Compile              string                 `json:"compile,omitempty"`
	DefaultBranch        string                 `json:"default_branch,omitempty"`
	Dependencies         string                 `json:"dependencies,omitempty"`
	Extra                string                 `json:"extra,omitempty"`
	FeatureFlags         ProjectFeatureFlags    `json:"feature_flags,omitempty"`
	FlowdockAPIToken     string                 `json:"flowdock_api_token,omitempty"`
	Followed             bool                   `json:"followed,omitempty"`
	HasUsableKey         bool                   `json:"has_usable_key,omitempty"`
	HerokuDeployUser     string                 `json:"heroku_deploy_user,omitempty"`
	HipchatAPIToken      string                 `json:"hipchat_api_token,omitempty"`
	HipchatNotify        string                 `json:"hipchat_notify,omitempty"`
	HipchatRoom          string                 `json:"hipchat_room,omitempty"`
	IRCChannel           string                 `json:"irc_channel,omitempty"`
	IRCKeyword           string                 `json:"irc_keyword,omitempty"`
	IRCNotifyPrefs       string                 `json:"irc_notify_prefs,omitempty"`
	IRCPassword          string                 `json:"irc_password,omitempty"`
	IRCServer            string                 `json:"irc_server,omitempty"`
	IRCUsername          string                 `json:"irc_username,omitempty"`
	Language             string                 `json:"language,omitempty"`
	OSS                  bool                   `json:"oss,omitempty"`
	Parallel             int32                  `json:"parallel,omitempty"`
	Reponame             string                 `json:"reponame,omitempty"`
	Scopes               []Scope                `json:"scopes,omitempty"`
	Setup                string                 `json:"setup,omitempty"`
	SlackAPIToken        string                 `json:"slack_api_token,omitempty"`
	SlackChannel         string                 `json:"slack_channel,omitempty"`
	SlackChannelOverride string                 `json:"slack_channel_override,omitempty"`
	SlackNotifyPrefs     string                 `json:"slack_notify_prefs,omitempty"`
	SlackSubdomain       string                 `json:"slack_subdomain,omitempty"`
	SlackWebhookURL      string                 `json:"slack_webhook_url,omitempty"`
	SSHKeys              []SSHKey               `json:"ssh_keys,omitempty"`
	Test                 string                 `json:"test,omitempty"`
	Username             string                 `json:"username,omitempty"`
	VCSType              string                 `json:"vcs_type,omitempty"`
	VCSURL               string                 `json:"vcs_url,omitempty"`
}

Project represents a Project.

type ProjectFeatureFlags

type ProjectFeatureFlags struct {
	BuildForkPRs    bool `json:"build-fork-prs,omitempty"`
	Junit           bool `json:"junit,omitempty"`
	OSS             bool `json:"oss,omitempty"`
	OSX             bool `json:"osx,omitempty"`
	SetGithubStatus bool `json:"set-github-status,omitempty"`
	TrustyBeta      bool `json:"trusty-beta,omitempty"`
}

ProjectFeatureFlags represents a ProjectFeatureFlags.

type RecentBuildsCall

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

RecentBuildsCall represents a build summary for each of the last 30 recent builds, ordered by build_num.

func (*RecentBuildsCall) Context

Context sets context.

func (*RecentBuildsCall) Do

func (c *RecentBuildsCall) Do() ([]*Build, error)

Do executes the RecentBuilds.

func (*RecentBuildsCall) Limit

func (c *RecentBuildsCall) Limit(limit int) *RecentBuildsCall

Limit sets page limit.

func (*RecentBuildsCall) Offset

func (c *RecentBuildsCall) Offset(offset int) *RecentBuildsCall

Offset sets offset.

func (*RecentBuildsCall) Shallow

func (c *RecentBuildsCall) Shallow(shallow bool) *RecentBuildsCall

Shallow sets shallow.

type Response

type Response struct {
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
}

Response represents a response of CircleCI API.

type RetryBuildCall

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

RetryBuildCall represents a retries the build, returns a summary of the new build.

func (*RetryBuildCall) Context

func (c *RetryBuildCall) Context(ctx context.Context) *RetryBuildCall

Context sets context.

func (*RetryBuildCall) Do

func (c *RetryBuildCall) Do() (*Build, error)

Do executes the RetryBuild.

type SSHKey

type SSHKey struct {
	Hostname   string `json:"hostname"`
	PrivateKey string `json:"private_key"`
}

SSHKey represents a ssh hostname and privatekey pair.

type Scope

type Scope string

Scope the model Scope

const (
	ScopeWriteSettings Scope = "write-settings"
	ScopeViewBuilds    Scope = "view-builds"
	ScopeReadSettings  Scope = "read-settings"
	ScopeTriggeRBuilds Scope = "trigger-builds"
	ScopeAll           Scope = "all"
	ScopeStatus        Scope = "status"
	ScopeNone          Scope = "none"
)

List of Scope

type Service

type Service struct {
	Client *http.Client

	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	API *API
	// contains filtered or unexported fields
}

Service represents a V1 Services.

func NewService

func NewService(ctx context.Context, client *http.Client) *Service

NewService creates a new V1 Service.

func (*Service) Token

func (s *Service) Token() string

type Status

type Status string

Status the model Status

const (
	StatusRetried            Status = "retried"
	StatusCanceled           Status = "canceled"
	StatusInfrastructureFail Status = "infrastructure_fail"
	StatusTimeout            Status = "timedout"
	StatusNotRun             Status = "not_run"
	StatusRunning            Status = "running"
	StatusFailed             Status = "failed"
	StatusQueued             Status = "queued"
	StatusScheduled          Status = "scheduled"
	StatusNotRunning         Status = "not_running"
	StatusNoTests            Status = "no_tests"
	StatusFixed              Status = "fixed"
	StatusSuccess            Status = "success"
)

List of Status

type Test

type Test struct {
	Classname string  `json:"classname,omitempty"`
	File      string  `json:"file,omitempty"`
	Message   string  `json:"message,omitempty"`
	Name      string  `json:"name,omitempty"`
	Result    Status  `json:"result,omitempty"`
	RunTime   float32 `json:"run_time,omitempty"`
	Source    string  `json:"source,omitempty"`
}

Test represents a Test.

type TestMetadataCall

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

TestMetadataCall represents a provides test metadata for a build.

func (*TestMetadataCall) Context

Context sets context.

func (*TestMetadataCall) Do

func (c *TestMetadataCall) Do() (*Tests, error)

Do executes the TestMetadata.

type Tests

type Tests struct {
	Tests []*Test `json:"tests,omitempty"`
}

Tests represents a Tests.

type TriggerBuild

type TriggerBuild struct {
	// BuildParameters is the additional environment variables to inject into the build environment. A map of names to values.
	BuildParameters map[string]interface{} `json:"build_parameters,omitempty"`
	// Parallel is the number of containers to use to run the build. Default is null and the project default is used.
	Parallel string `json:"parallel,omitempty"`
	// Revision is the specific revision to build. Default is null and the head of the branch is used. Cannot be used with tag parameter.
	Revision string `json:"revision,omitempty"`
}

TriggerBuild represents a trigger build.

type TriggerBuildAndSummaryCall

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

TriggerBuildAndSummaryCall represents a triggers a new build, and returns the summary of the build.

func (*TriggerBuildAndSummaryCall) Context

Context sets context.

func (*TriggerBuildAndSummaryCall) Do

Do executes the TriggerBuildAndSummary.

type TriggerBuildSummary

type TriggerBuildSummary struct {
	// BuildParameters is the additional environment variables to inject into the build environment. A map of names to values.
	BuildParameters map[string]interface{} `json:"build_parameters,omitempty"`
	// Parallel is the number of containers to use to run the build. Default is null and the project default is used.
	Parallel string `json:"parallel,omitempty"`
	// Revision is the specific revision to build. Default is null and the head of the branch is used. Cannot be used with tag parameter.
	Revision string `json:"revision,omitempty"`
	// Tag is the tag to build. Default is null. Cannot be used with revision parameter.
	Tag string `json:"tag,omitempty"`
}

TriggerBuildSummary represents a trigger build summary.

type TriggerNewBuildCall

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

TriggerNewBuildCall represents a triggers a new build, returns a summary of the build.

func (*TriggerNewBuildCall) Context

Context sets context.

func (*TriggerNewBuildCall) Do

func (c *TriggerNewBuildCall) Do() (*Build, error)

Do executes the TriggerNewBuild.

func (*TriggerNewBuildCall) Trigger

Trigger sets trigger.

The build parameters can be set using an experimental API.

type User

type User struct {
	Admin               bool                   `json:"admin,omitempty"`
	AllEmails           []string               `json:"all_emails,omitempty"`
	AnalyticsID         string                 `json:"analytics_id,omitempty"`
	AvatarURL           string                 `json:"avatar_url,omitempty"`
	BasicEmailPrefs     string                 `json:"basic_email_prefs,omitempty"`
	Bitbucket           map[string]string      `json:"bitbucket,omitempty"`
	BitbucketAuthorized bool                   `json:"bitbucket_authorized,omitempty"`
	Containers          int32                  `json:"containers,omitempty"`
	CreatedAt           time.Time              `json:"created_at,omitempty"`
	DaysLeftInTrial     int32                  `json:"days_left_in_trial,omitempty"`
	DevAdmin            bool                   `json:"dev_admin,omitempty"`
	EnrolledBetas       []string               `json:"enrolled_betas,omitempty"`
	GithubID            int32                  `json:"github_id,omitempty"`
	GithubOauthScopes   []string               `json:"github_oauth_scopes,omitempty"`
	GravatarID          int32                  `json:"gravatar_id,omitempty"`
	HerokuAPIKey        string                 `json:"heroku_api_key,omitempty"`
	InBetaProgram       bool                   `json:"in_beta_program,omitempty"`
	Login               string                 `json:"login,omitempty"`
	Name                string                 `json:"name,omitempty"`
	OrganizationPrefs   map[string]interface{} `json:"organization_prefs,omitempty"`
	Parallelism         int32                  `json:"parallelism,omitempty"`
	Plan                string                 `json:"plan,omitempty"`
	Projects            map[string]interface{} `json:"projects,omitempty"`
	PusherID            string                 `json:"pusher_id,omitempty"`
	SelectedEmail       string                 `json:"selected_email,omitempty"`
	SignInCount         int32                  `json:"sign_in_count,omitempty"`
	TrialEnd            time.Time              `json:"trial_end,omitempty"`
}

User represents a User.

type Workflows

type Workflows struct {
	JobID                     string                 `json:"job_id"`
	JobName                   string                 `json:"job_name"`
	UpstreamConcurrencyMapmap map[string]interface{} `json:"upstream_concurrency_map"`
	UpstreamJobIDs            []string               `json:"upstream_job_ids"`
	WorkflowID                string                 `json:"workflow_id"`
	WorkflowName              string                 `json:"workflow_name"`
	WorkspaceID               string                 `json:"workspace_id"`
}

Jump to

Keyboard shortcuts

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