Documentation ¶
Index ¶
- Constants
- type AgentPool
- type AgentPoolAgent
- type AgentPoolAgentList
- type AgentPoolEntry
- type AgentPoolJobList
- type AgentPoolList
- type AgentPoolQueue
- type AgentQueue
- type AgentQueueList
- type Author
- type AzureDevopsClient
- func (c *AzureDevopsClient) GetCurrentConcurrency() float64
- func (c *AzureDevopsClient) GetRequestCount() float64
- func (c *AzureDevopsClient) GetResourceUsageAgent() (ret ResourceUsageAgent, error error)
- func (c *AzureDevopsClient) GetResourceUsageBuild() (ret ResourceUsageBuild, error error)
- func (c *AzureDevopsClient) GetWorkItem(workItemUrl string) (workItem WorkItem, error error)
- func (c *AzureDevopsClient) Init()
- func (c *AzureDevopsClient) ListAgentPoolAgents(agentPoolId int64) (list AgentPoolAgentList, error error)
- func (c *AzureDevopsClient) ListAgentPoolJobs(agentPoolId int64) (list AgentPoolJobList, error error)
- func (c *AzureDevopsClient) ListAgentPools() (list AgentPoolList, error error)
- func (c *AzureDevopsClient) ListAgentQueues(project string) (list AgentQueueList, error error)
- func (c *AzureDevopsClient) ListBuildDefinitions(project string) (list BuildDefinitionList, error error)
- func (c *AzureDevopsClient) ListBuildHistory(project string, minTime time.Time) (list BuildList, error error)
- func (c *AzureDevopsClient) ListBuildHistoryWithStatus(project string, minTime time.Time, statusFilter string) (list BuildList, error error)
- func (c *AzureDevopsClient) ListBuildTags(project string, buildID string) (list TagList, error error)
- func (c *AzureDevopsClient) ListBuildTimeline(project string, buildID string) (list TimelineRecordList, error error)
- func (c *AzureDevopsClient) ListBuilds(project string) (list BuildList, error error)
- func (c *AzureDevopsClient) ListCommits(project string, repository string, fromDate time.Time) (list RepositoryCommitList, error error)
- func (c *AzureDevopsClient) ListLatestBuilds(project string) (list BuildList, error error)
- func (c *AzureDevopsClient) ListProjects() (list ProjectList, error error)
- func (c *AzureDevopsClient) ListPullrequest(project, repositoryId string) (list PullRequestList, error error)
- func (c *AzureDevopsClient) ListPushes(project string, repository string, fromDate time.Time) (list RepositoryPushList, error error)
- func (c *AzureDevopsClient) ListReleaseDefinitions(project string) (list ReleaseDefinitionList, error error)
- func (c *AzureDevopsClient) ListReleaseDeployments(project string, releaseDefinitionId int64) (list ReleaseDeploymentList, error error)
- func (c *AzureDevopsClient) ListReleaseHistory(project string, minTime time.Time) (list ReleaseList, error error)
- func (c *AzureDevopsClient) ListReleases(project string, releaseDefinitionId int64) (list ReleaseList, error error)
- func (c *AzureDevopsClient) ListRepositories(project string) (list RepositoryList, error error)
- func (c *AzureDevopsClient) QueryWorkItems(queryPath, projectId string) (list WorkItemInfoList, error error)
- func (c *AzureDevopsClient) SetAccessToken(token string)
- func (c *AzureDevopsClient) SetApiVersion(apiversion string)
- func (c *AzureDevopsClient) SetConcurrency(v int64)
- func (c *AzureDevopsClient) SetOrganization(url string)
- func (c *AzureDevopsClient) SetRetries(v int)
- func (c *AzureDevopsClient) SetUserAgent(v string)
- func (c *AzureDevopsClient) SupportsPatAuthentication() bool
- func (c *AzureDevopsClient) UseAzAuth() error
- type Build
- type BuildDefinition
- type BuildDefinitionList
- type BuildList
- type EntraIdErrorResponse
- type EntraIdToken
- type IdentifyRef
- type JobRequest
- type Link
- type Links
- type Project
- type ProjectList
- type PullRequest
- type PullRequestLabels
- type PullRequestList
- type PullRequestReviewer
- type PullRequestVoteSummary
- type Query
- type Release
- type ReleaseArtifact
- type ReleaseDefinition
- type ReleaseDefinitionEnvironment
- type ReleaseDefinitionList
- type ReleaseDeployment
- type ReleaseDeploymentEnvironment
- type ReleaseDeploymentList
- type ReleaseEnvironment
- type ReleaseEnvironmentApproval
- type ReleaseEnvironmentDeployStep
- type ReleaseEnvironmentDeployStepPhase
- type ReleaseList
- type Repository
- type RepositoryCommit
- type RepositoryCommitList
- type RepositoryList
- type RepositoryPush
- type RepositoryPushList
- type ResourceUsageAgent
- type ResourceUsageAgentUsageRow
- type ResourceUsageBuild
- type Tag
- type TagList
- type TimelineRecord
- type TimelineRecordList
- type WorkItem
- type WorkItemFields
- type WorkItemInfo
- type WorkItemInfoList
Constants ¶
View Source
const (
AZURE_DEVOPS_SCOPE = "499b84ac-1321-427f-aa17-267ca6975798/.default"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentPoolAgent ¶
type AgentPoolAgentList ¶
type AgentPoolAgentList struct { Count int `json:"count"` List []AgentPoolAgent `json:"value"` }
type AgentPoolEntry ¶
type AgentPoolEntry struct { CreatedOn time.Time `json:"createdOn"` AutoProvision bool `json:"autoProvision"` AutoUpdate bool `json:"autoUpdate"` AutoSize bool `json:"autoSize"` CreatedBy struct { DisplayName string `json:"displayName"` URL string `json:"url"` Links struct { Avatar struct { Href string `json:"href"` } `json:"avatar"` } `json:"_links"` ID string `json:"id"` UniqueName string `json:"uniqueName"` ImageURL string `json:"imageUrl"` Descriptor string `json:"descriptor"` } `json:"createdBy"` Owner struct { DisplayName string `json:"displayName"` URL string `json:"url"` Links struct { Avatar struct { Href string `json:"href"` } `json:"avatar"` } `json:"_links"` ID string `json:"id"` UniqueName string `json:"uniqueName"` ImageURL string `json:"imageUrl"` Descriptor string `json:"descriptor"` } `json:"owner"` ID int64 `json:"id"` Scope string `json:"scope"` Name string `json:"name"` IsHosted bool `json:"isHosted"` PoolType string `json:"poolType"` Size int `json:"size"` IsLegacy bool `json:"isLegacy"` Options string `json:"options"` }
type AgentPoolJobList ¶
type AgentPoolJobList struct { Count int `json:"count"` List []JobRequest `json:"value"` }
type AgentPoolList ¶
type AgentPoolList struct { Count int `json:"count"` Value []AgentPoolEntry `json:"value"` }
type AgentQueue ¶
type AgentQueueList ¶
type AgentQueueList struct { Count int `json:"count"` List []AgentQueue `json:"value"` }
type AzureDevopsClient ¶
type AzureDevopsClient struct { // RequestCount has to be the first words // in order to be 64-aligned on 32-bit architectures. RequestCount uint64 RequestRetries int HostUrl *string ApiVersion string LimitProject int64 LimitBuildsPerProject int64 LimitBuildsPerDefinition int64 LimitReleasesPerDefinition int64 LimitDeploymentPerDefinition int64 LimitReleaseDefinitionsPerProject int64 LimitReleasesPerProject int64 // contains filtered or unexported fields }
func NewAzureDevopsClient ¶
func NewAzureDevopsClient(logger *zap.SugaredLogger) *AzureDevopsClient
func (*AzureDevopsClient) GetCurrentConcurrency ¶
func (c *AzureDevopsClient) GetCurrentConcurrency() float64
func (*AzureDevopsClient) GetRequestCount ¶
func (c *AzureDevopsClient) GetRequestCount() float64
func (*AzureDevopsClient) GetResourceUsageAgent ¶
func (c *AzureDevopsClient) GetResourceUsageAgent() (ret ResourceUsageAgent, error error)
func (*AzureDevopsClient) GetResourceUsageBuild ¶
func (c *AzureDevopsClient) GetResourceUsageBuild() (ret ResourceUsageBuild, error error)
func (*AzureDevopsClient) GetWorkItem ¶
func (c *AzureDevopsClient) GetWorkItem(workItemUrl string) (workItem WorkItem, error error)
func (*AzureDevopsClient) Init ¶
func (c *AzureDevopsClient) Init()
func (*AzureDevopsClient) ListAgentPoolAgents ¶
func (c *AzureDevopsClient) ListAgentPoolAgents(agentPoolId int64) (list AgentPoolAgentList, error error)
func (*AzureDevopsClient) ListAgentPoolJobs ¶
func (c *AzureDevopsClient) ListAgentPoolJobs(agentPoolId int64) (list AgentPoolJobList, error error)
func (*AzureDevopsClient) ListAgentPools ¶
func (c *AzureDevopsClient) ListAgentPools() (list AgentPoolList, error error)
func (*AzureDevopsClient) ListAgentQueues ¶
func (c *AzureDevopsClient) ListAgentQueues(project string) (list AgentQueueList, error error)
func (*AzureDevopsClient) ListBuildDefinitions ¶
func (c *AzureDevopsClient) ListBuildDefinitions(project string) (list BuildDefinitionList, error error)
func (*AzureDevopsClient) ListBuildHistory ¶
func (*AzureDevopsClient) ListBuildHistoryWithStatus ¶
func (*AzureDevopsClient) ListBuildTags ¶
func (c *AzureDevopsClient) ListBuildTags(project string, buildID string) (list TagList, error error)
func (*AzureDevopsClient) ListBuildTimeline ¶
func (c *AzureDevopsClient) ListBuildTimeline(project string, buildID string) (list TimelineRecordList, error error)
func (*AzureDevopsClient) ListBuilds ¶
func (c *AzureDevopsClient) ListBuilds(project string) (list BuildList, error error)
func (*AzureDevopsClient) ListCommits ¶
func (c *AzureDevopsClient) ListCommits(project string, repository string, fromDate time.Time) (list RepositoryCommitList, error error)
func (*AzureDevopsClient) ListLatestBuilds ¶
func (c *AzureDevopsClient) ListLatestBuilds(project string) (list BuildList, error error)
func (*AzureDevopsClient) ListProjects ¶
func (c *AzureDevopsClient) ListProjects() (list ProjectList, error error)
func (*AzureDevopsClient) ListPullrequest ¶
func (c *AzureDevopsClient) ListPullrequest(project, repositoryId string) (list PullRequestList, error error)
func (*AzureDevopsClient) ListPushes ¶
func (c *AzureDevopsClient) ListPushes(project string, repository string, fromDate time.Time) (list RepositoryPushList, error error)
func (*AzureDevopsClient) ListReleaseDefinitions ¶
func (c *AzureDevopsClient) ListReleaseDefinitions(project string) (list ReleaseDefinitionList, error error)
func (*AzureDevopsClient) ListReleaseDeployments ¶
func (c *AzureDevopsClient) ListReleaseDeployments(project string, releaseDefinitionId int64) (list ReleaseDeploymentList, error error)
func (*AzureDevopsClient) ListReleaseHistory ¶
func (c *AzureDevopsClient) ListReleaseHistory(project string, minTime time.Time) (list ReleaseList, error error)
func (*AzureDevopsClient) ListReleases ¶
func (c *AzureDevopsClient) ListReleases(project string, releaseDefinitionId int64) (list ReleaseList, error error)
func (*AzureDevopsClient) ListRepositories ¶
func (c *AzureDevopsClient) ListRepositories(project string) (list RepositoryList, error error)
func (*AzureDevopsClient) QueryWorkItems ¶
func (c *AzureDevopsClient) QueryWorkItems(queryPath, projectId string) (list WorkItemInfoList, error error)
func (*AzureDevopsClient) SetAccessToken ¶
func (c *AzureDevopsClient) SetAccessToken(token string)
func (*AzureDevopsClient) SetApiVersion ¶
func (c *AzureDevopsClient) SetApiVersion(apiversion string)
func (*AzureDevopsClient) SetConcurrency ¶
func (c *AzureDevopsClient) SetConcurrency(v int64)
func (*AzureDevopsClient) SetOrganization ¶
func (c *AzureDevopsClient) SetOrganization(url string)
func (*AzureDevopsClient) SetRetries ¶
func (c *AzureDevopsClient) SetRetries(v int)
func (*AzureDevopsClient) SetUserAgent ¶
func (c *AzureDevopsClient) SetUserAgent(v string)
func (*AzureDevopsClient) SupportsPatAuthentication ¶
func (c *AzureDevopsClient) SupportsPatAuthentication() bool
func (*AzureDevopsClient) UseAzAuth ¶
func (c *AzureDevopsClient) UseAzAuth() error
type Build ¶
type Build struct { Id int64 `json:"id"` BuildNumber string `json:"buildNumber"` BuildNumberRevision int64 `json:"buildNumberRevision"` Quality string `json:"quality"` Definition BuildDefinition Project Project Queue AgentPoolQueue Reason string Result string Status string QueueTime time.Time QueuePosition string StartTime time.Time FinishTime time.Time Uri string Url string SourceBranch string SourceVersion string RequestedBy IdentifyRef RequestedFor IdentifyRef Links Links `json:"_links"` }
func (*Build) QueueDuration ¶
type BuildDefinition ¶
type BuildDefinitionList ¶
type BuildDefinitionList struct { Count int `json:"count"` List []BuildDefinition `json:"value"` }
type EntraIdErrorResponse ¶
type EntraIdToken ¶
type IdentifyRef ¶
type JobRequest ¶
type JobRequest struct { RequestId int64 Demands []string QueueTime time.Time AssignTime *time.Time ReceiveTime time.Time LockedUntil time.Time ServiceOwner string HostId string ScopeId string PlanType string PlanId string JobId string Definition struct { Id int64 Name string Links Links `json:"_links"` } }
type Project ¶
type Project struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Url string `json:"url"` State string `json:"state"` WellFormed string `json:"wellFormed"` Revision int64 `json:"revision"` Visibility string `json:"visibility"` RepositoryList RepositoryList }
type ProjectList ¶
type PullRequest ¶
type PullRequest struct { Id int64 `json:"pullRequestId"` CodeReviewId int64 `json:"codeReviewId"` Title string Description string Uri string Url string CreatedBy IdentifyRef SourceRefName string TargetRefName string Reviewers []PullRequestReviewer Labels []PullRequestLabels Status string `json:"status"` CreationDate time.Time ClosedDate time.Time IsDraft bool Links Links `json:"_links"` }
func (*PullRequest) GetVoteSummary ¶
func (v *PullRequest) GetVoteSummary() PullRequestVoteSummary
type PullRequestLabels ¶
type PullRequestList ¶
type PullRequestList struct { Count int `json:"count"` List []PullRequest `json:"value"` }
type PullRequestReviewer ¶
type PullRequestVoteSummary ¶
type PullRequestVoteSummary struct { Approved int64 ApprovedSuggestions int64 None int64 WaitingForAuthor int64 Rejected int64 Count int64 }
func (*PullRequestVoteSummary) HumanizeString ¶
func (v *PullRequestVoteSummary) HumanizeString() (status string)
type Release ¶
type Release struct { Id int64 `json:"id"` Name string `json:"name"` Definition struct { Id int64 `json:"id"` Name string `json:"name"` Links Links `json:"_links"` } `json:"releaseDefinition"` Project Project `json:"projectReference"` Queue AgentPoolQueue `json:"queue"` Reason string `json:"reason"` Result bool `json:"result"` Status string `json:"status"` CreatedOn time.Time `json:"createdOn"` QueueTime time.Time `json:"queueTime"` QueuePosition string `json:"queuePosition"` StartTime time.Time `json:"startTime"` FinishTime time.Time `json:"finishTime"` Uri string `json:"uri"` Url string `json:"url"` Artifacts []ReleaseArtifact `json:"artifacts"` Environments []ReleaseEnvironment `json:"environments"` RequestedBy IdentifyRef `json:"requestedBy"` RequestedFor IdentifyRef `json:"requestedFor"` Links Links `json:"_links"` }
func (*Release) QueueDuration ¶
type ReleaseArtifact ¶
type ReleaseArtifact struct { SourceId string `json:"sourceId"` Type string `json:"type"` Alias string `json:"alias"` DefinitionReference struct { Definition struct { Id string Name string } Project struct { Id string Name string } Repository struct { Id string Name string } Version struct { Id string Name string } Branch struct { Id string Name string } } `json:"definitionReference"` }
type ReleaseDefinition ¶
type ReleaseDefinitionList ¶
type ReleaseDefinitionList struct { Count int `json:"count"` List []ReleaseDefinition `json:"value"` }
type ReleaseDeployment ¶
type ReleaseDeployment struct { Id int64 `json:"id"` Name string Release struct { Id int64 Name string Links Links `json:"_links"` } `json:"release"` ReleaseDefinition struct { Id int64 Name string Path string } `json:"releaseDefinition"` Artifacts []ReleaseArtifact ReleaseEnvironment ReleaseDeploymentEnvironment PreDeployApprovals []ReleaseEnvironmentApproval PostDeployApprovals []ReleaseEnvironmentApproval Reason string DeploymentStatus string OperationStatus string Attempt int64 // sometimes dates are not valid here QueuedOn string `json:"queuedOn,omitempty"` StartedOn string `json:"startedOn,omitempty"` CompletedOn string `json:"completedOn,omitempty"` RequestedBy IdentifyRef RequestedFor IdentifyRef Links Links `json:"_links"` }
func (*ReleaseDeployment) ApprovedBy ¶
func (d *ReleaseDeployment) ApprovedBy() string
func (*ReleaseDeployment) CompletedOnTime ¶
func (d *ReleaseDeployment) CompletedOnTime() *time.Time
func (*ReleaseDeployment) QueuedOnTime ¶
func (d *ReleaseDeployment) QueuedOnTime() *time.Time
func (*ReleaseDeployment) StartedOnTime ¶
func (d *ReleaseDeployment) StartedOnTime() *time.Time
type ReleaseDeploymentList ¶
type ReleaseDeploymentList struct { Count int `json:"count"` List []ReleaseDeployment `json:"value"` }
type ReleaseEnvironment ¶
type ReleaseEnvironment struct { Id int64 `json:"id"` ReleaseId int64 `json:"releaseId"` DefinitionEnvironmentId int64 `json:"definitionEnvironmentId"` Name string `json:"name"` Status string `json:"status"` Rank int64 `json:"rank"` TriggerReason string `json:"triggerReason"` DeploySteps []ReleaseEnvironmentDeployStep `json:"deploySteps"` PreDeployApprovals []ReleaseEnvironmentApproval `json:"preDeployApprovals"` PostDeployApprovals []ReleaseEnvironmentApproval `json:"postDeployApprovals"` CreatedOn time.Time `json:"createdOn"` QueuedOn time.Time `json:"queuedOn"` LastModifiedOn time.Time `json:"lastModifiedOn"` TimeToDeploy float64 `json:"timeToDeploy"` }
type ReleaseEnvironmentApproval ¶
type ReleaseEnvironmentApproval struct { Id int64 Revision int64 ApprovalType string Status string Comments string IsAutomated bool IsNotificationOn bool TrialNumber int64 `json:"trialNumber"` Attempt int64 `json:"attempt"` Rank int64 `json:"rank"` Approver IdentifyRef `json:"approver"` ApprovedBy IdentifyRef `json:"approvedBy"` CreatedOn time.Time `json:"createdOn"` ModifiedOn time.Time `json:"modifiedOn"` }
type ReleaseList ¶
type Repository ¶
type Repository struct { Id string Name string Url string State string WellFormed string Revision int64 Visibility string Size int64 IsDisabled *bool `json:"isDisabled"` Links Links `json:"_links"` }
func (*Repository) Disabled ¶
func (r *Repository) Disabled() (ret bool)
type RepositoryCommit ¶
type RepositoryCommitList ¶
type RepositoryCommitList struct { Count int `json:"count"` List []RepositoryCommit `json:"value"` }
type RepositoryList ¶
type RepositoryList struct { Count int `json:"count"` List []Repository `json:"value"` }
type RepositoryPush ¶
type RepositoryPush struct {
PushId int64
}
type RepositoryPushList ¶
type RepositoryPushList struct { Count int `json:"count"` List []RepositoryPush `json:"value"` }
type ResourceUsageAgent ¶
type ResourceUsageAgent struct { Data struct { Provider struct { IncludeResourceLimitsSection bool `json:"includeResourceLimitsSection"` IncludeConcurrentJobsSection bool `json:"includeConcurrentJobsSection"` ResourceUsages []ResourceUsageAgentUsageRow `json:"resourceUsages"` TaskHubLicenseDetails struct { FreeLicenseCount *float64 `json:"freeLicenseCount"` FreeHostedLicenseCount *float64 `json:"freeHostedLicenseCount"` EnterpriseUsersCount *float64 `json:"enterpriseUsersCount"` PurchasedLicenseCount *float64 `json:"purchasedLicenseCount"` PurchasedHostedLicenseCount *float64 `json:"purchasedHostedLicenseCount"` HostedLicensesArePremium bool `json:"hostedLicensesArePremium"` TotalLicenseCount *float64 `json:"totalLicenseCount"` HasLicenseCountEverUpdated bool `json:"hasLicenseCountEverUpdated"` MsdnUsersCount *float64 `json:"msdnUsersCount"` HostedAgentMinutesFreeCount *float64 `json:"hostedAgentMinutesFreeCount"` HostedAgentMinutesUsedCount *float64 `json:"hostedAgentMinutesUsedCount"` FailedToReachAllProviders bool `json:"failedToReachAllProviders"` TotalPrivateLicenseCount *float64 `json:"totalPrivateLicenseCount"` TotalHostedLicenseCount *float64 `json:"totalHostedLicenseCount"` } `json:"taskHubLicenseDetails"` } `json:"ms.vss-build-web.build-queue-hub-data-provider"` } `json:"data"` }
type ResourceUsageAgentUsageRow ¶
type ResourceUsageAgentUsageRow struct { ResourceLimit struct { ResourceLimitsData struct { FreeCount string `json:"freeCount"` PurchasedCount string `json:"purchasedCount"` } `json:"resourceLimitsData"` HostId string `json:"hostId"` ParallelismTag string `json:"parallelismTag"` IsHosted bool `json:"isHosted"` TotalCount float64 `json:"totalCount"` IsPremium bool `json:"IsPremium"` } `json:"resourceLimit"` }
type ResourceUsageBuild ¶
type TimelineRecord ¶
type TimelineRecord struct { RecordType string `json:"type"` Name string `json:"name"` Id string `json:"id"` ParentId string `json:"parentId"` ErrorCount float64 `json:"errorCount"` WarningCount float64 `json:"warningCount"` Result string `json:"result"` WorkerName string `json:"workerName"` Identifier string `json:"identifier"` StartTime time.Time FinishTime time.Time }
type TimelineRecordList ¶
type TimelineRecordList struct {
List []TimelineRecord `json:"records"`
}
type WorkItem ¶
type WorkItem struct { Id int64 `json:"id"` Fields WorkItemFields `json:"fields"` }
type WorkItemFields ¶
type WorkItemFields struct { Title string `json:"System.Title"` Path string `json:"System.AreaPath"` CreatedDate string `json:"System.CreatedDate"` AcceptedDate string `json:"Microsoft.VSTS.CodeReview.AcceptedDate"` ResolvedDate string `json:"Microsoft.VSTS.Common.ResolvedDate"` ClosedDate string `json:"Microsoft.VSTS.Common.ClosedDate"` }
type WorkItemInfo ¶
type WorkItemInfoList ¶
type WorkItemInfoList struct {
List []WorkItemInfo `json:"workItems"`
}
Click to show internal directories.
Click to hide internal directories.