Documentation ¶
Index ¶
- Variables
- type BuildFrameworkDetectionType
- type Client
- type ClientImpl
- func (client *ClientImpl) CreateProjectConnection(ctx context.Context, args CreateProjectConnectionArgs) (*PipelineConnection, error)
- func (client *ClientImpl) CreateResources(ctx context.Context, args CreateResourcesArgs) (*CreatedResources, error)
- func (client *ClientImpl) GetConfigurations(ctx context.Context, args GetConfigurationsArgs) (*[]ConfigurationFile, error)
- func (client *ClientImpl) GetDetectedBuildFrameworks(ctx context.Context, args GetDetectedBuildFrameworksArgs) (*[]DetectedBuildFramework, error)
- func (client *ClientImpl) GetTemplateRecommendations(ctx context.Context, args GetTemplateRecommendationsArgs) (*[]Template, error)
- func (client *ClientImpl) RenderTemplate(ctx context.Context, args RenderTemplateArgs) (*Template, error)
- type ConfigurationFile
- type CreatePipelineConnectionInputs
- type CreateProjectConnectionArgs
- type CreateResourcesArgs
- type CreatedResources
- type DetectedBuildFramework
- type DetectedBuildTarget
- type GetConfigurationsArgs
- type GetDetectedBuildFrameworksArgs
- type GetTemplateRecommendationsArgs
- type PipelineConnection
- type RenderTemplateArgs
- type ResourceCreationParameter
- type Template
- type TemplateAsset
- type TemplateDataSourceBinding
- type TemplateParameterDefinition
- type TemplateParameters
Constants ¶
This section is empty.
Variables ¶
var BuildFrameworkDetectionTypeValues = buildFrameworkDetectionTypeValuesType{
Shallow: "shallow",
Full: "full",
}
Functions ¶
This section is empty.
Types ¶
type BuildFrameworkDetectionType ¶
type BuildFrameworkDetectionType string
type Client ¶
type Client interface { // [Preview API] Creates a new Pipeline connection between the provider installation and the specified project. Returns the PipelineConnection object created. CreateProjectConnection(context.Context, CreateProjectConnectionArgs) (*PipelineConnection, error) // [Preview API] CreateResources(context.Context, CreateResourcesArgs) (*CreatedResources, error) // [Preview API] Gets a list of existing configuration files for the given repository. GetConfigurations(context.Context, GetConfigurationsArgs) (*[]ConfigurationFile, error) // [Preview API] Returns a list of build frameworks that best match the given repository based on its contents. GetDetectedBuildFrameworks(context.Context, GetDetectedBuildFrameworksArgs) (*[]DetectedBuildFramework, error) // [Preview API] Returns a list of all YAML templates with weighting based on which would best fit the given repository. GetTemplateRecommendations(context.Context, GetTemplateRecommendationsArgs) (*[]Template, error) // [Preview API] RenderTemplate(context.Context, RenderTemplateArgs) (*Template, error) }
func NewClient ¶
func NewClient(ctx context.Context, connection *azuredevops.Connection) Client
type ClientImpl ¶
type ClientImpl struct {
Client azuredevops.Client
}
func (*ClientImpl) CreateProjectConnection ¶
func (client *ClientImpl) CreateProjectConnection(ctx context.Context, args CreateProjectConnectionArgs) (*PipelineConnection, error)
[Preview API] Creates a new Pipeline connection between the provider installation and the specified project. Returns the PipelineConnection object created.
func (*ClientImpl) CreateResources ¶
func (client *ClientImpl) CreateResources(ctx context.Context, args CreateResourcesArgs) (*CreatedResources, error)
[Preview API]
func (*ClientImpl) GetConfigurations ¶
func (client *ClientImpl) GetConfigurations(ctx context.Context, args GetConfigurationsArgs) (*[]ConfigurationFile, error)
[Preview API] Gets a list of existing configuration files for the given repository.
func (*ClientImpl) GetDetectedBuildFrameworks ¶
func (client *ClientImpl) GetDetectedBuildFrameworks(ctx context.Context, args GetDetectedBuildFrameworksArgs) (*[]DetectedBuildFramework, error)
[Preview API] Returns a list of build frameworks that best match the given repository based on its contents.
func (*ClientImpl) GetTemplateRecommendations ¶
func (client *ClientImpl) GetTemplateRecommendations(ctx context.Context, args GetTemplateRecommendationsArgs) (*[]Template, error)
[Preview API] Returns a list of all YAML templates with weighting based on which would best fit the given repository.
func (*ClientImpl) RenderTemplate ¶
func (client *ClientImpl) RenderTemplate(ctx context.Context, args RenderTemplateArgs) (*Template, error)
[Preview API]
type ConfigurationFile ¶
type ConfigurationFile struct { // The content of the file. Content *string `json:"content,omitempty"` // Indicates if the content is base64 encoded. IsBase64Encoded *bool `json:"isBase64Encoded,omitempty"` // The full path of the file, relative to the root of the repository. Path *string `json:"path,omitempty"` }
type CreatePipelineConnectionInputs ¶
type CreatePipelineConnectionInputs struct { // The team project settings for an existing team project or for a new team project. Project *core.TeamProject `json:"project,omitempty"` // This dictionary contains information that is specific to the provider. This data is opaque to the rest of the Pipelines infrastructure and does NOT contribute to the resources Token. The format of the string and its contents depend on the implementation of the provider. ProviderData *map[string]string `json:"providerData,omitempty"` // The external source provider id for which the connection is being made. ProviderId *string `json:"providerId,omitempty"` // If provided, this will be the URL returned with the PipelineConnection. This will override any other redirect URL that would have been generated for the connection. RedirectUrl *string `json:"redirectUrl,omitempty"` // Where the request to create the pipeline originated (such as 'GitHub Marketplace' or 'Azure DevOps') RequestSource *string `json:"requestSource,omitempty"` }
This class is used to create a pipeline connection within the team project provided. If the team project does not exist, it will be created.
type CreateProjectConnectionArgs ¶
type CreateProjectConnectionArgs struct { // (required) CreateConnectionInputs *CreatePipelineConnectionInputs // (required) Project *string }
Arguments for the CreateProjectConnection function
type CreateResourcesArgs ¶
type CreateResourcesArgs struct { // (required) CreationParameters *map[string]ResourceCreationParameter // (required) Project ID or project name Project *string }
Arguments for the CreateResources function
type CreatedResources ¶
type CreatedResources struct {
Resources *map[string]interface{} `json:"resources,omitempty"`
}
type DetectedBuildFramework ¶
type DetectedBuildFramework struct { // List of build targets discovered for the framework to act upon. BuildTargets *[]DetectedBuildTarget `json:"buildTargets,omitempty"` // The unique identifier of the build framework. Id *string `json:"id,omitempty"` // Additional detected settings for the build framework. Settings *map[string]string `json:"settings,omitempty"` // The version of the framework if it can be determined from the sources. Version *string `json:"version,omitempty"` }
type DetectedBuildTarget ¶
type GetConfigurationsArgs ¶
type GetConfigurationsArgs struct { // (required) Project ID or project name Project *string // (optional) The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc. RepositoryType *string // (optional) The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos) RepositoryId *string // (optional) The repository branch where to look for the configuration file. Branch *string // (optional) If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TfsGit (i.e. Azure Repos). ServiceConnectionId *uuid.UUID }
Arguments for the GetConfigurations function
type GetDetectedBuildFrameworksArgs ¶
type GetDetectedBuildFrameworksArgs struct { // (required) Project ID or project name Project *string // (optional) The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc. RepositoryType *string // (optional) The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos) RepositoryId *string // (optional) The repository branch to detect build frameworks for. Branch *string // (optional) DetectionType *BuildFrameworkDetectionType // (optional) If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TfsGit (i.e. Azure Repos). ServiceConnectionId *uuid.UUID }
Arguments for the GetDetectedBuildFrameworks function
type GetTemplateRecommendationsArgs ¶
type GetTemplateRecommendationsArgs struct { // (required) Project ID or project name Project *string // (optional) The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc. RepositoryType *string // (optional) The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos) RepositoryId *string // (optional) The repository branch which to find matching templates for. Branch *string // (optional) If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TfsGit (i.e. Azure Repos). ServiceConnectionId *uuid.UUID }
Arguments for the GetTemplateRecommendations function
type PipelineConnection ¶
type PipelineConnection struct { // The account id that contains the team project for the connection. AccountId *uuid.UUID `json:"accountId,omitempty"` // Deprecated: This property is no longer filled in and will be removed soon. DefinitionId *int `json:"definitionId,omitempty"` // This is the URL that the user should be taken to in order to continue setup. RedirectUrl *string `json:"redirectUrl,omitempty"` // The service endpoint that was created for the connection. ServiceEndpointId *uuid.UUID `json:"serviceEndpointId,omitempty"` // The team project that contains the definition for the connection. TeamProjectId *uuid.UUID `json:"teamProjectId,omitempty"` }
type RenderTemplateArgs ¶
type RenderTemplateArgs struct { // (required) TemplateParameters *TemplateParameters // (required) TemplateId *string }
Arguments for the RenderTemplate function
type ResourceCreationParameter ¶
type ResourceCreationParameter struct { ResourceToCreate interface{} `json:"resourceToCreate,omitempty"` Type *string `json:"type,omitempty"` }
type Template ¶
type Template struct { Assets *[]TemplateAsset `json:"assets,omitempty"` Content *string `json:"content,omitempty"` DataSourceBindings *[]TemplateDataSourceBinding `json:"dataSourceBindings,omitempty"` Description *string `json:"description,omitempty"` IconUrl *string `json:"iconUrl,omitempty"` Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Parameters *[]TemplateParameterDefinition `json:"parameters,omitempty"` RecommendedWeight *int `json:"recommendedWeight,omitempty"` }
type TemplateAsset ¶
type TemplateDataSourceBinding ¶
type TemplateDataSourceBinding struct { DataSourceName *string `json:"dataSourceName,omitempty"` EndpointParameterName *string `json:"endpointParameterName,omitempty"` Parameters *map[string]string `json:"parameters,omitempty"` ResultTemplate *string `json:"resultTemplate,omitempty"` Target *string `json:"target,omitempty"` }
type TemplateParameterDefinition ¶
type TemplateParameterDefinition struct { DefaultValue *string `json:"defaultValue,omitempty"` DisplayName *string `json:"displayName,omitempty"` Name *string `json:"name,omitempty"` PossibleValues *[]string `json:"possibleValues,omitempty"` Required *bool `json:"required,omitempty"` Type *string `json:"type,omitempty"` }
type TemplateParameters ¶
type TemplateParameters struct {
Tokens *map[string]interface{} `json:"tokens,omitempty"`
}