fileclient

package
v1.24.20 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Overview

Package fileclient implements the client for azure file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implements the azure file client interface

func New

func New(config *azclients.ClientConfig) *Client

New creates a azure file client

func (*Client) CreateFileShare

func (c *Client) CreateFileShare(resourceGroupName, accountName string, shareOptions *ShareOptions) error

CreateFileShare creates a file share

func (*Client) DeleteFileShare

func (c *Client) DeleteFileShare(resourceGroupName, accountName, name string) error

DeleteFileShare deletes a file share

func (*Client) GetFileShare

func (c *Client) GetFileShare(resourceGroupName, accountName, name string) (storage.FileShare, error)

GetFileShare gets a file share

func (*Client) GetServiceProperties added in v0.7.3

func (c *Client) GetServiceProperties(resourceGroupName, accountName string) (storage.FileServiceProperties, error)

GetServiceProperties get service properties

func (*Client) ResizeFileShare

func (c *Client) ResizeFileShare(resourceGroupName, accountName, name string, sizeGiB int) error

ResizeFileShare resizes a file share

func (*Client) SetServiceProperties added in v0.7.3

func (c *Client) SetServiceProperties(resourceGroupName, accountName string, parameters storage.FileServiceProperties) (storage.FileServiceProperties, error)

SetServiceProperties set service properties

type Interface

type Interface interface {
	CreateFileShare(resourceGroupName, accountName string, shareOptions *ShareOptions) error
	DeleteFileShare(resourceGroupName, accountName, name string) error
	ResizeFileShare(resourceGroupName, accountName, name string, sizeGiB int) error
	GetFileShare(resourceGroupName, accountName, name string) (storage.FileShare, error)
	GetServiceProperties(resourceGroupName, accountName string) (storage.FileServiceProperties, error)
	SetServiceProperties(resourceGroupName, accountName string, parameters storage.FileServiceProperties) (storage.FileServiceProperties, 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.

type ShareOptions

type ShareOptions struct {
	Name       string
	Protocol   storage.EnabledProtocols
	RequestGiB int
	// supported values: ""(by default), "TransactionOptimized", "Cool", "Hot", "Premium"
	AccessTier string
	// supported values: ""(by default), "AllSquash", "NoRootSquash", "RootSquash"
	RootSquash string
	// Metadata - A name-value pair to associate with the share as metadata.
	Metadata map[string]*string
}

ShareOptions contains the fields which are used to create file share.

Directories

Path Synopsis
Package mockfileclient implements the mock client for azure file.
Package mockfileclient implements the mock client for azure file.

Jump to

Keyboard shortcuts

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