pipelines

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PipelinePermissionsResourceTypeEndpoint    = "endpoint"
	PipelinePermissionsResourceTypeEnvironment = "environment"
	PipelinePermissionsResourceTypeQueue       = "queue"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(restClient *networking.RestClient) *Client

func (*Client) CreateAgentPool added in v0.6.0

func (c *Client) CreateAgentPool(ctx context.Context, name string, autoProvision bool, autoUpdate bool) (*TaskAgentPool, error)

func (*Client) CreateAgentQueue added in v0.6.0

func (c *Client) CreateAgentQueue(ctx context.Context, projectId string, poolId int, name string, authorizePipelines bool) (*TaskAgentQueue, error)

func (*Client) CreateEnvironment added in v0.4.1

func (c *Client) CreateEnvironment(ctx context.Context, projectId string, name string, description string) (*EnvironmentInstance, error)

func (*Client) CreateEnvironmentResourceKubernetes added in v0.4.1

func (c *Client) CreateEnvironmentResourceKubernetes(ctx context.Context, projectId string, environmentId int, resource *EnvironmentResourceKubernetes) (*EnvironmentResourceKubernetes, error)

func (*Client) DeleteAgentPool added in v0.6.0

func (c *Client) DeleteAgentPool(ctx context.Context, poolId int) error

func (*Client) DeleteAgentQueue added in v0.6.0

func (c *Client) DeleteAgentQueue(ctx context.Context, projectId string, queueId int) error

func (*Client) DeleteEnvironment added in v0.4.1

func (c *Client) DeleteEnvironment(ctx context.Context, projectId string, id int) error

func (*Client) DeleteEnvironmentResourceKubernetes added in v0.4.1

func (c *Client) DeleteEnvironmentResourceKubernetes(ctx context.Context, projectId string, environmentId int, resourceId int) error

func (*Client) GetAgentPool added in v0.6.0

func (c *Client) GetAgentPool(ctx context.Context, poolId int) (*TaskAgentPool, error)

func (*Client) GetAgentQueue added in v0.6.0

func (c *Client) GetAgentQueue(ctx context.Context, projectId string, queueId int) (*TaskAgentQueue, error)

func (*Client) GetEnvironment added in v0.4.1

func (c *Client) GetEnvironment(ctx context.Context, projectId string, id int) (*EnvironmentInstance, error)

func (*Client) GetEnvironmentResourceKubernetes added in v0.4.1

func (c *Client) GetEnvironmentResourceKubernetes(ctx context.Context, projectId string, environmentId int, resourceId int) (*EnvironmentResourceKubernetes, error)

func (*Client) GetPipelinePermissions

func (c *Client) GetPipelinePermissions(ctx context.Context, projectId string, resourceType string, resourceId string) (*ResourcePipelinePermissions, error)

func (*Client) GetPipelineRetentionSettings

func (c *Client) GetPipelineRetentionSettings(ctx context.Context, projectId string) (*PipelineRetentionSettings, error)

func (*Client) GetPipelineSettings

func (c *Client) GetPipelineSettings(ctx context.Context, projectId string) (*PipelineGeneralSettings, error)

func (*Client) GrantAllPipelines

func (c *Client) GrantAllPipelines(ctx context.Context, projectId string, resourceType string, resourceId string, granted bool) (*ResourcePipelinePermissions, error)

func (*Client) UpdateAgentPool added in v0.6.0

func (c *Client) UpdateAgentPool(ctx context.Context, poolId int, name string, autoProvision bool, autoUpdate bool) (*TaskAgentPool, error)

func (*Client) UpdateEnvironment added in v0.4.1

func (c *Client) UpdateEnvironment(ctx context.Context, projectId string, id int, name string, description string) (*EnvironmentInstance, error)

func (*Client) UpdatePipelineRetentionSettings

func (c *Client) UpdatePipelineRetentionSettings(ctx context.Context, projectId string, settings *UpdatePipelineRetentionSettings) (*PipelineRetentionSettings, error)

