util

package
v1.29.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package util is a generated GoMock package.

Index

Constants

View Source
const (
	GiB                  = 1024 * 1024 * 1024
	MaxPathLengthWindows = 260
)

Variables

This section is empty.

Functions

func BytesToGiB

func BytesToGiB(volumeSizeBytes int64) int64

BytesToGiB conversts Bytes to GiB

func GiBToBytes

func GiBToBytes(volumeSizeGiB int64) int64

GiBToBytes converts GiB to Bytes

func RoundUpBytes

func RoundUpBytes(volumeSizeBytes int64) int64

RoundUpBytes rounds up the volume size in bytes up to multiplications of GiB in the unit of Bytes

func RoundUpGiB

func RoundUpGiB(volumeSizeBytes int64) int64

RoundUpGiB rounds up the volume size in bytes up to multiplications of GiB in the unit of GiB

func RunPowershellCmd added in v1.28.0

func RunPowershellCmd(command string, envs ...string) ([]byte, error)

Types

type Azcopy added in v1.29.1

type Azcopy struct {
	ExecCmd EXEC
}

func (*Azcopy) GetAzcopyJob added in v1.29.1

func (ac *Azcopy) GetAzcopyJob(dstFileshare string) (AzcopyJobState, string, error)

GetAzcopyJob get the azcopy job status if job existed

type AzcopyJobState added in v1.29.1

type AzcopyJobState string
const (
	AzcopyJobError     AzcopyJobState = "Error"
	AzcopyJobNotFound  AzcopyJobState = "NotFound"
	AzcopyJobRunning   AzcopyJobState = "Running"
	AzcopyJobCompleted AzcopyJobState = "Completed"
)

type EXEC added in v1.29.1

type EXEC interface {
	RunCommand(string) (string, error)
}

type ExecCommand added in v1.29.1

type ExecCommand struct {
}

func (*ExecCommand) RunCommand added in v1.29.1

func (ec *ExecCommand) RunCommand(cmd string) (string, error)

type MockEXEC added in v1.29.1

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

MockEXEC is a mock of EXEC interface.

func NewMockEXEC added in v1.29.1

func NewMockEXEC(ctrl *gomock.Controller) *MockEXEC

NewMockEXEC creates a new mock instance.

func (*MockEXEC) EXPECT added in v1.29.1

func (m *MockEXEC) EXPECT() *MockEXECMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockEXEC) RunCommand added in v1.29.1

func (m *MockEXEC) RunCommand(arg0 string) (string, error)

RunCommand mocks base method.

type MockEXECMockRecorder added in v1.29.1

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

MockEXECMockRecorder is the mock recorder for MockEXEC.

func (*MockEXECMockRecorder) RunCommand added in v1.29.1

func (mr *MockEXECMockRecorder) RunCommand(arg0 interface{}) *gomock.Call

RunCommand indicates an expected call of RunCommand.

Jump to

Keyboard shortcuts

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