diskclient

package
v0.29.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package diskclient implements the client for Disks.

Index

Constants

View Source
const (
	// APIVersion is the API version for compute.
	APIVersion = "2019-11-01"
	// AzureStackCloudAPIVersion is the API version for Azure Stack
	AzureStackCloudAPIVersion = "2019-07-01"
	// AzureStackCloudName is the cloud name of Azure Stack
	AzureStackCloudName = "AZURESTACKCLOUD"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {

	// ARM throttling configures.
	RetryAfterReader time.Time
	RetryAfterWriter time.Time
	// contains filtered or unexported fields
}

Client implements Disk client Interface.

func New

func New(config *azclients.ClientConfig) *Client

New creates a new Disk client with ratelimiting.

func (*Client) CreateOrUpdate

func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, diskParameter compute.Disk) *retry.Error

CreateOrUpdate creates or updates a Disk.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, resourceGroupName string, diskName string) *retry.Error

Delete deletes a Disk by name.

func (*Client) Get

func (c *Client) Get(ctx context.Context, resourceGroupName string, diskName string) (compute.Disk, *retry.Error)

Get gets a Disk.

func (*Client) ListByResourceGroup added in v0.18.10

func (c *Client) ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Disk, *retry.Error)

ListByResourceGroup lists all the disks under a resource group.

func (*Client) Update added in v0.18.10

func (c *Client) Update(ctx context.Context, resourceGroupName string, diskName string, diskParameter compute.DiskUpdate) *retry.Error

Update creates or updates a Disk.

type DiskListPage added in v0.18.10

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

DiskListPage contains a page of Disk values.

func (*DiskListPage) Next added in v0.18.10

func (page *DiskListPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*DiskListPage) NextWithContext added in v0.18.10

func (page *DiskListPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (DiskListPage) NotDone added in v0.18.10

func (page DiskListPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (DiskListPage) Response added in v0.18.10

func (page DiskListPage) Response() compute.DiskList

Response returns the raw server response from the last page request.

func (DiskListPage) Values added in v0.18.10

func (page DiskListPage) Values() []compute.Disk

Values returns the slice of values for the current page or nil if there are no values.

type Interface

type Interface interface {
	// Get gets a Disk.
	Get(ctx context.Context, resourceGroupName string, diskName string) (result compute.Disk, rerr *retry.Error)

	// CreateOrUpdate creates or updates a Disk.
	CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, diskParameter compute.Disk) *retry.Error

	// Update updates a Disk.
	Update(ctx context.Context, resourceGroupName string, diskName string, diskParameter compute.DiskUpdate) *retry.Error

	// Delete deletes a Disk by name.
	Delete(ctx context.Context, resourceGroupName string, diskName string) *retry.Error

	// ListByResourceGroup lists all the disks under a resource group.
	ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Disk, *retry.Error)
}

Interface is the client interface for Disks.

Directories

Path Synopsis
Package mockdiskclient implements the mock client for Disks.
Package mockdiskclient implements the mock client for Disks.

Jump to

Keyboard shortcuts

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