pipelinesapproval

package
v7.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApprovalDetailsExpandParameterValues = approvalDetailsExpandParameterValuesType{
	None:        "none",
	Steps:       "steps",
	Permissions: "permissions",
}
View Source
var ApprovalExecutionOrderValues = approvalExecutionOrderValuesType{

	AnyOrder: "anyOrder",

	InSequence: "inSequence",
}
View Source
var ApprovalPermissionsValues = approvalPermissionsValuesType{
	None:          "none",
	View:          "view",
	Update:        "update",
	Reassign:      "reassign",
	ResourceAdmin: "resourceAdmin",
	QueueBuild:    "queueBuild",
}
View Source
var ApprovalStatusValues = approvalStatusValuesType{
	Undefined: "undefined",

	Uninitiated: "uninitiated",

	Pending: "pending",

	Approved: "approved",

	Rejected: "rejected",

	Skipped: "skipped",

	Canceled: "canceled",

	TimedOut:  "timedOut",
	Failed:    "failed",
	Completed: "completed",
	All:       "all",
}
View Source
var ResourceAreaId, _ = uuid.Parse("5b55a9b6-2e0f-40d7-829d-3741d2b8c4e4")

Functions

This section is empty.

Types

type Approval

type Approval struct {
	// /// Gets the links to access the approval object.
	Links interface{} `json:"_links,omitempty"`
	// Identities which are not allowed to approve.
	BlockedApprovers *[]webapi.IdentityRef `json:"blockedApprovers,omitempty"`
	// Date on which approval got created.
	CreatedOn *azuredevops.Time `json:"createdOn,omitempty"`
	// Order in which approvers will be actionable.
	ExecutionOrder *ApprovalExecutionOrder `json:"executionOrder,omitempty"`
	// Unique identifier of the approval.
	Id *uuid.UUID `json:"id,omitempty"`
	// Instructions for the approvers.
	Instructions *string `json:"instructions,omitempty"`
	// Date on which approval was last modified.
	LastModifiedOn *azuredevops.Time `json:"lastModifiedOn,omitempty"`
	// Minimum number of approvers that should approve for the entire approval to be considered approved.
	MinRequiredApprovers *int `json:"minRequiredApprovers,omitempty"`
	// Current user permissions for approval object.
	Permissions *ApprovalPermissions `json:"permissions,omitempty"`
	// Overall status of the approval.
	Status *ApprovalStatus `json:"status,omitempty"`
	// List of steps associated with the approval.
	Steps *[]ApprovalStep `json:"steps,omitempty"`
}

type ApprovalCompletedNotificationEvent

type ApprovalCompletedNotificationEvent struct {
	Approval  *Approval  `json:"approval,omitempty"`
	ProjectId *uuid.UUID `json:"projectId,omitempty"`
}

type ApprovalConfig

type ApprovalConfig struct {
	// Ordered list of approvers.
	Approvers *[]webapi.IdentityRef `json:"approvers,omitempty"`
	// Identities which are not allowed to approve.
	BlockedApprovers *[]webapi.IdentityRef `json:"blockedApprovers,omitempty"`
	// Order in which approvers will be actionable.
	ExecutionOrder *ApprovalExecutionOrder `json:"executionOrder,omitempty"`
	// Instructions for the approver.
	Instructions *string `json:"instructions,omitempty"`
	// Minimum number of approvers that should approve for the entire approval to be considered approved. Defaults to all.
	MinRequiredApprovers *int `json:"minRequiredApprovers,omitempty"`
}

Config to create a new approval.

type ApprovalConfigSettings

type ApprovalConfigSettings struct {
	// Ordered list of approvers.
	Approvers *[]webapi.IdentityRef `json:"approvers,omitempty"`
	// Identities which are not allowed to approve.
	BlockedApprovers *[]webapi.IdentityRef `json:"blockedApprovers,omitempty"`
	// Order in which approvers will be actionable.
	ExecutionOrder *ApprovalExecutionOrder `json:"executionOrder,omitempty"`
	// Instructions for the approver.
	Instructions *string `json:"instructions,omitempty"`
	// Minimum number of approvers that should approve for the entire approval to be considered approved. Defaults to all.
	MinRequiredApprovers *int `json:"minRequiredApprovers,omitempty"`
	// Determines whether check requester can approve the check.
	RequesterCannotBeApprover *bool `json:"requesterCannotBeApprover,omitempty"`
}

Config to create a new approval.

type ApprovalDetailsExpandParameter

type ApprovalDetailsExpandParameter string

[Flags]

type ApprovalExecutionOrder

type ApprovalExecutionOrder string

type ApprovalNotificationEventBase

type ApprovalNotificationEventBase struct {
	Approval  *Approval  `json:"approval,omitempty"`
	ProjectId *uuid.UUID `json:"projectId,omitempty"`
}

Data for notification base class for approval events.

type ApprovalPermissions

type ApprovalPermissions string

[Flags]

type ApprovalRequest

