mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Update dependencies
This commit is contained in:
59
vendor/github.com/Microsoft/azure-devops-go-api/azuredevops/operations/client.go
generated
vendored
Normal file
59
vendor/github.com/Microsoft/azure-devops-go-api/azuredevops/operations/client.go
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
// --------------------------------------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
// Generated file, DO NOT EDIT
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
package operations
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/google/uuid"
|
||||
"github.com/microsoft/azure-devops-go-api/azuredevops"
|
||||
"net/http"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
Client azuredevops.Client
|
||||
}
|
||||
|
||||
func NewClient(ctx context.Context, connection *azuredevops.Connection) *Client {
|
||||
client := connection.GetClientByUrl(connection.BaseUrl)
|
||||
return &Client{
|
||||
Client: *client,
|
||||
}
|
||||
}
|
||||
|
||||
// Gets an operation from the the operationId using the given pluginId.
|
||||
func (client *Client) GetOperation(ctx context.Context, args GetOperationArgs) (*Operation, error) {
|
||||
routeValues := make(map[string]string)
|
||||
if args.OperationId == nil {
|
||||
return nil, &azuredevops.ArgumentNilError{ArgumentName: "args.OperationId"}
|
||||
}
|
||||
routeValues["operationId"] = (*args.OperationId).String()
|
||||
|
||||
queryParams := url.Values{}
|
||||
if args.PluginId != nil {
|
||||
queryParams.Add("pluginId", (*args.PluginId).String())
|
||||
}
|
||||
locationId, _ := uuid.Parse("9a1b74b4-2ca8-4a9f-8470-c2f2e6fdc949")
|
||||
resp, err := client.Client.Send(ctx, http.MethodGet, locationId, "5.1", routeValues, queryParams, nil, "", "application/json", nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var responseValue Operation
|
||||
err = client.Client.UnmarshalBody(resp, &responseValue)
|
||||
return &responseValue, err
|
||||
}
|
||||
|
||||
// Arguments for the GetOperation function
|
||||
type GetOperationArgs struct {
|
||||
// (required) The ID for the operation.
|
||||
OperationId *uuid.UUID
|
||||
// (optional) The ID for the plugin.
|
||||
PluginId *uuid.UUID
|
||||
}
|
||||
77
vendor/github.com/Microsoft/azure-devops-go-api/azuredevops/operations/models.go
generated
vendored
Normal file
77
vendor/github.com/Microsoft/azure-devops-go-api/azuredevops/operations/models.go
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
// --------------------------------------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
// Generated file, DO NOT EDIT
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
package operations
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// Contains information about the progress or result of an async operation.
|
||||
type Operation struct {
|
||||
// Unique identifier for the operation.
|
||||
Id *uuid.UUID `json:"id,omitempty"`
|
||||
// Unique identifier for the plugin.
|
||||
PluginId *uuid.UUID `json:"pluginId,omitempty"`
|
||||
// The current status of the operation.
|
||||
Status *OperationStatus `json:"status,omitempty"`
|
||||
// URL to get the full operation object.
|
||||
Url *string `json:"url,omitempty"`
|
||||
// Links to other related objects.
|
||||
Links interface{} `json:"_links,omitempty"`
|
||||
// Detailed messaged about the status of an operation.
|
||||
DetailedMessage *string `json:"detailedMessage,omitempty"`
|
||||
// Result message for an operation.
|
||||
ResultMessage *string `json:"resultMessage,omitempty"`
|
||||
// URL to the operation result.
|
||||
ResultUrl *OperationResultReference `json:"resultUrl,omitempty"`
|
||||
}
|
||||
|
||||
// Reference for an async operation.
|
||||
type OperationReference struct {
|
||||
// Unique identifier for the operation.
|
||||
Id *uuid.UUID `json:"id,omitempty"`
|
||||
// Unique identifier for the plugin.
|
||||
PluginId *uuid.UUID `json:"pluginId,omitempty"`
|
||||
// The current status of the operation.
|
||||
Status *OperationStatus `json:"status,omitempty"`
|
||||
// URL to get the full operation object.
|
||||
Url *string `json:"url,omitempty"`
|
||||
}
|
||||
|
||||
type OperationResultReference struct {
|
||||
// URL to the operation result.
|
||||
ResultUrl *string `json:"resultUrl,omitempty"`
|
||||
}
|
||||
|
||||
// The status of an operation.
|
||||
type OperationStatus string
|
||||
|
||||
type operationStatusValuesType struct {
|
||||
NotSet OperationStatus
|
||||
Queued OperationStatus
|
||||
InProgress OperationStatus
|
||||
Cancelled OperationStatus
|
||||
Succeeded OperationStatus
|
||||
Failed OperationStatus
|
||||
}
|
||||
|
||||
var OperationStatusValues = operationStatusValuesType{
|
||||
// The operation does not have a status set.
|
||||
NotSet: "notSet",
|
||||
// The operation has been queued.
|
||||
Queued: "queued",
|
||||
// The operation is in progress.
|
||||
InProgress: "inProgress",
|
||||
// The operation was cancelled by the user.
|
||||
Cancelled: "cancelled",
|
||||
// The operation completed successfully.
|
||||
Succeeded: "succeeded",
|
||||
// The operation completed with a failure.
|
||||
Failed: "failed",
|
||||
}
|
||||
Reference in New Issue
Block a user