Versions in this module Expand all Collapse all v0 v0.4.0 Oct 10, 2018 Changes in this version + const BuildTriggerBuildFinish + const BuildTriggerSchedule + const BuildTriggerVcs + const DefaultBuildConfigurationType + const DefaultBuildNumberFormat + const Git + const StepExecuteAlways + const StepExecuteModeDefault + const StepExecuteModeEvenWhenFailed + const StepExecuteModeOnlyIfBuildIsSuccessful + var ConditionStrings = []string + var Conditions = struct{ ... } + var DebugRequests = false + var DebugResponses = false + var DefaultSnapshotDependencyOptions = &SnapshotDependencyOptions + var ParameterTypes = struct{ ... } + var TriggerTypes = struct{ ... } + var VcsNames = struct{ ... } + func NewBool(b bool) *bool + func NewFalse() *bool + func NewTrue() *bool + type AgentRequirement struct + BuildTypeID string + Condition string + Disabled *bool + ID string + Inherited *bool + Properties *Properties + func NewAgentRequirement(condition string, paramName string, paramValue string) (*AgentRequirement, error) + func (a *AgentRequirement) Name() string + func (a *AgentRequirement) Value() string + type AgentRequirementService struct + BuildTypeID string + func (s *AgentRequirementService) Create(req *AgentRequirement) (*AgentRequirement, error) + func (s *AgentRequirementService) Delete(id string) error + func (s *AgentRequirementService) GetAll() ([]*AgentRequirement, error) + func (s *AgentRequirementService) GetByID(id string) (*AgentRequirement, error) + type ArtifactDependency struct + Options *ArtifactDependencyOptions + SourceBuildTypeID string + func NewArtifactDependency(sourceBuildTypeID string, opt *ArtifactDependencyOptions) (*ArtifactDependency, error) + func (s *ArtifactDependency) BuildTypeID() string + func (s *ArtifactDependency) Disabled() bool + func (s *ArtifactDependency) ID() string + func (s *ArtifactDependency) MarshalJSON() ([]byte, error) + func (s *ArtifactDependency) SetBuildTypeID(id string) + func (s *ArtifactDependency) SetDisabled(disabled bool) + func (s *ArtifactDependency) Type() string + func (s *ArtifactDependency) UnmarshalJSON(data []byte) error + type ArtifactDependencyOptions struct + ArtifactRevisionType ArtifactDependencyRevision + CleanDestination bool + PathRules []string + RevisionNumber string + func NewArtifactDependencyOptions(pathRules []string, revisionType ArtifactDependencyRevision, ...) (*ArtifactDependencyOptions, error) + type ArtifactDependencyRevision string + const BuildFromSameChain + const BuildWithSpecifiedNumber + const LastBuildFinishedWithTag + const LatestFinishedBuild + const LatestPinnedBuild + const LatestSuccessfulBuild + type BuildFeature interface + BuildTypeID func() string + Disabled func() bool + ID func() string + MarshalJSON func() ([]byte, error) + Properties func() *Properties + SetBuildTypeID func(value string) + SetDisabled func(value bool) + SetID func(value string) + SetVcsRootID func(value string) + Type func() string + UnmarshalJSON func(data []byte) error + VcsRootID func() string + type BuildFeatureService struct + BuildTypeID string + func (s *BuildFeatureService) Create(bf BuildFeature) (BuildFeature, error) + func (s *BuildFeatureService) Delete(id string) error + func (s *BuildFeatureService) GetByID(id string) (BuildFeature, error) + type BuildStepType = string + const StepTypeCommandLine + const StepTypeDotnetCli + const StepTypePowershell + type BuildType struct + Description string + Disabled bool + ID string + Name string + Options *BuildTypeOptions + Parameters *Parameters + ProjectID string + VcsRootEntries []*VcsRootEntry + func NewBuildType(projectID string, name string) (*BuildType, error) + func (b *BuildType) MarshalJSON() ([]byte, error) + func (b *BuildType) Reference() *BuildTypeReference + func (b *BuildType) UnmarshalJSON(data []byte) error + type BuildTypeOptions struct + AllowPersonalBuildTriggering bool + ArtifactRules []string + BuildConfigurationType string + BuildCounter int + BuildNumberFormat string + BuildTypeID int + EnableHangingBuildsDetection bool + EnableStatusWidget bool + MaxSimultaneousBuilds int + func NewBuildTypeOptionsWithDefaults() *BuildTypeOptions + type BuildTypeReference struct + ID string + Name string + ProjectID string + type BuildTypeService struct + func (s *BuildTypeService) AddStep(id string, step Step) (Step, error) + func (s *BuildTypeService) AttachVcsRoot(id string, vcsRoot *VcsRootReference) error + func (s *BuildTypeService) AttachVcsRootEntry(id string, entry *VcsRootEntry) error + func (s *BuildTypeService) Create(projectID string, buildType *BuildType) (*BuildTypeReference, error) + func (s *BuildTypeService) Delete(id string) error + func (s *BuildTypeService) DeleteStep(id string, stepID string) error + func (s *BuildTypeService) GetByID(id string) (*BuildType, error) + func (s *BuildTypeService) GetSteps(id string) ([]Step, error) + func (s *BuildTypeService) Update(buildType *BuildType) (*BuildType, error) + func (s *BuildTypeService) UpdateSettings(id string, settings *Properties) error + type Client struct + BuildTypes *BuildTypeService + HTTPClient *http.Client + Projects *ProjectService + RetryTimeout time.Duration + Server *ServerService + VcsRoots *VcsRootService + func New(userName, password string, httpClient *http.Client) (*Client, error) + func NewWithAddress(userName, password, address string, httpClient *http.Client) (*Client, error) + func (c *Client) AgentRequirementService(id string) *AgentRequirementService + func (c *Client) BuildFeatureService(id string) *BuildFeatureService + func (c *Client) DependencyService(id string) *DependencyService + func (c *Client) TriggerService(buildTypeID string) *TriggerService + func (c *Client) Validate() (bool, error) + type Dependency interface + BuildTypeID func() string + ID func() string + SetBuildTypeID func(string) + Type func() string + type DependencyService struct + BuildTypeID string + func NewDependencyService(buildTypeID string, c *http.Client, base *sling.Sling) *DependencyService + func (s *DependencyService) AddArtifactDependency(dep *ArtifactDependency) (*ArtifactDependency, error) + func (s *DependencyService) AddSnapshotDependency(dep *SnapshotDependency) (*SnapshotDependency, error) + func (s *DependencyService) DeleteArtifact(depID string) error + func (s *DependencyService) DeleteSnapshot(depID string) error + func (s *DependencyService) GetArtifactByID(depID string) (*ArtifactDependency, error) + func (s *DependencyService) GetSnapshotByID(depID string) (*SnapshotDependency, error) + type FeatureCommitStatusPublisher struct + Options FeatureCommitStatusPublisherOptions + func NewFeatureCommitStatusPublisherGithub(opt StatusPublisherGithubOptions) (*FeatureCommitStatusPublisher, error) + func (f *FeatureCommitStatusPublisher) BuildTypeID() string + func (f *FeatureCommitStatusPublisher) Disabled() bool + func (f *FeatureCommitStatusPublisher) ID() string + func (f *FeatureCommitStatusPublisher) MarshalJSON() ([]byte, error) + func (f *FeatureCommitStatusPublisher) Properties() *Properties + func (f *FeatureCommitStatusPublisher) SetBuildTypeID(value string) + func (f *FeatureCommitStatusPublisher) SetDisabled(value bool) + func (f *FeatureCommitStatusPublisher) SetID(value string) + func (f *FeatureCommitStatusPublisher) SetVcsRootID(value string) + func (f *FeatureCommitStatusPublisher) Type() string + func (f *FeatureCommitStatusPublisher) UnmarshalJSON(data []byte) error + func (f *FeatureCommitStatusPublisher) VcsRootID() string + type FeatureCommitStatusPublisherOptions interface + Properties func() *Properties + type Features struct + Count int32 + Href string + Items []buildFeatureJSON + type GitAgentCleanFilesPolicy string + const CleanFilesPolicyAllUntracked + const CleanFilesPolicyIgnoredOnly + const CleanFilesPolicyIgnoredUntracked + type GitAgentCleanPolicy string + const CleanPolicyAlways + const CleanPolicyBranchChange + const CleanPolicyNever + type GitAgentSettings struct + CleanFilesPolicy GitAgentCleanFilesPolicy + CleanPolicy GitAgentCleanPolicy + GitPath string + UseMirrors bool + type GitAuthMethod string + const GitAuthMethodAnonymous + const GitAuthMethodPassword + const GitAuthSSHCustomKey + const GitAuthSSHDefaultKey + const GitAuthSSHUploadedKey + type GitVcsRoot struct + ID string + ModificationCheckInterval int32 + Name string + Options *GitVcsRootOptions + Project *ProjectReference + func NewGitVcsRoot(projectID string, name string, opts *GitVcsRootOptions) (*GitVcsRoot, error) + func (d *GitVcsRoot) GetID() string + func (d *GitVcsRoot) MarshalJSON() ([]byte, error) + func (d *GitVcsRoot) Properties() *Properties + func (d *GitVcsRoot) UnmarshalJSON(data []byte) error + func (d *GitVcsRoot) VcsName() string + type GitVcsRootOptions struct + AgentSettings *GitAgentSettings + AuthMethod GitAuthMethod + BranchSpec []string + DefaultBranch string + EnableTagsInBranchSpec bool + FetchURL string + Password string + PrivateKeySource string + PushURL string + SubModuleCheckout string + Username string + UsernameStyle GitVcsUsernameStyle + func NewGitVcsRootOptions(defaultBranch string, fetchURL string, pushURL string, auth GitAuthMethod, ...) (*GitVcsRootOptions, error) + func NewGitVcsRootOptionsDefaults(defaultBranch string, fetchURL string) (*GitVcsRootOptions, error) + func NewGitVcsRootOptionsWithAgentSettings(defaultBranch string, fetchURL string, pushURL string, auth GitAuthMethod, ...) (*GitVcsRootOptions, error) + type GitVcsUsernameStyle string + const GitVcsUsernameStyleAuthorEmail + const GitVcsUsernameStyleAuthorName + const GitVcsUsernameStyleAuthorNameAndEmail + const GitVcsUsernameStyleUserID + type Locator string + func LocatorID(id string) Locator + func (l Locator) String() string + type Parameter struct + Inherited *bool + Name string + Type string + Value string + func NewParameter(t string, name string, value string) (*Parameter, error) + func (p *Parameter) MarshalJSON() ([]byte, error) + func (p *Parameter) Property() *Property + func (p *Parameter) UnmarshalJSON(data []byte) error + type Parameters struct + Count int32 + Href string + Items []*Parameter + func NewParameters(items ...*Parameter) *Parameters + func NewParametersEmpty() *Parameters + func (p *Parameters) Add(param *Parameter) + func (p *Parameters) AddOrReplaceParameter(param *Parameter) + func (p *Parameters) AddOrReplaceValue(t string, n string, v string) + func (p *Parameters) Concat(source *Parameters) *Parameters + func (p *Parameters) Properties() *Properties + func (p *Parameters) Remove(t string, n string) + type Project struct + Archived *bool + Description string + Href string + ID string + Name string + Parameters *Parameters + ParentProject *ProjectReference + ParentProjectID string + WebURL string + func NewProject(name string, description string, parentProjectID string) (*Project, error) + func (p *Project) ProjectReference() *ProjectReference + func (p *Project) SetParentProject(parentID string) + type ProjectReference struct + Description string + Href string + ID string + Name string + WebURL string + type ProjectService struct + func (s *ProjectService) Create(project *Project) (*Project, error) + func (s *ProjectService) Delete(id string) error + func (s *ProjectService) GetByID(id string) (*Project, error) + func (s *ProjectService) Update(project *Project) (*Project, error) + type Properties struct + Count int32 + Href string + Items []*Property + func NewProperties(items ...*Property) *Properties + func NewPropertiesEmpty() *Properties + func (p *Properties) Add(prop *Property) + func (p *Properties) AddOrReplaceProperty(prop *Property) + func (p *Properties) AddOrReplaceValue(n string, v string) + func (p *Properties) Concat(source *Properties) *Properties + func (p *Properties) GetOk(key string) (string, bool) + func (p *Properties) Map() map[string]string + func (p *Properties) Remove(n string) + type Property struct + Inherited *bool + Name string + Type *Type + Value string + func NewProperty(name string, value string) *Property + func (p *Property) String() string + type PropertyAssertions struct + type Server struct + BuildDate string + BuildNumber string + CurrentTime string + InternalID string + Version string + VersionMajor int32 + VersionMinor int32 + WebURL string + type ServerService struct + func (s *ServerService) Get() (*Server, error) + type SnapshotDependencies struct + Count int32 + Items []*SnapshotDependency + type SnapshotDependency struct + BuildTypeID string + Disabled *bool + Href string + ID string + Inherited *bool + Properties *Properties + SourceBuildType *BuildTypeReference + Type string + func NewSnapshotDependency(sourceBuildTypeID string) *SnapshotDependency + func NewSnapshotDependencyWithOptions(sourceBuildTypeID string, opt *SnapshotDependencyOptions) *SnapshotDependency + type SnapshotDependencyOptions struct + DoNotRunNewBuildIfThereIsASuitable bool + OnFailedDependency string + OnFailedToStartOrCanceledDependency string + RunSameAgent bool + TakeSuccessfulBuildsOnly bool + type StatusPublisherGithubOptions struct + AccessToken string + AuthenticationType string + Host string + Password string + Username string + func CommitStatusPublisherGithubOptionsFromProperties(p *Properties) (*StatusPublisherGithubOptions, error) + func NewCommitStatusPublisherGithubOptionsPassword(host string, username string, password string) StatusPublisherGithubOptions + func NewCommitStatusPublisherGithubOptionsToken(host string, accessToken string) StatusPublisherGithubOptions + func (s StatusPublisherGithubOptions) Properties() *Properties + type Step interface + GetID func() string + GetName func() string + Type func() string + type StepCommandLine struct + CommandExecutable string + CommandParameters string + CustomScript string + ExecuteMode StepExecuteMode + ID string + Name string + func NewStepCommandLineExecutable(name string, executable string, args string) (*StepCommandLine, error) + func NewStepCommandLineScript(name string, script string) (*StepCommandLine, error) + func (s *StepCommandLine) GetID() string + func (s *StepCommandLine) GetName() string + func (s *StepCommandLine) MarshalJSON() ([]byte, error) + func (s *StepCommandLine) Type() BuildStepType + func (s *StepCommandLine) UnmarshalJSON(data []byte) error + type StepExecuteMode = string + type StepPowershell struct + Code string + ExecuteMode StepExecuteMode + ID string + Name string + ScriptArgs string + ScriptFile string + func NewStepPowershellCode(name string, code string) (*StepPowershell, error) + func NewStepPowershellScriptFile(name string, scriptFile string, scriptArgs string) (*StepPowershell, error) + func (s *StepPowershell) GetID() string + func (s *StepPowershell) GetName() string + func (s *StepPowershell) MarshalJSON() ([]byte, error) + func (s *StepPowershell) Type() BuildStepType + func (s *StepPowershell) UnmarshalJSON(data []byte) error + type Trigger interface + BuildTypeID func() string + Disabled func() bool + ID func() string + SetBuildTypeID func(buildTypeID string) + Type func() string + type TriggerBuildFinish struct + Options *TriggerBuildFinishOptions + SourceBuildID string + func NewTriggerBuildFinish(sourceBuildID string, opt *TriggerBuildFinishOptions) (*TriggerBuildFinish, error) + func (t *TriggerBuildFinish) BuildTypeID() string + func (t *TriggerBuildFinish) Disabled() bool + func (t *TriggerBuildFinish) ID() string + func (t *TriggerBuildFinish) MarshalJSON() ([]byte, error) + func (t *TriggerBuildFinish) SetBuildTypeID(id string) + func (t *TriggerBuildFinish) SetDisabled(disabled bool) + func (t *TriggerBuildFinish) Type() string + func (t *TriggerBuildFinish) UnmarshalJSON(data []byte) error + type TriggerBuildFinishOptions struct + AfterSuccessfulBuildOnly bool + BranchFilter []string + func NewTriggerBuildFinishOptions(afterSuccessfulBuildOnly bool, branchFilter []string) *TriggerBuildFinishOptions + type TriggerSchedule struct + Hour uint + Minute uint + Options *TriggerScheduleOptions + Rules []string + SchedulingPolicy TriggerSchedulingPolicy + Timezone string + Weekday time.Weekday + func NewTriggerSchedule(schedulingPolicy TriggerSchedulingPolicy, sourceBuildID string, ...) (*TriggerSchedule, error) + func NewTriggerScheduleDaily(sourceBuildID string, hour uint, minute uint, timezone string, rules []string) (*TriggerSchedule, error) + func NewTriggerScheduleWeekly(sourceBuildID string, weekday time.Weekday, hour uint, minute uint, ...) (*TriggerSchedule, error) + func (t *TriggerSchedule) BuildTypeID() string + func (t *TriggerSchedule) Disabled() bool + func (t *TriggerSchedule) ID() string + func (t *TriggerSchedule) MarshalJSON() ([]byte, error) + func (t *TriggerSchedule) SetBuildTypeID(id string) + func (t *TriggerSchedule) SetDisabled(disabled bool) + func (t *TriggerSchedule) Type() string + func (t *TriggerSchedule) UnmarshalJSON(data []byte) error + type TriggerScheduleOptions struct + BuildOnAllCompatibleAgents bool + BuildWithPendingChangesOnly bool + EnforceCleanCheckout bool + EnforceCleanCheckoutForDependencies bool + PromoteWatchedBuild bool + QueueOptimization bool + RevisionRule ArtifactDependencyRevision + RevisionRuleBuildBranch string + RevisionRuleSourceBuildID string + TriggerIfWatchedBuildChanges bool + func NewTriggerScheduleOptions() *TriggerScheduleOptions + type TriggerSchedulingPolicy = string + const TriggerSchedulingCron + const TriggerSchedulingDaily + const TriggerSchedulingWeekly + type TriggerService struct + BuildTypeID string + func (s *TriggerService) AddTrigger(t Trigger) (Trigger, error) + func (s *TriggerService) Delete(id string) error + func (s *TriggerService) GetByID(id string) (Trigger, error) + type TriggerVcs struct + BranchFilter string + Options *TriggerVcsOptions + Rules string + func NewTriggerVcs(triggerRules string, branchFilter string) (*TriggerVcs, error) + func NewTriggerVcsWithOptions(triggerRules string, branchFilter string, opt *TriggerVcsOptions) (*TriggerVcs, error) + func (t *TriggerVcs) BuildTypeID() string + func (t *TriggerVcs) Disabled() bool + func (t *TriggerVcs) ID() string + func (t *TriggerVcs) MarshalJSON() ([]byte, error) + func (t *TriggerVcs) SetBuildTypeID(id string) + func (t *TriggerVcs) SetDisabled(disabled bool) + func (t *TriggerVcs) Type() string + func (t *TriggerVcs) UnmarshalJSON(data []byte) error + type TriggerVcsOptions struct + GroupUserCheckins bool + QuietPeriodInSeconds int + QuietPeriodMode VcsTriggerQuietPeriodMode + func NewTriggerVcsOptions(mode VcsTriggerQuietPeriodMode, seconds int) (*TriggerVcsOptions, error) + func (o *TriggerVcsOptions) PerCheckinTriggering() bool + func (o *TriggerVcsOptions) QueueOptimization() bool + func (o *TriggerVcsOptions) SetPerCheckinTriggering(enable bool) + func (o *TriggerVcsOptions) SetQueueOptimization(enable bool) + type Triggers struct + Count int32 + Items []*Trigger + type Type struct + RawValue string + type VcsRoot interface + GetID func() string + Properties func() *Properties + VcsName func() string + type VcsRootEntries struct + Count int32 + Href string + Items []*VcsRootEntry + func NewVcsRootEntries(items ...*VcsRootReference) *VcsRootEntries + type VcsRootEntry struct + CheckoutRules string + ID string + Inherited *bool + VcsRoot *VcsRootReference + func NewVcsRootEntry(vcsRef *VcsRootReference) *VcsRootEntry + func NewVcsRootEntryWithRules(vcsRef *VcsRootReference, checkoutRules string) *VcsRootEntry + type VcsRootReference struct + Href string + ID string + Name string + Project *ProjectReference + type VcsRootService struct + func (s *VcsRootService) Create(projectID string, vcsRoot VcsRoot) (*VcsRootReference, error) + func (s *VcsRootService) Delete(id string) error + func (s *VcsRootService) GetByID(id string) (VcsRoot, error) + type VcsTriggerQuietPeriodMode int + const QuietPeriodCustom + const QuietPeriodDoNotUse + const QuietPeriodUseDefault