nuget

package
v7.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NuGetBatchOperationTypeValues = nuGetBatchOperationTypeValuesType{

	Promote: "promote",

	List: "list",

	Delete: "delete",

	PermanentDelete: "permanentDelete",

	RestoreToFeed: "restoreToFeed",
}
View Source
var ResourceAreaId, _ = uuid.Parse("b3be7473-68ea-4a81-bfc7-9530baaa19ad")

Functions

This section is empty.

Types

type BatchListData

type BatchListData struct {
	// The desired listed status for the package versions.
	Listed *bool `json:"listed,omitempty"`
}

Data required to unlist or relist multiple package versions. Pass this while performing NuGetBatchOperationTypes.List batch operation.

type Client

type Client interface {
	// [Preview API] Send a package version from the feed to its paired recycle bin.
	DeletePackageVersion(context.Context, DeletePackageVersionArgs) (*Package, error)
	// [Preview API] Delete a package version from a feed's recycle bin.
	DeletePackageVersionFromRecycleBin(context.Context, DeletePackageVersionFromRecycleBinArgs) error
	// [Preview API] Download a package version directly.
	DownloadPackage(context.Context, DownloadPackageArgs) (io.ReadCloser, error)
	// [Preview API] Get information about a package version.
	GetPackageVersion(context.Context, GetPackageVersionArgs) (*Package, error)
	// [Preview API] View a package version's deletion/recycled status
	GetPackageVersionMetadataFromRecycleBin(context.Context, GetPackageVersionMetadataFromRecycleBinArgs) (*NuGetPackageVersionDeletionState, error)
	// [Preview API] Get the upstreaming behavior of a package within the context of a feed
	GetUpstreamingBehavior(context.Context, GetUpstreamingBehaviorArgs) (*packagingshared.UpstreamingBehavior, error)
	// [Preview API] Restore a package version from a feed's recycle bin back into the active feed.
	RestorePackageVersionFromRecycleBin(context.Context, RestorePackageVersionFromRecycleBinArgs) error
	// [Preview API] Set the upstreaming behavior of a package within the context of a feed
	SetUpstreamingBehavior(context.Context, SetUpstreamingBehaviorArgs) error
	// [Preview API] Set mutable state on a package version.
	UpdatePackageVersion(context.Context, UpdatePackageVersionArgs) error
	// [Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
	UpdatePackageVersions(context.Context, UpdatePackageVersionsArgs) error
	// [Preview API] Delete or restore several package versions from the recycle bin.
	UpdateRecycleBinPackageVersions(context.Context, UpdateRecycleBinPackageVersionsArgs) error
}

func NewClient

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

type ClientImpl

type ClientImpl struct {
	Client azuredevops.Client
}

func (*ClientImpl) DeletePackageVersion

func (client *ClientImpl) DeletePackageVersion(ctx context.Context, args DeletePackageVersionArgs) (*Package, error)

[Preview API] Send a package version from the feed to its paired recycle bin.

func (*ClientImpl) DeletePackageVersionFromRecycleBin

func (client *ClientImpl) DeletePackageVersionFromRecycleBin(ctx context.Context, args DeletePackageVersionFromRecycleBinArgs) error

[Preview API] Delete a package version from a feed's recycle bin.

func (*ClientImpl) DownloadPackage

func (client *ClientImpl) DownloadPackage(ctx context.Context, args DownloadPackageArgs) (io.ReadCloser, error)

[Preview API] Download a package version directly.

func (*ClientImpl) GetPackageVersion

func (client *ClientImpl) GetPackageVersion(ctx context.Context, args GetPackageVersionArgs) (*Package, error)

[Preview API] Get information about a package version.

func (*ClientImpl) GetPackageVersionMetadataFromRecycleBin

func (client *ClientImpl) GetPackageVersionMetadataFromRecycleBin(ctx context.Context, args GetPackageVersionMetadataFromRecycleBinArgs) (*NuGetPackageVersionDeletionState, error)

