azure

package
v0.0.0-...-e6a9d9d Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PipelinesAppID = int64(9426)

PipelinesAppID is the ID of the Azure Pipelines GitHub app.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes()

RegisterRoutes adds all the api route handlers.

Types

type API

type API interface {
	GetBuildURL(owner, repo string, buildID int64) string
	GetAzureArtifactsURL(owner, repo string, buildID int64) string
	GetBuild(owner, repo string, buildID int64) (*Build, error)
}

API is for Azure Pipelines related requests.

func NewAPI

func NewAPI(ctx context.Context) API

NewAPI returns an implementation of azure API. nolint:ireturn // TODO: Fix ireturn lint error

type ArtifactResource

type ArtifactResource struct {
	Data        string `json:"data"`
	DownloadURL string `json:"downloadUrl"`
	Type        string `json:"type"`
	URL         string `json:"url"`
}

ArtifactResource is a resource for an artifact.

type Build

type Build struct {
	SourceBranch string           `json:"sourceBranch"`
	TriggerInfo  BuildTriggerInfo `json:"triggerInfo"`
}

Build is an Azure Pipelines build object.

func (*Build) IsMasterBranch

func (a *Build) IsMasterBranch() bool

IsMasterBranch returns whether the source branch for the build is the master branch.

type BuildArtifact

type BuildArtifact struct {
	ID       int64            `json:"id"`
	Name     string           `json:"name"`
	Resource ArtifactResource `json:"resource"`
}

BuildArtifact is an artifact published by a build.

type BuildArtifacts

type BuildArtifacts struct {
	Count int64           `json:"count"`
	Value []BuildArtifact `json:"value"`
}

BuildArtifacts is a wrapper for multiple BuildArtifact results.

type BuildTriggerInfo

type BuildTriggerInfo struct {
	SourceBranch string `json:"pr.sourceBranch"`
	SourceSHA    string `json:"pr.sourceSha"`
}

BuildTriggerInfo is information about what triggered the build.

Directories

Path Synopsis
Package mock_azure is a generated GoMock package.
Package mock_azure is a generated GoMock package.

Jump to

Keyboard shortcuts

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