func (*Client) UpdatePipelineSettings

func (c *Client) UpdatePipelineSettings(ctx context.Context, projectId string, settings *PipelineGeneralSettings) (*PipelineGeneralSettings, error)

type CreateOrUpdateEnvironmentArgs added in v0.4.1

type CreateOrUpdateEnvironmentArgs struct {
	Description string `json:"description"`
	Name        string `json:"name"`
}

type EnvironmentInstance added in v0.4.1

type EnvironmentInstance struct {
	CreatedBy      *core.IdentityRef               `json:"createdBy,omitempty"`
	CreatedOn      *core.Time                      `json:"createdOn,omitempty"`
	Description    *string                         `json:"description,omitempty"`
	Id             *int                            `json:"id,omitempty"`
	LastModifiedBy *core.IdentityRef               `json:"lastModifiedBy,omitempty"`
	LastModifiedOn *core.Time                      `json:"lastModifiedOn,omitempty"`
	Name           *string                         `json:"name,omitempty"`
	Project        *core.ProjectReference          `json:"project,omitempty"`
	Resources      *[]EnvironmentResourceReference `json:"resources,omitempty"`
}

type EnvironmentReference added in v0.4.1

type EnvironmentReference struct {
	Id   *int    `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

type EnvironmentResourceKubernetes added in v0.4.1

type EnvironmentResourceKubernetes struct {
	ClusterName          *string               `json:"clusterName,omitempty"`
	CreatedBy            *core.IdentityRef     `json:"createdBy,omitempty"`
	CreatedOn            *core.Time            `json:"createdOn,omitempty"`
	EnvironmentReference *EnvironmentReference `json:"environmentReference,omitempty"`
	Id                   *int                  `json:"id,omitempty"`
	LastModifiedBy       *core.IdentityRef     `json:"lastModifiedBy,omitempty"`
	LastModifiedOn       *core.Time            `json:"lastModifiedOn,omitempty"`
	Name                 *string               `json:"name,omitempty"`
	Namespace            *string               `json:"namespace,omitempty"`
	ServiceEndpointId    *string               `json:"serviceEndpointId,omitempty"`
	Type                 *string               `json:"type,omitempty"`
	Tags                 *[]string             `json:"tags,omitempty"`
}

type EnvironmentResourceReference added in v0.4.1

type EnvironmentResourceReference struct {
	Id   *int                     `json:"id,omitempty"`
	Name *string                  `json:"name,omitempty"`
	Tags *[]string                `json:"tags,omitempty"`
	Type *EnvironmentResourceType `json:"type,omitempty"`
}

type EnvironmentResourceType added in v0.4.1

type EnvironmentResourceType string

type Permission

type Permission struct {
	Authorized   *bool             `json:"authorized,omitempty"`
	AuthorizedBy *core.IdentityRef `json:"authorizedBy,omitempty"`
	AuthorizedOn *core.Time        `json:"authorizedOn,omitempty"`
}

type PipelineGeneralSettings

type PipelineGeneralSettings struct {
	DisableClassicPipelineCreation   *bool `json:"disableClassicPipelineCreation,omitempty"`
	EnforceJobAuthScope              *bool `json:"enforceJobAuthScope,omitempty"`
	EnforceJobAuthScopeForReleases   *bool `json:"enforceJobAuthScopeForReleases,omitempty"`
	EnforceReferencedRepoScopedToken *bool `json:"enforceReferencedRepoScopedToken,omitempty"`
	EnforceSettableVar               *bool `json:"enforceSettableVar,omitempty"`
	PublishPipelineMetadata          *bool `json:"publishPipelineMetadata,omitempty"`
	StatusBadgesArePrivate           *bool `json:"statusBadgesArePrivate,omitempty"`
}

type PipelinePermission

type PipelinePermission struct {
	Authorized   *bool             `json:"authorized,omitempty"`
	AuthorizedBy *core.IdentityRef `json:"authorizedBy,omitempty"`
	AuthorizedOn *core.Time        `json:"authorizedOn,omitempty"`
	Id           *int              `json:"id,omitempty"`
}

type PipelineRetentionSettings

type PipelineRetentionSettings struct {
	PurgeArtifacts               *RetentionSetting `json:"purgeArtifacts,omitempty"`
	PurgePullRequestRuns         *RetentionSetting `json:"purgePullRequestRuns,omitempty"`
	PurgeRuns                    *RetentionSetting `json:"purgeRuns,omitempty"`
	RetainRunsPerProtectedBranch *RetentionSetting `json:"retainRunsPerProtectedBranch,omitempty"`
}

type Resource

type Resource struct {
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type ResourcePipelinePermissions

type ResourcePipelinePermissions struct {
	AllPipelines *Permission           `json:"allPipelines,omitempty"`
	Pipelines    *[]PipelinePermission `json:"pipelines,omitempty"`
	Resource     *Resource             `json:"resource,omitempty"`
}

type RetentionSetting

type RetentionSetting struct {
	Max   *int `json:"max,omitempty"`
	Min   *int `json:"min,omitempty"`
	Value *int `json:"value,omitempty"`
}

type TaskAgentPool added in v0.6.0

type TaskAgentPool struct {
	AgentCloudId  *int              `json:"agentCloudId,omitempty"`
	AutoProvision *bool             `json:"autoProvision,omitempty"`
	AutoSize      *bool             `json:"autoSize,omitempty"`
	AutoUpdate    *bool             `json:"autoUpdate,omitempty"`
	CreatedBy     *core.IdentityRef `json:"createdBy,omitempty"`
	CreatedOn     *core.Time        `json:"createdOn,omitempty"`
	Id            *int              `json:"id,omitempty"`
	IsHosted      *bool             `json:"isHosted,omitempty"`
	IsLegacy      *bool             `json:"isLegacy,omitempty"`
	Name          *string           `json:"name,omitempty"`
	Options       *string           `json:"options,omitempty"`
	Owner         *core.IdentityRef `json:"owner,omitempty"`
	Properties    interface{}       `json:"properties,omitempty"`
	PoolType      *string           `json:"poolType,omitempty"`
	Scope         *uuid.UUID        `json:"scope,omitempty"`
	Size          *int              `json:"size,omitempty"`
	TargetSize    *int              `json:"targetSize,omitempty"`
}

type TaskAgentPoolReference added in v0.6.0

type TaskAgentPoolReference struct {
	Id       *int       `json:"id,omitempty"`
	IsHosted *bool      `json:"isHosted,omitempty"`
	IsLegacy *bool      `json:"isLegacy,omitempty"`
	Name     *string    `json:"name,omitempty"`
	Options  *string    `json:"options,omitempty"`
	PoolType *string    `json:"poolType,omitempty"`
	Scope    *uuid.UUID `json:"scope,omitempty"`
	Size     *int       `json:"size,omitempty"`
}

type TaskAgentQueue added in v0.6.0

type TaskAgentQueue struct {
	Id        *int                    `json:"id,omitempty"`
	Name      *string                 `json:"name,omitempty"`
	Pool      *TaskAgentPoolReference `json:"pool,omitempty"`
	ProjectId *uuid.UUID              `json:"projectId,omitempty"`
}

type UpdatePipelineRetentionSettings

type UpdatePipelineRetentionSettings struct {
	PurgeArtifacts               *RetentionSetting `json:"artifactsRetention,omitempty"`
	PurgePullRequestRuns         *RetentionSetting `json:"pullRequestRunRetention,omitempty"`
	PurgeRuns                    *RetentionSetting `json:"runRetention,omitempty"`
	RetainRunsPerProtectedBranch *RetentionSetting `json:"retainRunsPerProtectedBranch,omitempty"`
}

Jump to

Keyboard shortcuts

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