Documentation
¶
Index ¶
- Variables
- type Client
- type ClientImpl
- func (client *ClientImpl) CreatePipeline(ctx context.Context, args CreatePipelineArgs) (*Pipeline, 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) (*ListPipelinesResponseValue, error)
- func (client *ClientImpl) ListRuns(ctx context.Context, args ListRunsArgs) (*[]Run, error)
- func (client *ClientImpl) RunPipeline(ctx context.Context, args RunPipelineArgs) (*Run, error)
- type ConfigurationType
- type CreatePipelineArgs
- type CreatePipelineConfigurationParameters
- type CreatePipelineParameters
- type GetLogArgs
- type GetLogExpandOptions
- type GetPipelineArgs
- type GetRunArgs
- type ListLogsArgs
- type ListPipelinesArgs
- type ListPipelinesResponseValue
- type ListRunsArgs
- type Log
- type LogCollection
- type Pipeline
- type PipelineBase
- type PipelineConfiguration
- type PipelineReference
- 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 Variable
Constants ¶
This section is empty.
Variables ¶
var ConfigurationTypeValues = configurationTypeValuesType{
Unknown: "unknown",
Yaml: "yaml",
DesignerJson: "designerJson",
JustInTime: "justInTime",
DesignerHyphenJson: "designerHyphenJson",
}
var GetLogExpandOptionsValues = getLogExpandOptionsValuesType{
None: "none",
SignedContent: "signedContent",
}
var RepositoryTypeValues = repositoryTypeValuesType{
Unknown: "unknown",
GitHub: "gitHub",
AzureReposGit: "azureReposGit",
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 Client ¶
type Client interface {
// [Preview API]
CreatePipeline(context.Context, CreatePipelineArgs) (*Pipeline, error)
// [Preview API]
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]
ListLogs(context.Context, ListLogsArgs) (*LogCollection, error)
// [Preview API] Gets a list of pipelines.
ListPipelines(context.Context, ListPipelinesArgs) (*ListPipelinesResponseValue, error)
// [Preview API] Gets top 10000 runs for a particular pipeline.
ListRuns(context.Context, ListRunsArgs) (*[]Run, error)
// [Preview API] Runs a pipeline.
RunPipeline(context.Context, RunPipelineArgs) (*Run, error)
}
func NewClient ¶
func NewClient(ctx context.Context, connection *azuredevops.Connection) Client
type ClientImpl ¶
type ClientImpl struct {
Client azuredevops.Client
}
func (*ClientImpl) CreatePipeline ¶
func (client *ClientImpl) CreatePipeline(ctx context.Context, args CreatePipelineArgs) (*Pipeline, error)
[Preview API]
func (*ClientImpl) GetLog ¶
func (client *ClientImpl) GetLog(ctx context.Context, args GetLogArgs) (*Log, error)
[Preview API]
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]
func (*ClientImpl) ListPipelines ¶
func (client *ClientImpl) ListPipelines(ctx context.Context, args ListPipelinesArgs) (*ListPipelinesResponseValue, error)
[Preview API] Gets 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) RunPipeline ¶
func (client *ClientImpl) RunPipeline(ctx context.Context, args RunPipelineArgs) (*Run, error)
[Preview API] Runs a pipeline.
type ConfigurationType ¶
type ConfigurationType string
type CreatePipelineArgs ¶
type CreatePipelineArgs struct {
// (required)
InputParameters *CreatePipelineParameters
// (required) Project ID or project name
Project *string
}
Arguments for the CreatePipeline function
type CreatePipelineConfigurationParameters ¶
type CreatePipelineConfigurationParameters struct {
Type *ConfigurationType `json:"type,omitempty"`
}
type CreatePipelineParameters ¶
type CreatePipelineParameters struct {
Configuration *CreatePipelineConfigurationParameters `json:"configuration,omitempty"`
Folder *string `json:"folder,omitempty"`
Name *string `json:"name,omitempty"`
}
type GetLogArgs ¶
type GetLogArgs struct {
// (required) Project ID or project name
Project *string
// (required)
PipelineId *int
// (required)
RunId *int
// (required)
LogId *int
// (optional)
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)
PipelineId *int
// (required)
RunId *int
// (optional)
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 ListPipelinesResponseValue ¶
type ListPipelinesResponseValue struct {
Value []Pipeline
// The continuation token to be used to get the next page of results.
ContinuationToken string
}
Return type 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"`
}
type LogCollection ¶
type Pipeline ¶
type Pipeline struct {
Folder *string `json:"folder,omitempty"`
Id *int `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Revision *int `json:"revision,omitempty"`
Links interface{} `json:"_links,omitempty"`
Configuration *PipelineConfiguration `json:"configuration,omitempty"`
Url *string `json:"url,omitempty"`
}
type PipelineBase ¶
type PipelineConfiguration ¶
type PipelineConfiguration struct {
Type *ConfigurationType `json:"type,omitempty"`
}
type PipelineReference ¶
type PipelineReference struct {
Folder *string `json:"folder,omitempty"`
Id *int `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Revision *int `json:"revision,omitempty"`
Url *string `json:"url,omitempty"`
}
A reference to a Pipeline.
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"`
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"`
Url *string `json:"url,omitempty"`
Variables *map[string]Variable `json:"variables,omitempty"`
}
type RunPipelineArgs ¶
type RunPipelineArgs struct {
// (required) Optional.
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 {
// Deprecated: Use Context instead
Resources *RunResourcesParameters `json:"resources,omitempty"`
Secrets *map[string]string `json:"secrets,omitempty"`
Variables *map[string]Variable `json:"variables,omitempty"`
}
type RunReference ¶
type RunResources ¶
type RunResources struct {
Repositories *map[string]RepositoryResource `json:"repositories,omitempty"`
}
type RunResourcesParameters ¶
type RunResourcesParameters struct {
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.