wrappers

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package wrappers is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilepathWrapper

type FilepathWrapper struct{}

FilepathWrapper contains implementation of LimitedFilePath interface

func (io *FilepathWrapper) EvalSymlinks(path string) (string, error)

EvalSymlinks is a wrapper of filepath.EvalSymlinks

func (*FilepathWrapper) Glob

func (io *FilepathWrapper) Glob(pattern string) (matches []string, err error)

Glob is a wrapper of filepath.Glob

type ISCSILib

type ISCSILib interface {
	GetInitiators(filename string) ([]string, error)
	PerformLogin(target goiscsi.ISCSITarget) error
	GetSessions() ([]goiscsi.ISCSISession, error)
	CreateOrUpdateNode(target goiscsi.ISCSITarget, options map[string]string) error
}

ISCSILib defines iscsi function spec

type LimitedFile

type LimitedFile interface {
	WriteString(s string) (n int, err error)
	Close() error
}

LimitedFile defines limited file interface

type LimitedFileInfo

type LimitedFileInfo interface {
	IsDir() bool
}

LimitedFileInfo defines limited file info interface

type LimitedFilepath

type LimitedFilepath interface {
	Glob(pattern string) (matches []string, err error)
	EvalSymlinks(path string) (string, error)
}

LimitedFilepath defines limited file path interface

type LimitedOS

type LimitedOS interface {
	OpenFile(name string, flag int, perm os.FileMode) (LimitedFile, error)
	Stat(name string) (LimitedFileInfo, error)
	IsNotExist(err error) bool
	Mkdir(name string, perm os.FileMode) error
	Remove(name string) error
	ReadFile(filename string) ([]byte, error)
}

LimitedOS defines limited os interface

type LimitedOSExec

type LimitedOSExec interface {
	CommandContext(ctx context.Context, name string, arg ...string) LimitedOSExecCmd
}

LimitedOSExec defines limited os exec interface

type LimitedOSExecCmd

type LimitedOSExecCmd interface {
	CombinedOutput() ([]byte, error)
}

LimitedOSExecCmd defines limited os exec command interface

type MockISCSILib

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

MockISCSILib is a mock of ISCSILib interface

func NewMockISCSILib

func NewMockISCSILib(ctrl *gomock.Controller) *MockISCSILib

NewMockISCSILib creates a new mock instance

func (*MockISCSILib) CreateOrUpdateNode

func (m *MockISCSILib) CreateOrUpdateNode(target goiscsi.ISCSITarget, options map[string]string) error

CreateOrUpdateNode mocks base method

func (*MockISCSILib) DeleteNode

func (m *MockISCSILib) DeleteNode(target goiscsi.ISCSITarget) error

DeleteNode mocks base method

func (*MockISCSILib) DiscoverTargets

func (m *MockISCSILib) DiscoverTargets(address string, login bool) ([]goiscsi.ISCSITarget, error)

DiscoverTargets mocks base method

func (*MockISCSILib) EXPECT

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

func (*MockISCSILib) GetInitiators

func (m *MockISCSILib) GetInitiators(filename string) ([]string, error)

GetInitiators mocks base method

func (*MockISCSILib) GetNodes

func (m *MockISCSILib) GetNodes() ([]goiscsi.ISCSINode, error)

GetNodes mocks base method

func (*MockISCSILib) GetSessions

func (m *MockISCSILib) GetSessions() ([]goiscsi.ISCSISession, error)

GetSessions mocks base method

func (*MockISCSILib) PerformLogin

func (m *MockISCSILib) PerformLogin(target goiscsi.ISCSITarget) error

PerformLogin mocks base method

func (*MockISCSILib) PerformLogout

func (m *MockISCSILib) PerformLogout(target goiscsi.ISCSITarget) error

PerformLogout mocks base method

func (*MockISCSILib) PerformRescan

func (m *MockISCSILib) PerformRescan() error

PerformRescan mocks base method

type MockISCSILibMockRecorder

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

MockISCSILibMockRecorder is the mock recorder for MockISCSILib

