ado

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AzureDevOpsBaseUrl = "https://dev.azure.com/"
View Source
var AzureDevopsApiVersion = "api-version=7.2-preview.1"

Functions

func CreateBasicAuthHeaderValue

func CreateBasicAuthHeaderValue(username string, password string) string

func DownloadPackerHostLogs added in v0.1.15

func DownloadPackerHostLogs(downloadPathParam *string) (downloadPath string, dlFileCount int)

Downloads default to $HOME/.config/cld/cache/aib-logs if nil passed into function for downloadPathParam

func GetPipelines

func GetPipelines(org string, project string, pat string) []byte

Types

type ListProjectsResponse

type ListProjectsResponse struct {
	Value             []Project
	ContinuationToken string
}

type Pipeline

type Pipeline struct {
	Name    string        `json:"name"`
	ID      int           `json:"id"`
	Project string        `json:"project"`
	Folder  string        `json:"folder"`
	WebUrl  string        `json:"webUrl"`
	Runs    []PipelineRun `json:"runs"`
}

func (*Pipeline) GetRuns

func (pipeline *Pipeline) GetRuns(ctx context.Context, connection *azuredevops.Connection) []PipelineRun

type PipelineResponse

type PipelineResponse struct {
	Links struct {
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
		Web struct {
			Href string `json:"href"`
		} `json:"web"`
	} `json:"_links"`
	Folder   string  `json:"folder"`
	ID       int     `json:"id"`
	Name     string  `json:"name"`
	Revision float64 `json:"revision"`
	URL      string  `json:"url"`
}

type PipelineRun

type PipelineRun struct {
	Name         string    `json:"name"`
	ID           int       `json:"id"`
	CreatedDate  time.Time `json:"createdDate"`
	FinishedDate time.Time `json:"finishedDate"`
	Result       string    `json:"result"`
	State        string    `json:"state"`
	WebUrl       string    `json:"webUrl"`
	Pipeline     struct {
		Name    string `json:"name"`
		ID      int    `json:"id"`
		Project string `json:"project"`
		Folder  string `json:"folder"`
		WebUrl  string `json:"webUrl"`
	}
}

type PipelineRunResponse

type PipelineRunResponse struct {
	Links struct {
		Pipeline struct {
			Href string `json:"href"`
		} `json:"pipeline"`
		Pipeline_Web struct {
			Href string `json:"href"`
		} `json:"pipeline.web"`
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
		Web struct {
			Href string `json:"href"`
		} `json:"web"`
	} `json:"_links"`
	CreatedDate  time.Time `json:"createdDate"`
	FinishedDate time.Time `json:"finishedDate"`
	ID           int       `json:"id"`
	Name         string    `json:"name"`
	Pipeline     struct {
		Folder   string `json:"folder"`
		ID       int    `json:"id"`
		Name     string `json:"name"`
		Revision int    `json:"revision"`
		WebUrl   string `json:"url"`
	} `json:"pipeline"`
	Result             string   `json:"result"`
	State              string   `json:"state"`
	TemplateParameters struct{} `json:"templateParameters"`
	WebUrl             string   `json:"url"`
}

type Project

type Project struct {
	ID             string    `json:"id"`
	LastUpdateTime time.Time `json:"lastUpdateTime"`
	Name           string    `json:"name"`
	Revision       float64   `json:"revision"`
	State          string    `json:"state"`
	URL            string    `json:"url"`
	Visibility     string    `json:"visibility"`
}

func (*Project) GetPipelines

func (project *Project) GetPipelines(ctx context.Context, connection *azuredevops.Connection) []Pipeline

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