type ApprovalRequest struct {
	// Unique identifier with which the approval is to be registered.
	ApprovalId *uuid.UUID `json:"approvalId,omitempty"`
	// Configuration of the approval request.
	Config *ApprovalConfig `json:"config,omitempty"`
}

Request to create a new approval.

type ApprovalStatus

type ApprovalStatus string

[Flags] Status of an approval as a whole or of an individual step.

type ApprovalStep

type ApprovalStep struct {
	// Identity who approved.
	ActualApprover *webapi.IdentityRef `json:"actualApprover,omitempty"`
	// Identity who should approve.
	AssignedApprover *webapi.IdentityRef `json:"assignedApprover,omitempty"`
	// Comment associated with this step.
	Comment *string `json:"comment,omitempty"`
	// History of the approval step
	History *[]ApprovalStepHistory `json:"history,omitempty"`
	// Timestamp at which this step was initiated.
	InitiatedOn *azuredevops.Time `json:"initiatedOn,omitempty"`
	// Identity by which this step was last modified.
	LastModifiedBy *webapi.IdentityRef `json:"lastModifiedBy,omitempty"`
	// Timestamp at which this step was last modified.
	LastModifiedOn *azuredevops.Time `json:"lastModifiedOn,omitempty"`
	// Order in which the approvers are allowed to approve.
	Order *int `json:"order,omitempty"`
	// Current user permissions for step.
	Permissions *ApprovalPermissions `json:"permissions,omitempty"`
	// Current status of this step.
	Status *ApprovalStatus `json:"status,omitempty"`
}

Data for a single approval step.

type ApprovalStepHistory

type ApprovalStepHistory struct {
	// Identity who was assigned this approval
	AssignedTo *webapi.IdentityRef `json:"assignedTo,omitempty"`
	// Comment associated with this step history.
	Comment *string `json:"comment,omitempty"`
	// Identity by which this step history was created.
	CreatedBy *webapi.IdentityRef `json:"createdBy,omitempty"`
	// Timestamp at which this step history was created.
	CreatedOn *azuredevops.Time `json:"createdOn,omitempty"`
}

Data for a single approval step history.

type ApprovalUpdateParameters

type ApprovalUpdateParameters struct {
	// ID of the approval to be updated.
	ApprovalId *uuid.UUID `json:"approvalId,omitempty"`
	// Current approver.
	AssignedApprover *webapi.IdentityRef `json:"assignedApprover,omitempty"`
	// Gets or sets comment.
	Comment *string `json:"comment,omitempty"`
	// Reassigned Approver.
	ReassignTo *webapi.IdentityRef `json:"reassignTo,omitempty"`
	// Gets or sets status.
	Status *ApprovalStatus `json:"status,omitempty"`
}

Data to update an approval object or its individual step.

type ApprovalsQueryParameters

type ApprovalsQueryParameters struct {
	// Query approvals based on list of approval IDs.
	ApprovalIds *[]uuid.UUID `json:"approvalIds,omitempty"`
}

type Client

type Client interface {
	// [Preview API] Get an approval.
	GetApproval(context.Context, GetApprovalArgs) (*Approval, error)
	// [Preview API] List Approvals. This can be used to get a set of pending approvals in a pipeline, on an user or for a resource..
	QueryApprovals(context.Context, QueryApprovalsArgs) (*[]Approval, error)
	// [Preview API] Update approvals.
	UpdateApprovals(context.Context, UpdateApprovalsArgs) (*[]Approval, error)
}

func NewClient

func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client, error)

type ClientImpl

type ClientImpl struct {
	Client azuredevops.Client
}

func (*ClientImpl) GetApproval

func (client *ClientImpl) GetApproval(ctx context.Context, args GetApprovalArgs) (*Approval, error)

[Preview API] Get an approval.

func (*ClientImpl) QueryApprovals

func (client *ClientImpl) QueryApprovals(ctx context.Context, args QueryApprovalsArgs) (*[]Approval, error)

[Preview API] List Approvals. This can be used to get a set of pending approvals in a pipeline, on an user or for a resource..

func (*ClientImpl) UpdateApprovals

func (client *ClientImpl) UpdateApprovals(ctx context.Context, args UpdateApprovalsArgs) (*[]Approval, error)

[Preview API] Update approvals.

type GetApprovalArgs

type GetApprovalArgs struct {
	// (required) Project ID or project name
	Project *string
	// (required) Id of the approval.
	ApprovalId *uuid.UUID
	// (optional)
	Expand *ApprovalDetailsExpandParameter
}

Arguments for the GetApproval function

type QueryApprovalsArgs

type QueryApprovalsArgs struct {
	// (required) Project ID or project name
	Project *string
	// (optional)
	ApprovalIds *[]uuid.UUID
	// (optional)
	Expand *ApprovalDetailsExpandParameter
}

Arguments for the QueryApprovals function

type UpdateApprovalsArgs

type UpdateApprovalsArgs struct {
	// (required)
	UpdateParameters *[]ApprovalUpdateParameters
	// (required) Project ID or project name
	Project *string
}

Arguments for the UpdateApprovals function

Jump to

Keyboard shortcuts

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