func (*MockISCSILibMockRecorder) CreateOrUpdateNode

func (mr *MockISCSILibMockRecorder) CreateOrUpdateNode(target, options interface{}) *gomock.Call

CreateOrUpdateNode indicates an expected call of CreateOrUpdateNode

func (*MockISCSILibMockRecorder) DeleteNode

func (mr *MockISCSILibMockRecorder) DeleteNode(target interface{}) *gomock.Call

DeleteNode indicates an expected call of DeleteNode

func (*MockISCSILibMockRecorder) DiscoverTargets

func (mr *MockISCSILibMockRecorder) DiscoverTargets(address, login interface{}) *gomock.Call

DiscoverTargets indicates an expected call of DiscoverTargets

func (*MockISCSILibMockRecorder) GetInitiators

func (mr *MockISCSILibMockRecorder) GetInitiators(filename interface{}) *gomock.Call

GetInitiators indicates an expected call of GetInitiators

func (*MockISCSILibMockRecorder) GetNodes

func (mr *MockISCSILibMockRecorder) GetNodes() *gomock.Call

GetNodes indicates an expected call of GetNodes

func (*MockISCSILibMockRecorder) GetSessions

func (mr *MockISCSILibMockRecorder) GetSessions() *gomock.Call

GetSessions indicates an expected call of GetSessions

func (*MockISCSILibMockRecorder) PerformLogin

func (mr *MockISCSILibMockRecorder) PerformLogin(target interface{}) *gomock.Call

PerformLogin indicates an expected call of PerformLogin

func (*MockISCSILibMockRecorder) PerformLogout

func (mr *MockISCSILibMockRecorder) PerformLogout(target interface{}) *gomock.Call

PerformLogout indicates an expected call of PerformLogout

func (*MockISCSILibMockRecorder) PerformRescan

func (mr *MockISCSILibMockRecorder) PerformRescan() *gomock.Call

PerformRescan indicates an expected call of PerformRescan

type MockLimitedFile

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

MockLimitedFile is a mock of LimitedFile interface

func NewMockLimitedFile

func NewMockLimitedFile(ctrl *gomock.Controller) *MockLimitedFile

NewMockLimitedFile creates a new mock instance

func (*MockLimitedFile) Close

func (m *MockLimitedFile) Close() error

Close mocks base method

func (*MockLimitedFile) EXPECT

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

func (*MockLimitedFile) WriteString

func (m *MockLimitedFile) WriteString(s string) (int, error)

WriteString mocks base method

type MockLimitedFileInfo

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

MockLimitedFileInfo is a mock of LimitedFileInfo interface

func NewMockLimitedFileInfo

func NewMockLimitedFileInfo(ctrl *gomock.Controller) *MockLimitedFileInfo

NewMockLimitedFileInfo creates a new mock instance

func (*MockLimitedFileInfo) EXPECT

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

func (*MockLimitedFileInfo) IsDir

func (m *MockLimitedFileInfo) IsDir() bool

IsDir mocks base method

type MockLimitedFileInfoMockRecorder

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

MockLimitedFileInfoMockRecorder is the mock recorder for MockLimitedFileInfo

func (*MockLimitedFileInfoMockRecorder) IsDir

IsDir indicates an expected call of IsDir

type MockLimitedFileMockRecorder

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

MockLimitedFileMockRecorder is the mock recorder for MockLimitedFile

func (*MockLimitedFileMockRecorder) Close

Close indicates an expected call of Close

func (*MockLimitedFileMockRecorder) WriteString

func (mr *MockLimitedFileMockRecorder) WriteString(s interface{}) *gomock.Call

WriteString indicates an expected call of WriteString

type MockLimitedFilepath

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

MockLimitedFilepath is a mock of LimitedFilepath interface

func NewMockLimitedFilepath

func NewMockLimitedFilepath(ctrl *gomock.Controller) *MockLimitedFilepath

NewMockLimitedFilepath creates a new mock instance

func (*MockLimitedFilepath) EXPECT

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

func (m *MockLimitedFilepath) EvalSymlinks(path string) (string, error)

