blobclient

package
v1.30.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package blobclient implements the client for blob container.

Index

Constants

View Source
const (
	// APIVersion is the API version for storage.
	APIVersion = "2021-09-01"
	// AzureStackCloudAPIVersion is the API version for Azure Stack
	AzureStackCloudAPIVersion = "2019-06-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 the blobclient interface

func New

func New(config *azclients.ClientConfig) *Client

New creates a blobContainersClient

func (*Client) CreateContainer

func (c *Client) CreateContainer(ctx context.Context, subsID, resourceGroupName, accountName, containerName string, parameters storage.BlobContainer) *retry.Error

CreateContainer creates a blob container

func (*Client) DeleteContainer

func (c *Client) DeleteContainer(ctx context.Context, subsID, resourceGroupName, accountName, containerName string) *retry.Error

DeleteContainer deletes a blob container

func (*Client) GetContainer

func (c *Client) GetContainer(ctx context.Context, subsID, resourceGroupName, accountName, containerName string) (storage.BlobContainer, *retry.Error)

GetContainer gets a blob container

func (*Client) GetServiceProperties added in v1.27.0

func (c *Client) GetServiceProperties(ctx context.Context, subsID, resourceGroupName, accountName string) (storage.BlobServiceProperties, error)

func (*Client) SetServiceProperties added in v1.27.0

func (c *Client) SetServiceProperties(ctx context.Context, subsID, resourceGroupName, accountName string, parameters storage.BlobServiceProperties) (storage.BlobServiceProperties, error)

type Interface

type Interface interface {
	CreateContainer(ctx context.Context, subsID, resourceGroupName, accountName, containerName string, parameters storage.BlobContainer) *retry.Error
	DeleteContainer(ctx context.Context, subsID, resourceGroupName, accountName, containerName string) *retry.Error
	GetContainer(ctx context.Context, subsID, resourceGroupName, accountName, containerName string) (storage.BlobContainer, *retry.Error)
	GetServiceProperties(ctx context.Context, subsID, resourceGroupName, accountName string) (storage.BlobServiceProperties, error)
	SetServiceProperties(ctx context.Context, subsID, resourceGroupName, accountName string, parameters storage.BlobServiceProperties) (storage.BlobServiceProperties, error)
}

Interface is the client interface for creating file shares, interface for test injection. Don't forget to run "hack/update-mock-clients.sh" command to generate the mock client.

Directories

Path Synopsis
Package mockblobclient implements the mock client for blob container.
Package mockblobclient implements the mock client for blob container.

Jump to

Keyboard shortcuts

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