Documentation
¶
Index ¶
- Variables
- type Artifact
- type BuildResourceParameters
- type Client
- type ClientImpl
- func (client *ClientImpl) CreatePipeline(ctx context.Context, args CreatePipelineArgs) (*Pipeline, error)
- func (client *ClientImpl) GetArtifact(ctx context.Context, args GetArtifactArgs) (*Artifact, error)
- func (client *ClientImpl) GetLog(ctx context.Context, args GetLogArgs) (*Log, error)
- func (client *ClientImpl) GetPipeline(ctx context.Context, args GetPipelineArgs) (*Pipeline, error)
- func (client *ClientImpl) GetRun(ctx context.Context, args GetRunArgs) (*Run, error)
- func (client *ClientImpl) ListLogs(ctx context.Context, args ListLogsArgs) (*LogCollection, error)
- func (client *ClientImpl) ListPipelines(ctx context.Context, args ListPipelinesArgs) (*[]Pipeline, error)
- func (client *ClientImpl) ListRuns(ctx context.Context, args ListRunsArgs) (*[]Run, error)
- func (client *ClientImpl) Preview(ctx context.Context, args PreviewArgs) (*PreviewRun, error)
- func (client *ClientImpl) RunPipeline(ctx context.Context, args RunPipelineArgs) (*Run, error)
- type ConfigurationType
- type Container
- type ContainerResource
- type ContainerResourceParameters
- type CreatePipelineArgs
- type CreatePipelineConfigurationParameters
- type CreatePipelineParameters
- type GetArtifactArgs
- type GetArtifactExpandOptions
- type GetLogArgs
- type GetLogExpandOptions
- type GetPipelineArgs
- type GetRunArgs
- type ListLogsArgs
- type ListPipelinesArgs
- type ListRunsArgs
- type Log
- type LogCollection
- type PackageResourceParameters
- type Pipeline
- type PipelineBase
- type PipelineConfiguration
- type PipelineReference
- type PipelineResource
- type PipelineResourceParameters
- type PreviewArgs
- type PreviewRun
- type Repository
- type RepositoryResource
- type RepositoryResourceParameters
- type RepositoryType
- type Run
- type RunPipelineArgs
- type RunPipelineParameters
- type RunReference
- type RunResources
- type RunResourcesParameters
- type RunResult
- type RunState
- type SignalRConnection
- type Variable
Constants ¶
This section is empty.
Variables ¶
var ConfigurationTypeValues = configurationTypeValuesType{
Unknown: "unknown",
Yaml: "yaml",
DesignerJson: "designerJson",
JustInTime: "justInTime",
DesignerHyphenJson: "designerHyphenJson",
}
var GetArtifactExpandOptionsValues = getArtifactExpandOptionsValuesType{
None: "none",
SignedContent: "signedContent",
}
var GetLogExpandOptionsValues = getLogExpandOptionsValuesType{
None: "none",
SignedContent: "signedContent",
}
var RepositoryTypeValues = repositoryTypeValuesType{
Unknown: "unknown",
GitHub: "gitHub",
AzureReposGit: "azureReposGit",
GitHubEnterprise: "gitHubEnterprise",
AzureReposGitHyphenated: "azureReposGitHyphenated",
}
var RunResultValues = runResultValuesType{
Unknown: "unknown",
Succeeded: "succeeded",
Failed: "failed",
Canceled: "canceled",
}
var RunStateValues = runStateValuesType{
Unknown: "unknown",
InProgress: "inProgress",
Canceling: "canceling",
Completed: "completed",
}
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
// The name of the artifact.
Name *string `json:"name,omitempty"`
// Signed url for downloading this artifact
SignedContent *webapi.SignedUrl `json:"signedContent,omitempty"`
// Self-referential url
Url *string `json:"url,omitempty"`
}
Artifacts are collections of files produced by a pipeline. Use artifacts to share files between stages in a pipeline or between different pipelines.
type BuildResourceParameters ¶
type BuildResourceParameters struct {
Version *string `json:"version,omitempty"`
}
type Client ¶
type Client interface {
// [Preview API] Create a pipeline.
CreatePipeline(context.Context, CreatePipelineArgs) (*Pipeline, error)
// [Preview API] Get a specific artifact from a pipeline run
GetArtifact(context.Context, GetArtifactArgs) (*Artifact, error)
// [Preview API] Get a specific log from a pipeline run
GetLog(context.Context, GetLogArgs) (*Log, error)
// [Preview API] Gets a pipeline, optionally at the specified version
GetPipeline(context.Context, GetPipelineArgs) (*Pipeline, error)
// [Preview API] Gets a run for a particular pipeline.
GetRun(context.Context, GetRunArgs) (*Run, error)
// [Preview API] Get a list of logs from a pipeline run.
ListLogs(context.Context, ListLogsArgs) (*LogCollection, error)
// [Preview API] Get a list of pipelines.
ListPipelines(context.Context, ListPipelinesArgs) (*[]Pipeline, error)
// [Preview API] Gets top 10000 runs for a particular pipeline.
ListRuns(context.Context, ListRunsArgs) (*[]Run, error)
// [Preview API] Queues a dry run of the pipeline and returns an object containing the final yaml.
Preview(context.Context, PreviewArgs) (*PreviewRun, error)
// [Preview API] Runs a pipeline.
RunPipeline(context.Context, RunPipelineArgs) (*Run, error)
}
type ClientImpl ¶
type ClientImpl struct {
Client azuredevops.Client
}
func (*ClientImpl) CreatePipeline ¶
func (client *ClientImpl) CreatePipeline(ctx context.Context, args CreatePipelineArgs) (*Pipeline, error)
[Preview API] Create a pipeline.
func (*ClientImpl) GetArtifact ¶
func (client *ClientImpl) GetArtifact(ctx context.Context, args GetArtifactArgs) (*Artifact, error)
[Preview API] Get a specific artifact from a pipeline run
func (*ClientImpl) GetLog ¶
func (client *ClientImpl) GetLog(ctx context.Context, args GetLogArgs) (*Log, error)
[Preview API] Get a specific log from a pipeline run
func (*ClientImpl) GetPipeline ¶
func (client *ClientImpl) GetPipeline(ctx context.Context, args GetPipelineArgs) (*Pipeline, error)
[Preview API] Gets a pipeline, optionally at the specified version
func (*ClientImpl) GetRun ¶
func (client *ClientImpl) GetRun(ctx context.Context, args GetRunArgs) (*Run, error)
[Preview API] Gets a run for a particular pipeline.
func (*ClientImpl) ListLogs ¶
func (client *ClientImpl) ListLogs(ctx context.Context, args ListLogsArgs) (*LogCollection, error)
[Preview API] Get a list of logs from a pipeline run.
func (*ClientImpl) ListPipelines ¶
func (client *ClientImpl) ListPipelines(ctx context.Context, args ListPipelinesArgs) (*[]Pipeline, error)
[Preview API] Get a list of pipelines.
func (*ClientImpl) ListRuns ¶
func (client *ClientImpl) ListRuns(ctx context.Context, args ListRunsArgs) (*[]Run, error)
[Preview API] Gets top 10000 runs for a particular pipeline.
func (*ClientImpl) Preview ¶
func (client *ClientImpl) Preview(ctx context.Context, args PreviewArgs) (*PreviewRun, error)
[Preview API] Queues a dry run of the pipeline and returns an object containing the final yaml.
func (*ClientImpl) RunPipeline ¶
func (client *ClientImpl) RunPipeline(ctx context.Context, args RunPipelineArgs) (*Run, error)
[Preview API] Runs a pipeline.
type ConfigurationType ¶
type ConfigurationType string
type Container ¶
type Container struct {
Environment *map[string]string `json:"environment,omitempty"`
Image *string `json:"image,omitempty"`
MapDockerSocket *bool `json:"mapDockerSocket,omitempty"`
Options *string `json:"options,omitempty"`
Ports *[]string `json:"ports,omitempty"`
Volumes *[]string `json:"volumes,omitempty"`
}
type ContainerResource ¶
type ContainerResource struct {
Container *Container `json:"container,omitempty"`
}
type ContainerResourceParameters ¶
type ContainerResourceParameters struct {
Version *string `json:"version,omitempty"`
}
type CreatePipelineArgs ¶
type CreatePipelineArgs struct {
// (required) Input parameters.
InputParameters *CreatePipelineParameters
// (required) Project ID or project name
Project *string
}
Arguments for the CreatePipeline function
type CreatePipelineConfigurationParameters ¶
type CreatePipelineConfigurationParameters struct {
// Type of configuration.
Type *ConfigurationType `json:"type,omitempty"`
}
Configuration parameters of the pipeline.
type CreatePipelineParameters ¶
type CreatePipelineParameters struct {
// Configuration parameters of the pipeline.
Configuration *CreatePipelineConfigurationParameters `json:"configuration,omitempty"`
// Folder of the pipeline.
Folder *string `json:"folder,omitempty"`
// Name of the pipeline.
Name *string `json:"name,omitempty"`
}
Parameters to create a pipeline.
type GetArtifactArgs ¶
type GetArtifactArgs struct {
// (required) Project ID or project name
Project *string
// (required) ID of the pipeline.
PipelineId *int
// (required) ID of the run of that pipeline.
RunId *int
// (required) Name of the artifact.
ArtifactName *string
// (optional) Expand options. Default is None.
Expand *GetArtifactExpandOptions
}
Arguments for the GetArtifact function
type GetArtifactExpandOptions ¶
type GetArtifactExpandOptions string
[Flags] Expansion options for GetArtifact and ListArtifacts.
type GetLogArgs ¶
type GetLogArgs struct {
// (required) Project ID or project name
Project *string
// (required) ID of the pipeline.
PipelineId *int
// (required) ID of the run of that pipeline.
RunId *int
// (required) ID of the log.
LogId *int
// (optional) Expand options. Default is None.
Expand *GetLogExpandOptions
}
Arguments for the GetLog function
type GetLogExpandOptions ¶
type GetLogExpandOptions string
[Flags] $expand options for GetLog and ListLogs.
type GetPipelineArgs ¶
type GetPipelineArgs struct {
// (required) Project ID or project name
Project *string
// (required) The pipeline ID
PipelineId *int
// (optional) The pipeline version
PipelineVersion *int
}
Arguments for the GetPipeline function
type GetRunArgs ¶
type GetRunArgs struct {
// (required) Project ID or project name
Project *string
// (required) The pipeline id
PipelineId *int
// (required) The run id
RunId *int
}
Arguments for the GetRun function
type ListLogsArgs ¶
type ListLogsArgs struct {
// (required) Project ID or project name
Project *string
// (required) ID of the pipeline.
PipelineId *int
// (required) ID of the run of that pipeline.
RunId *int
// (optional) Expand options. Default is None.
Expand *GetLogExpandOptions
}
Arguments for the ListLogs function
type ListPipelinesArgs ¶
type ListPipelinesArgs struct {
// (required) Project ID or project name
Project *string
// (optional) A sort expression. Defaults to "name asc"
OrderBy *string
// (optional) The maximum number of pipelines to return
Top *int
// (optional) A continuation token from a previous request, to retrieve the next page of results
ContinuationToken *string
}
Arguments for the ListPipelines function
type ListRunsArgs ¶
type ListRunsArgs struct {
// (required) Project ID or project name
Project *string
// (required) The pipeline id
PipelineId *int
}
Arguments for the ListRuns function
type Log ¶
type Log struct {
// The date and time the log was created.
CreatedOn *azuredevops.Time `json:"createdOn,omitempty"`
// The ID of the log.
Id *int `json:"id,omitempty"`
// The date and time the log was last changed.
LastChangedOn *azuredevops.Time `json:"lastChangedOn,omitempty"`
// The number of lines in the log.
LineCount *uint64 `json:"lineCount,omitempty"`
SignedContent *webapi.SignedUrl `json:"signedContent,omitempty"`
Url *string `json:"url,omitempty"`
}
Log for a pipeline.
type LogCollection ¶
type LogCollection struct {
// The list of logs.
Logs *[]Log `json:"logs,omitempty"`
SignedContent *webapi.SignedUrl `json:"signedContent,omitempty"`
// URL of the log.
Url *string `json:"url,omitempty"`
}
A collection of logs.
type PackageResourceParameters ¶
type PackageResourceParameters struct {
Version *string `json:"version,omitempty"`
}
type Pipeline ¶
type Pipeline struct {
// Pipeline folder
Folder *string `json:"folder,omitempty"`
// Pipeline ID
Id *int `json:"id,omitempty"`
// Pipeline name
Name *string `json:"name,omitempty"`
// Revision number
Revision *int `json:"revision,omitempty"`
Links interface{} `json:"_links,omitempty"`
Configuration *PipelineConfiguration `json:"configuration,omitempty"`
// URL of the pipeline
Url *string `json:"url,omitempty"`
}
Definition of a pipeline.
type PipelineBase ¶
type PipelineConfiguration ¶
type PipelineConfiguration struct {
Type *ConfigurationType `json:"type,omitempty"`
}
type PipelineReference ¶
type PipelineReference struct {
// Pipeline folder
Folder *string `json:"folder,omitempty"`
// Pipeline ID
Id *int `json:"id,omitempty"`
// Pipeline name
Name *string `json:"name,omitempty"`
// Revision number
Revision *int `json:"revision,omitempty"`
Url *string `json:"url,omitempty"`
}
A reference to a Pipeline.
type PipelineResource ¶
type PipelineResource struct {
Pipeline *PipelineReference `json:"pipeline,omitempty"`
Version *string `json:"version,omitempty"`
}
type PipelineResourceParameters ¶
type PipelineResourceParameters struct {
Version *string `json:"version,omitempty"`
}
type PreviewArgs ¶
type PreviewArgs struct {
// (required) Optional additional parameters for this run.
RunParameters *RunPipelineParameters
// (required) Project ID or project name
Project *string
// (required) The pipeline ID.
PipelineId *int
// (optional) The pipeline version.
PipelineVersion *int
}
Arguments for the Preview function
type PreviewRun ¶
type PreviewRun struct {
FinalYaml *string `json:"finalYaml,omitempty"`
}
type Repository ¶
type Repository struct {
Type *RepositoryType `json:"type,omitempty"`
}
type RepositoryResource ¶
type RepositoryResource struct {
RefName *string `json:"refName,omitempty"`
Repository *Repository `json:"repository,omitempty"`
Version *string `json:"version,omitempty"`
}
type RepositoryResourceParameters ¶
type RepositoryResourceParameters struct {
RefName *string `json:"refName,omitempty"`
// This is the security token to use when connecting to the repository.
Token *string `json:"token,omitempty"`
// Optional. This is the type of the token given. If not provided, a type of "Bearer" is assumed. Note: Use "Basic" for a PAT token.
TokenType *string `json:"tokenType,omitempty"`
Version *string `json:"version,omitempty"`
}
type RepositoryType ¶
type RepositoryType string
type Run ¶
type Run struct {
Id *int `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Links interface{} `json:"_links,omitempty"`
CreatedDate *azuredevops.Time `json:"createdDate,omitempty"`
FinalYaml *string `json:"finalYaml,omitempty"`
FinishedDate *azuredevops.Time `json:"finishedDate,omitempty"`
Pipeline *PipelineReference `json:"pipeline,omitempty"`
Resources *RunResources `json:"resources,omitempty"`
Result *RunResult `json:"result,omitempty"`
State *RunState `json:"state,omitempty"`
TemplateParameters *map[string]interface{} `json:"templateParameters,omitempty"`
Url *string `json:"url,omitempty"`
Variables *map[string]Variable `json:"variables,omitempty"`
}
type RunPipelineArgs ¶
type RunPipelineArgs struct {
// (required) Optional additional parameters for this run.
RunParameters *RunPipelineParameters
// (required) Project ID or project name
Project *string
// (required) The pipeline ID.
PipelineId *int
// (optional) The pipeline version.
PipelineVersion *int
}
Arguments for the RunPipeline function
type RunPipelineParameters ¶
type RunPipelineParameters struct {
// If true, don't actually create a new run. Instead, return the final YAML document after parsing templates.
PreviewRun *bool `json:"previewRun,omitempty"`
// The resources the run requires.
Resources *RunResourcesParameters `json:"resources,omitempty"`
StagesToSkip *[]string `json:"stagesToSkip,omitempty"`
TemplateParameters *map[string]string `json:"templateParameters,omitempty"`
Variables *map[string]Variable `json:"variables,omitempty"`
// If you use the preview run option, you may optionally supply different YAML. This allows you to preview the final YAML document without committing a changed file.
YamlOverride *string `json:"yamlOverride,omitempty"`
}
Settings which influence pipeline runs.
type RunReference ¶
type RunResources ¶
type RunResources struct {
Containers *map[string]ContainerResource `json:"containers,omitempty"`
Pipelines *map[string]PipelineResource `json:"pipelines,omitempty"`
Repositories *map[string]RepositoryResource `json:"repositories,omitempty"`
}
type RunResourcesParameters ¶
type RunResourcesParameters struct {
Builds *map[string]BuildResourceParameters `json:"builds,omitempty"`
Containers *map[string]ContainerResourceParameters `json:"containers,omitempty"`
Packages *map[string]PackageResourceParameters `json:"packages,omitempty"`
Pipelines *map[string]PipelineResourceParameters `json:"pipelines,omitempty"`
Repositories *map[string]RepositoryResourceParameters `json:"repositories,omitempty"`
}
type RunResult ¶
type RunResult string
This is not a Flags enum because we don't want to set multiple results on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple results.
type RunState ¶
type RunState string
This is not a Flags enum because we don't want to set multiple states on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple states.