EvalSymlinks mocks base method

func (*MockLimitedFilepath) Glob

func (m *MockLimitedFilepath) Glob(pattern string) ([]string, error)

Glob mocks base method

type MockLimitedFilepathMockRecorder

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

MockLimitedFilepathMockRecorder is the mock recorder for MockLimitedFilepath

func (mr *MockLimitedFilepathMockRecorder) EvalSymlinks(path interface{}) *gomock.Call

EvalSymlinks indicates an expected call of EvalSymlinks

func (*MockLimitedFilepathMockRecorder) Glob

func (mr *MockLimitedFilepathMockRecorder) Glob(pattern interface{}) *gomock.Call

Glob indicates an expected call of Glob

type MockLimitedIOUtil

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

MockLimitedIOUtil is a mock of LimitedIOUtil interface

func NewMockLimitedIOUtil

func NewMockLimitedIOUtil(ctrl *gomock.Controller) *MockLimitedIOUtil

NewMockLimitedIOUtil creates a new mock instance

func (*MockLimitedIOUtil) EXPECT

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

type MockLimitedIOUtilMockRecorder

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

MockLimitedIOUtilMockRecorder is the mock recorder for MockLimitedIOUtil

type MockLimitedOS

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

MockLimitedOS is a mock of LimitedOS interface

func NewMockLimitedOS

func NewMockLimitedOS(ctrl *gomock.Controller) *MockLimitedOS

NewMockLimitedOS creates a new mock instance

func (*MockLimitedOS) EXPECT

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

func (*MockLimitedOS) IsNotExist

func (m *MockLimitedOS) IsNotExist(err error) bool

IsNotExist mocks base method

func (*MockLimitedOS) Mkdir

func (m *MockLimitedOS) Mkdir(name string, perm os.FileMode) error

Mkdir mocks base method

func (*MockLimitedOS) OpenFile

func (m *MockLimitedOS) OpenFile(name string, flag int, perm os.FileMode) (LimitedFile, error)

OpenFile mocks base method

func (*MockLimitedOS) ReadFile added in v1.10.0

func (m *MockLimitedOS) ReadFile(filename string) ([]byte, error)

ReadFile mocks base method

func (*MockLimitedOS) Remove

func (m *MockLimitedOS) Remove(name string) error

Remove mocks base method

func (*MockLimitedOS) Stat

func (m *MockLimitedOS) Stat(name string) (LimitedFileInfo, error)

Stat mocks base method

type MockLimitedOSExec

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

MockLimitedOSExec is a mock of LimitedOSExec interface

func NewMockLimitedOSExec

func NewMockLimitedOSExec(ctrl *gomock.Controller) *MockLimitedOSExec

NewMockLimitedOSExec creates a new mock instance

func (*MockLimitedOSExec) CommandContext

func (m *MockLimitedOSExec) CommandContext(ctx context.Context, name string, arg ...string) LimitedOSExecCmd

CommandContext mocks base method

func (*MockLimitedOSExec) EXPECT

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

type MockLimitedOSExecCmd

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

MockLimitedOSExecCmd is a mock of LimitedOSExecCmd interface

func NewMockLimitedOSExecCmd

func NewMockLimitedOSExecCmd(ctrl *gomock.Controller) *MockLimitedOSExecCmd

NewMockLimitedOSExecCmd creates a new mock instance

func (*MockLimitedOSExecCmd) CombinedOutput

func (m *MockLimitedOSExecCmd) CombinedOutput() ([]byte, error)

CombinedOutput mocks base method

func (*MockLimitedOSExecCmd) EXPECT

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

type MockLimitedOSExecCmdMockRecorder

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

MockLimitedOSExecCmdMockRecorder is the mock recorder for MockLimitedOSExecCmd

func (*MockLimitedOSExecCmdMockRecorder) CombinedOutput

func (mr *MockLimitedOSExecCmdMockRecorder) CombinedOutput() *gomock.Call

CombinedOutput indicates an expected call of CombinedOutput

type MockLimitedOSExecMockRecorder

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

