Documentation ¶
Overview ¶
Package driver is a generated GoMock package.
Index ¶
- Variables
- type CSICreds
- type CSIDriver
- type CSIDriverServers
- type LogGRPC
- type MockCSIDriver
- type MockCSIDriverServers
- type MockControllerServer
- func (m *MockControllerServer) ControllerExpandVolume(arg0 context.Context, arg1 *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (m *MockControllerServer) ControllerGetCapabilities(arg0 context.Context, arg1 *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (m *MockControllerServer) ControllerGetVolume(arg0 context.Context, arg1 *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (m *MockControllerServer) ControllerPublishVolume(arg0 context.Context, arg1 *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (m *MockControllerServer) ControllerUnpublishVolume(arg0 context.Context, arg1 *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (m *MockControllerServer) CreateSnapshot(arg0 context.Context, arg1 *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (m *MockControllerServer) CreateVolume(arg0 context.Context, arg1 *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (m *MockControllerServer) DeleteSnapshot(arg0 context.Context, arg1 *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (m *MockControllerServer) DeleteVolume(arg0 context.Context, arg1 *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (m *MockControllerServer) EXPECT() *MockControllerServerMockRecorder
- func (m *MockControllerServer) GetCapacity(arg0 context.Context, arg1 *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (m *MockControllerServer) ListSnapshots(arg0 context.Context, arg1 *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (m *MockControllerServer) ListVolumes(arg0 context.Context, arg1 *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (m *MockControllerServer) ValidateVolumeCapabilities(arg0 context.Context, arg1 *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type MockControllerServerMockRecorder
- func (mr *MockControllerServerMockRecorder) ControllerExpandVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) ControllerGetCapabilities(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) ControllerGetVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) ControllerPublishVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) ControllerUnpublishVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) CreateSnapshot(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) CreateVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) DeleteSnapshot(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) DeleteVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) GetCapacity(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) ListSnapshots(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) ListVolumes(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockControllerServerMockRecorder) ValidateVolumeCapabilities(arg0, arg1 interface{}) *gomock.Call
- type MockIdentityServer
- func (m *MockIdentityServer) EXPECT() *MockIdentityServerMockRecorder
- func (m *MockIdentityServer) GetPluginCapabilities(arg0 context.Context, arg1 *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (m *MockIdentityServer) GetPluginInfo(arg0 context.Context, arg1 *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (m *MockIdentityServer) Probe(arg0 context.Context, arg1 *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type MockIdentityServerMockRecorder
- type MockNodeServer
- func (m *MockNodeServer) EXPECT() *MockNodeServerMockRecorder
- func (m *MockNodeServer) NodeExpandVolume(arg0 context.Context, arg1 *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (m *MockNodeServer) NodeGetCapabilities(arg0 context.Context, arg1 *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (m *MockNodeServer) NodeGetInfo(arg0 context.Context, arg1 *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (m *MockNodeServer) NodeGetVolumeStats(arg0 context.Context, arg1 *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (m *MockNodeServer) NodePublishVolume(arg0 context.Context, arg1 *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (m *MockNodeServer) NodeStageVolume(arg0 context.Context, arg1 *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (m *MockNodeServer) NodeUnpublishVolume(arg0 context.Context, arg1 *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (m *MockNodeServer) NodeUnstageVolume(arg0 context.Context, arg1 *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- type MockNodeServerMockRecorder
- func (mr *MockNodeServerMockRecorder) NodeExpandVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockNodeServerMockRecorder) NodeGetCapabilities(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockNodeServerMockRecorder) NodeGetInfo(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockNodeServerMockRecorder) NodeGetVolumeStats(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockNodeServerMockRecorder) NodePublishVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockNodeServerMockRecorder) NodeStageVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockNodeServerMockRecorder) NodeUnpublishVolume(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockNodeServerMockRecorder) NodeUnstageVolume(arg0, arg1 interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoCredentials is the error when a secret is enabled but not passed in the request. ErrNoCredentials = errors.New("secret must be provided") // ErrAuthFailed is the error when the secret is incorrect. ErrAuthFailed = errors.New("authentication failed") )
Functions ¶
This section is empty.
Types ¶
type CSICreds ¶
type CSICreds struct { CreateVolumeSecret string DeleteVolumeSecret string ControllerPublishVolumeSecret string ControllerUnpublishVolumeSecret string NodeStageVolumeSecret string NodePublishVolumeSecret string CreateSnapshotSecret string DeleteSnapshotSecret string ControllerValidateVolumeCapabilitiesSecret string }
CSICreds is a driver specific secret type. Drivers can have a key-val pair of secrets. This mock driver has a single string secret with secretField as the key.
type CSIDriver ¶
type CSIDriver struct {
// contains filtered or unexported fields
}
func NewCSIDriver ¶
func NewCSIDriver(servers *CSIDriverServers) *CSIDriver
func (*CSIDriver) SetDefaultCreds ¶
func (c *CSIDriver) SetDefaultCreds()
SetDefaultCreds sets the default secrets for CSI creds.
type CSIDriverServers ¶
type CSIDriverServers struct { Controller csi.ControllerServer Identity csi.IdentityServer Node csi.NodeServer }
CSIDriverServers is a unified driver component with both Controller and Node services.
type MockCSIDriver ¶
type MockCSIDriver struct { CSIDriver // contains filtered or unexported fields }
func NewMockCSIDriver ¶
func NewMockCSIDriver(servers *MockCSIDriverServers, interceptor grpc.UnaryServerInterceptor) *MockCSIDriver
func (*MockCSIDriver) Close ¶
func (m *MockCSIDriver) Close()
func (*MockCSIDriver) Start ¶
func (m *MockCSIDriver) Start() error
Start starts a new gRPC server listening on a random TCP loopback port.
func (*MockCSIDriver) StartOnAddress ¶
func (m *MockCSIDriver) StartOnAddress(network, address string) error
StartOnAddress starts a new gRPC server listening on given address.
type MockCSIDriverServers ¶
type MockCSIDriverServers struct { Controller *MockControllerServer Identity *MockIdentityServer Node *MockNodeServer }
type MockControllerServer ¶
type MockControllerServer struct {
// contains filtered or unexported fields
}
MockControllerServer is a mock of ControllerServer interface
func NewMockControllerServer ¶
func NewMockControllerServer(ctrl *gomock.Controller) *MockControllerServer
NewMockControllerServer creates a new mock instance
func (*MockControllerServer) ControllerExpandVolume ¶
func (m *MockControllerServer) ControllerExpandVolume(arg0 context.Context, arg1 *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume mocks base method
func (*MockControllerServer) ControllerGetCapabilities ¶
func (m *MockControllerServer) ControllerGetCapabilities(arg0 context.Context, arg1 *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities mocks base method
func (*MockControllerServer) ControllerGetVolume ¶
func (m *MockControllerServer) ControllerGetVolume(arg0 context.Context, arg1 *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume mocks base method
func (*MockControllerServer) ControllerPublishVolume ¶
func (m *MockControllerServer) ControllerPublishVolume(arg0 context.Context, arg1 *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume mocks base method
func (*MockControllerServer) ControllerUnpublishVolume ¶
func (m *MockControllerServer) ControllerUnpublishVolume(arg0 context.Context, arg1 *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume mocks base method
func (*MockControllerServer) CreateSnapshot ¶
func (m *MockControllerServer) CreateSnapshot(arg0 context.Context, arg1 *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
CreateSnapshot mocks base method
func (*MockControllerServer) CreateVolume ¶
func (m *MockControllerServer) CreateVolume(arg0 context.Context, arg1 *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume mocks base method
func (*MockControllerServer) DeleteSnapshot ¶
func (m *MockControllerServer) DeleteSnapshot(arg0 context.Context, arg1 *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
DeleteSnapshot mocks base method
func (*MockControllerServer) DeleteVolume ¶
func (m *MockControllerServer) DeleteVolume(arg0 context.Context, arg1 *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume mocks base method
func (*MockControllerServer) EXPECT ¶
func (m *MockControllerServer) EXPECT() *MockControllerServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockControllerServer) GetCapacity ¶
func (m *MockControllerServer) GetCapacity(arg0 context.Context, arg1 *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
GetCapacity mocks base method
func (*MockControllerServer) ListSnapshots ¶
func (m *MockControllerServer) ListSnapshots(arg0 context.Context, arg1 *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
ListSnapshots mocks base method
func (*MockControllerServer) ListVolumes ¶
func (m *MockControllerServer) ListVolumes(arg0 context.Context, arg1 *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
ListVolumes mocks base method
func (*MockControllerServer) ValidateVolumeCapabilities ¶
func (m *MockControllerServer) ValidateVolumeCapabilities(arg0 context.Context, arg1 *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities mocks base method
type MockControllerServerMockRecorder ¶
type MockControllerServerMockRecorder struct {
// contains filtered or unexported fields
}
MockControllerServerMockRecorder is the mock recorder for MockControllerServer
func (*MockControllerServerMockRecorder) ControllerExpandVolume ¶
func (mr *MockControllerServerMockRecorder) ControllerExpandVolume(arg0, arg1 interface{}) *gomock.Call
ControllerExpandVolume indicates an expected call of ControllerExpandVolume
func (*MockControllerServerMockRecorder) ControllerGetCapabilities ¶
func (mr *MockControllerServerMockRecorder) ControllerGetCapabilities(arg0, arg1 interface{}) *gomock.Call
ControllerGetCapabilities indicates an expected call of ControllerGetCapabilities
func (*MockControllerServerMockRecorder) ControllerGetVolume ¶
func (mr *MockControllerServerMockRecorder) ControllerGetVolume(arg0, arg1 interface{}) *gomock.Call
ControllerGetVolume indicates an expected call of ControllerGetVolume
func (*MockControllerServerMockRecorder) ControllerPublishVolume ¶
func (mr *MockControllerServerMockRecorder) ControllerPublishVolume(arg0, arg1 interface{}) *gomock.Call
ControllerPublishVolume indicates an expected call of ControllerPublishVolume
func (*MockControllerServerMockRecorder) ControllerUnpublishVolume ¶
func (mr *MockControllerServerMockRecorder) ControllerUnpublishVolume(arg0, arg1 interface{}) *gomock.Call
ControllerUnpublishVolume indicates an expected call of ControllerUnpublishVolume
func (*MockControllerServerMockRecorder) CreateSnapshot ¶
func (mr *MockControllerServerMockRecorder) CreateSnapshot(arg0, arg1 interface{}) *gomock.Call
CreateSnapshot indicates an expected call of CreateSnapshot
func (*MockControllerServerMockRecorder) CreateVolume ¶
func (mr *MockControllerServerMockRecorder) CreateVolume(arg0, arg1 interface{}) *gomock.Call
CreateVolume indicates an expected call of CreateVolume
func (*MockControllerServerMockRecorder) DeleteSnapshot ¶
func (mr *MockControllerServerMockRecorder) DeleteSnapshot(arg0, arg1 interface{}) *gomock.Call
DeleteSnapshot indicates an expected call of DeleteSnapshot
func (*MockControllerServerMockRecorder) DeleteVolume ¶
func (mr *MockControllerServerMockRecorder) DeleteVolume(arg0, arg1 interface{}) *gomock.Call
DeleteVolume indicates an expected call of DeleteVolume
func (*MockControllerServerMockRecorder) GetCapacity ¶
func (mr *MockControllerServerMockRecorder) GetCapacity(arg0, arg1 interface{}) *gomock.Call
GetCapacity indicates an expected call of GetCapacity
func (*MockControllerServerMockRecorder) ListSnapshots ¶
func (mr *MockControllerServerMockRecorder) ListSnapshots(arg0, arg1 interface{}) *gomock.Call
ListSnapshots indicates an expected call of ListSnapshots
func (*MockControllerServerMockRecorder) ListVolumes ¶
func (mr *MockControllerServerMockRecorder) ListVolumes(arg0, arg1 interface{}) *gomock.Call
ListVolumes indicates an expected call of ListVolumes
func (*MockControllerServerMockRecorder) ValidateVolumeCapabilities ¶
func (mr *MockControllerServerMockRecorder) ValidateVolumeCapabilities(arg0, arg1 interface{}) *gomock.Call
ValidateVolumeCapabilities indicates an expected call of ValidateVolumeCapabilities
type MockIdentityServer ¶
type MockIdentityServer struct {
// contains filtered or unexported fields
}
MockIdentityServer is a mock of IdentityServer interface
func NewMockIdentityServer ¶
func NewMockIdentityServer(ctrl *gomock.Controller) *MockIdentityServer
NewMockIdentityServer creates a new mock instance
func (*MockIdentityServer) EXPECT ¶
func (m *MockIdentityServer) EXPECT() *MockIdentityServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockIdentityServer) GetPluginCapabilities ¶
func (m *MockIdentityServer) GetPluginCapabilities(arg0 context.Context, arg1 *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities mocks base method
func (*MockIdentityServer) GetPluginInfo ¶
func (m *MockIdentityServer) GetPluginInfo(arg0 context.Context, arg1 *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo mocks base method
func (*MockIdentityServer) Probe ¶
func (m *MockIdentityServer) Probe(arg0 context.Context, arg1 *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe mocks base method
type MockIdentityServerMockRecorder ¶
type MockIdentityServerMockRecorder struct {
// contains filtered or unexported fields
}
MockIdentityServerMockRecorder is the mock recorder for MockIdentityServer
func (*MockIdentityServerMockRecorder) GetPluginCapabilities ¶
func (mr *MockIdentityServerMockRecorder) GetPluginCapabilities(arg0, arg1 interface{}) *gomock.Call
GetPluginCapabilities indicates an expected call of GetPluginCapabilities
func (*MockIdentityServerMockRecorder) GetPluginInfo ¶
func (mr *MockIdentityServerMockRecorder) GetPluginInfo(arg0, arg1 interface{}) *gomock.Call
GetPluginInfo indicates an expected call of GetPluginInfo
func (*MockIdentityServerMockRecorder) Probe ¶
func (mr *MockIdentityServerMockRecorder) Probe(arg0, arg1 interface{}) *gomock.Call
Probe indicates an expected call of Probe
type MockNodeServer ¶
type MockNodeServer struct {
// contains filtered or unexported fields
}
MockNodeServer is a mock of NodeServer interface
func NewMockNodeServer ¶
func NewMockNodeServer(ctrl *gomock.Controller) *MockNodeServer
NewMockNodeServer creates a new mock instance
func (*MockNodeServer) EXPECT ¶
func (m *MockNodeServer) EXPECT() *MockNodeServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockNodeServer) NodeExpandVolume ¶
func (m *MockNodeServer) NodeExpandVolume(arg0 context.Context, arg1 *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
NodeExpandVolume mocks base method
func (*MockNodeServer) NodeGetCapabilities ¶
func (m *MockNodeServer) NodeGetCapabilities(arg0 context.Context, arg1 *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities mocks base method
func (*MockNodeServer) NodeGetInfo ¶
func (m *MockNodeServer) NodeGetInfo(arg0 context.Context, arg1 *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
NodeGetInfo mocks base method
func (*MockNodeServer) NodeGetVolumeStats ¶
func (m *MockNodeServer) NodeGetVolumeStats(arg0 context.Context, arg1 *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
NodeGetVolumeStats mocks base method
func (*MockNodeServer) NodePublishVolume ¶
func (m *MockNodeServer) NodePublishVolume(arg0 context.Context, arg1 *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume mocks base method
func (*MockNodeServer) NodeStageVolume ¶
func (m *MockNodeServer) NodeStageVolume(arg0 context.Context, arg1 *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
NodeStageVolume mocks base method
func (*MockNodeServer) NodeUnpublishVolume ¶
func (m *MockNodeServer) NodeUnpublishVolume(arg0 context.Context, arg1 *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume mocks base method
func (*MockNodeServer) NodeUnstageVolume ¶
func (m *MockNodeServer) NodeUnstageVolume(arg0 context.Context, arg1 *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
NodeUnstageVolume mocks base method
type MockNodeServerMockRecorder ¶
type MockNodeServerMockRecorder struct {
// contains filtered or unexported fields
}
MockNodeServerMockRecorder is the mock recorder for MockNodeServer
func (*MockNodeServerMockRecorder) NodeExpandVolume ¶
func (mr *MockNodeServerMockRecorder) NodeExpandVolume(arg0, arg1 interface{}) *gomock.Call
NodeExpandVolume indicates an expected call of NodeExpandVolume
func (*MockNodeServerMockRecorder) NodeGetCapabilities ¶
func (mr *MockNodeServerMockRecorder) NodeGetCapabilities(arg0, arg1 interface{}) *gomock.Call
NodeGetCapabilities indicates an expected call of NodeGetCapabilities
func (*MockNodeServerMockRecorder) NodeGetInfo ¶
func (mr *MockNodeServerMockRecorder) NodeGetInfo(arg0, arg1 interface{}) *gomock.Call
NodeGetInfo indicates an expected call of NodeGetInfo
func (*MockNodeServerMockRecorder) NodeGetVolumeStats ¶
func (mr *MockNodeServerMockRecorder) NodeGetVolumeStats(arg0, arg1 interface{}) *gomock.Call
NodeGetVolumeStats indicates an expected call of NodeGetVolumeStats
func (*MockNodeServerMockRecorder) NodePublishVolume ¶
func (mr *MockNodeServerMockRecorder) NodePublishVolume(arg0, arg1 interface{}) *gomock.Call
NodePublishVolume indicates an expected call of NodePublishVolume
func (*MockNodeServerMockRecorder) NodeStageVolume ¶
func (mr *MockNodeServerMockRecorder) NodeStageVolume(arg0, arg1 interface{}) *gomock.Call
NodeStageVolume indicates an expected call of NodeStageVolume
func (*MockNodeServerMockRecorder) NodeUnpublishVolume ¶
func (mr *MockNodeServerMockRecorder) NodeUnpublishVolume(arg0, arg1 interface{}) *gomock.Call
NodeUnpublishVolume indicates an expected call of NodeUnpublishVolume
func (*MockNodeServerMockRecorder) NodeUnstageVolume ¶
func (mr *MockNodeServerMockRecorder) NodeUnstageVolume(arg0, arg1 interface{}) *gomock.Call
NodeUnstageVolume indicates an expected call of NodeUnstageVolume