[Preview API] View a package version's deletion/recycled status

func (*ClientImpl) GetUpstreamingBehavior

func (client *ClientImpl) GetUpstreamingBehavior(ctx context.Context, args GetUpstreamingBehaviorArgs) (*packagingshared.UpstreamingBehavior, error)

[Preview API] Get the upstreaming behavior of a package within the context of a feed

func (*ClientImpl) RestorePackageVersionFromRecycleBin

func (client *ClientImpl) RestorePackageVersionFromRecycleBin(ctx context.Context, args RestorePackageVersionFromRecycleBinArgs) error

[Preview API] Restore a package version from a feed's recycle bin back into the active feed.

func (*ClientImpl) SetUpstreamingBehavior

func (client *ClientImpl) SetUpstreamingBehavior(ctx context.Context, args SetUpstreamingBehaviorArgs) error

[Preview API] Set the upstreaming behavior of a package within the context of a feed

func (*ClientImpl) UpdatePackageVersion

func (client *ClientImpl) UpdatePackageVersion(ctx context.Context, args UpdatePackageVersionArgs) error

[Preview API] Set mutable state on a package version.

func (*ClientImpl) UpdatePackageVersions

func (client *ClientImpl) UpdatePackageVersions(ctx context.Context, args UpdatePackageVersionsArgs) error

[Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.

func (*ClientImpl) UpdateRecycleBinPackageVersions

func (client *ClientImpl) UpdateRecycleBinPackageVersions(ctx context.Context, args UpdateRecycleBinPackageVersionsArgs) error

[Preview API] Delete or restore several package versions from the recycle bin.

type DeletePackageVersionArgs

type DeletePackageVersionArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package to delete.
	PackageName *string
	// (required) Version of the package to delete.
	PackageVersion *string
	// (optional) Project ID or project name
	Project *string
}

Arguments for the DeletePackageVersion function

type DeletePackageVersionFromRecycleBinArgs

type DeletePackageVersionFromRecycleBinArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
	// (optional) Project ID or project name
	Project *string
}

Arguments for the DeletePackageVersionFromRecycleBin function

type DownloadPackageArgs

type DownloadPackageArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
	// (optional) Project ID or project name
	Project *string
	// (optional) Unused
	SourceProtocolVersion *string
}

Arguments for the DownloadPackage function

type GetPackageVersionArgs

type GetPackageVersionArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
	// (optional) Project ID or project name
	Project *string
	// (optional) True to include deleted packages in the response.
	ShowDeleted *bool
}

Arguments for the GetPackageVersion function

type GetPackageVersionMetadataFromRecycleBinArgs

type GetPackageVersionMetadataFromRecycleBinArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
	// (optional) Project ID or project name
	Project *string
}

Arguments for the GetPackageVersionMetadataFromRecycleBin function

type GetUpstreamingBehaviorArgs

type GetUpstreamingBehaviorArgs struct {
	// (required) The name or id of the feed
	FeedId *string
	// (required) The name of the package
	PackageName *string
	// (optional) Project ID or project name
	Project *string
}

Arguments for the GetUpstreamingBehavior function

type NuGetBatchOperationType

type NuGetBatchOperationType string

Describes NuGet batch operation types.

type NuGetPackageVersionDeletionState

type NuGetPackageVersionDeletionState struct {
	// Utc date the package was deleted.
	DeletedDate *azuredevops.Time `json:"deletedDate,omitempty"`
	// Name of the package.
	Name *string `json:"name,omitempty"`
	// Version of the package.
	Version *string `json:"version,omitempty"`
}

Deletion state of a NuGet package.

type NuGetPackagesBatchRequest

type NuGetPackagesBatchRequest struct {
	// Data required to perform the operation. This is optional based on the type of the operation. Use BatchPromoteData if performing a promote operation.
	Data interface{} `json:"data,omitempty"`
	// Type of operation that needs to be performed on packages.
	Operation *NuGetBatchOperationType `json:"operation,omitempty"`
	// The packages onto which the operation will be performed.
	Packages *[]packagingshared.MinimalPackageDetails `json:"packages,omitempty"`
}