MockLimitedOSExecMockRecorder is the mock recorder for MockLimitedOSExec

func (*MockLimitedOSExecMockRecorder) CommandContext

func (mr *MockLimitedOSExecMockRecorder) CommandContext(ctx, name interface{}, arg ...interface{}) *gomock.Call

CommandContext indicates an expected call of CommandContext

type MockLimitedOSMockRecorder

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

MockLimitedOSMockRecorder is the mock recorder for MockLimitedOS

func (*MockLimitedOSMockRecorder) IsNotExist

func (mr *MockLimitedOSMockRecorder) IsNotExist(err interface{}) *gomock.Call

IsNotExist indicates an expected call of IsNotExist

func (*MockLimitedOSMockRecorder) Mkdir

func (mr *MockLimitedOSMockRecorder) Mkdir(name, perm interface{}) *gomock.Call

Mkdir indicates an expected call of Mkdir

func (*MockLimitedOSMockRecorder) OpenFile

func (mr *MockLimitedOSMockRecorder) OpenFile(name, flag, perm interface{}) *gomock.Call

OpenFile indicates an expected call of OpenFile

func (*MockLimitedOSMockRecorder) ReadFile added in v1.10.0

func (mr *MockLimitedOSMockRecorder) ReadFile(filename interface{}) *gomock.Call

ReadFile indicates an expected call of ReadFile

func (*MockLimitedOSMockRecorder) Remove

func (mr *MockLimitedOSMockRecorder) Remove(name interface{}) *gomock.Call

Remove indicates an expected call of Remove

func (*MockLimitedOSMockRecorder) Stat

func (mr *MockLimitedOSMockRecorder) Stat(name interface{}) *gomock.Call

Stat indicates an expected call of Stat

type NVMe added in v1.4.0

type NVMe interface {
	DiscoverNVMeTCPTargets(address string, login bool) ([]gonvme.NVMeTarget, error)
	DiscoverNVMeFCTargets(address string, login bool) ([]gonvme.NVMeTarget, error)
	GetInitiators(filename string) ([]string, error)
	NVMeTCPConnect(target gonvme.NVMeTarget, duplicateConnect bool) error
	NVMeFCConnect(target gonvme.NVMeTarget, duplicateConnect bool) error
	NVMeDisconnect(target gonvme.NVMeTarget) error
	GetSessions() ([]gonvme.NVMESession, error)
	ListNVMeDeviceAndNamespace() ([]gonvme.DevicePathAndNamespace, error)
	GetNVMeDeviceData(path string) (string, string, error)
}

NVMe defines NVMe function spec

type OSExecWrapper

type OSExecWrapper struct{}

OSExecWrapper contains implementation of LimitedOSExec interface

func (*OSExecWrapper) CommandContext

func (w *OSExecWrapper) CommandContext(ctx context.Context, name string, arg ...string) LimitedOSExecCmd

CommandContext is a wrapper of exec.CommandContext

type OSWrapper

type OSWrapper struct{}

OSWrapper contains implementation of LimitedOS interface

func (*OSWrapper) IsNotExist

func (io *OSWrapper) IsNotExist(err error) bool

IsNotExist is a wrapper of os.IsNotExist

func (*OSWrapper) Mkdir

func (io *OSWrapper) Mkdir(name string, perm os.FileMode) error

Mkdir is a wrapper of os.Mkdir

func (*OSWrapper) OpenFile

func (io *OSWrapper) OpenFile(name string, flag int, perm os.FileMode) (LimitedFile, error)

OpenFile is a wrapper of os.OpenFile

func (*OSWrapper) ReadFile added in v1.9.0

func (io *OSWrapper) ReadFile(filename string) ([]byte, error)

ReadFile is a wrapper of os.ReadFile

func (*OSWrapper) Remove

func (io *OSWrapper) Remove(name string) error

Remove is a wrapper of os.Remove

func (*OSWrapper) Stat

func (io *OSWrapper) Stat(name string) (LimitedFileInfo, error)

Stat is a wrapper of os.Stat

Jump to

Keyboard shortcuts

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