Documentation ¶
Index ¶
- Variables
- type Approval
- type ApprovalCompletedNotificationEvent
- type ApprovalConfig
- type ApprovalConfigSettings
- type ApprovalDetailsExpandParameter
- type ApprovalExecutionOrder
- type ApprovalNotificationEventBase
- type ApprovalPermissions
- type ApprovalRequest
- type ApprovalStatus
- type ApprovalStep
- type ApprovalStepHistory
- type ApprovalUpdateParameters
- type ApprovalsQueryParameters
- type Client
- type ClientImpl
- func (client *ClientImpl) GetApproval(ctx context.Context, args GetApprovalArgs) (*Approval, error)
- func (client *ClientImpl) QueryApprovals(ctx context.Context, args QueryApprovalsArgs) (*[]Approval, error)
- func (client *ClientImpl) UpdateApprovals(ctx context.Context, args UpdateApprovalsArgs) (*[]Approval, error)
- type GetApprovalArgs
- type QueryApprovalsArgs
- type UpdateApprovalsArgs
Constants ¶
This section is empty.
Variables ¶
var ApprovalDetailsExpandParameterValues = approvalDetailsExpandParameterValuesType{
None: "none",
Steps: "steps",
Permissions: "permissions",
}
var ApprovalExecutionOrderValues = approvalExecutionOrderValuesType{
AnyOrder: "anyOrder",
InSequence: "inSequence",
}
var ApprovalPermissionsValues = approvalPermissionsValuesType{
None: "none",
View: "view",
Update: "update",
Reassign: "reassign",
ResourceAdmin: "resourceAdmin",
QueueBuild: "queueBuild",
}
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",
}
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 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 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 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 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) }
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