A batch of operations to apply to package versions.

type NuGetRecycleBinPackageVersionDetails

type NuGetRecycleBinPackageVersionDetails struct {
	// Setting to false will undo earlier deletion and restore the package to feed.
	Deleted *bool `json:"deleted,omitempty"`
}

type Package

type Package struct {
	// Related REST links.
	Links interface{} `json:"_links,omitempty"`
	// If and when the package was deleted.
	DeletedDate *azuredevops.Time `json:"deletedDate,omitempty"`
	// Package Id.
	Id *string `json:"id,omitempty"`
	// Indicates whether the package is marked as 'listed' within the NuGet protocol. If null or missing, the package's 'listed' state is unspecified.
	Listed *bool `json:"listed,omitempty"`
	// The display name of the package.
	Name *string `json:"name,omitempty"`
	// If and when the package was permanently deleted.
	PermanentlyDeletedDate *azuredevops.Time `json:"permanentlyDeletedDate,omitempty"`
	// The history of upstream sources for this package. The first source in the list is the immediate source from which this package was saved.
	SourceChain *[]packagingshared.UpstreamSourceInfo `json:"sourceChain,omitempty"`
	// The version of the package.
	Version *string `json:"version,omitempty"`
}

Package version metadata for a NuGet package

type PackageVersionDetails

type PackageVersionDetails struct {
	// Indicates the listing state of a package
	Listed *bool `json:"listed,omitempty"`
	// The view to which the package version will be added
	Views *webapi.JsonPatchOperation `json:"views,omitempty"`
}

type RestorePackageVersionFromRecycleBinArgs

type RestorePackageVersionFromRecycleBinArgs struct {
	// (required) Set the 'Deleted' member to 'false' to apply the restore operation
	PackageVersionDetails *NuGetRecycleBinPackageVersionDetails
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
	// (optional) Project ID or project name
	Project *string
}

Arguments for the RestorePackageVersionFromRecycleBin function

type SetUpstreamingBehaviorArgs

type SetUpstreamingBehaviorArgs struct {
	// (required) The name or id of the feed
	FeedId *string
	// (required) The name of the package
	PackageName *string
	// (required) The behavior to apply to the package within the scope of the feed
	Behavior *packagingshared.UpstreamingBehavior
	// (optional) Project ID or project name
	Project *string
}

Arguments for the SetUpstreamingBehavior function

type UpdatePackageVersionArgs

type UpdatePackageVersionArgs struct {
	// (required) New state to apply to the referenced package.
	PackageVersionDetails *PackageVersionDetails
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package to update.
	PackageName *string
	// (required) Version of the package to update.
	PackageVersion *string
	// (optional) Project ID or project name
	Project *string
}

Arguments for the UpdatePackageVersion function

type UpdatePackageVersionsArgs

type UpdatePackageVersionsArgs struct {
	// (required) Information about the packages to update, the operation to perform, and its associated data.
	BatchRequest *NuGetPackagesBatchRequest
	// (required) Name or ID of the feed.
	FeedId *string
	// (optional) Project ID or project name
	Project *string
}

Arguments for the UpdatePackageVersions function

type UpdateRecycleBinPackageVersionsArgs

type UpdateRecycleBinPackageVersionsArgs struct {
	// (required) Information about the packages to update, the operation to perform, and its associated data. <c>Operation</c> must be <c>PermanentDelete</c> or <c>RestoreToFeed</c>
	BatchRequest *NuGetPackagesBatchRequest
	// (required) Name or ID of the feed.
	FeedId *string
	// (optional) Project ID or project name
	Project *string
}

Arguments for the UpdateRecycleBinPackageVersions function

Jump to

Keyboard shortcuts

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