Documentation
¶
Overview ¶
Package hook is a generated GoMock package.
Index ¶
- Constants
- Variables
- type ActionHook
- type ActionMap
- type Manager
- type MockActionHook
- type MockActionHookMockRecorder
- type MockManager
- func (m *MockManager) Close() error
- func (m *MockManager) EXPECT() *MockManagerMockRecorder
- func (m *MockManager) Errors() []error
- func (m *MockManager) OnAfterCreate(ctx context.Context, path string)
- func (m *MockManager) OnAfterRemove(ctx context.Context, path string)
- func (m *MockManager) OnAfterUpdate(ctx context.Context, path string)
- func (m *MockManager) OnBeforeCreate(ctx context.Context, path string)
- func (m *MockManager) OnBeforeRemove(ctx context.Context, path string)
- func (m *MockManager) OnBeforeUpdate(ctx context.Context, path string)
- func (m *MockManager) Run(ctx context.Context)
- func (m *MockManager) Sync(current, desired *v1alpha1.RenderedDeviceSpec) error
- type MockManagerMockRecorder
- func (mr *MockManagerMockRecorder) Close() *gomock.Call
- func (mr *MockManagerMockRecorder) Errors() *gomock.Call
- func (mr *MockManagerMockRecorder) OnAfterCreate(ctx, path any) *gomock.Call
- func (mr *MockManagerMockRecorder) OnAfterRemove(ctx, path any) *gomock.Call
- func (mr *MockManagerMockRecorder) OnAfterUpdate(ctx, path any) *gomock.Call
- func (mr *MockManagerMockRecorder) OnBeforeCreate(ctx, path any) *gomock.Call
- func (mr *MockManagerMockRecorder) OnBeforeRemove(ctx, path any) *gomock.Call
- func (mr *MockManagerMockRecorder) OnBeforeUpdate(ctx, path any) *gomock.Call
- func (mr *MockManagerMockRecorder) Run(ctx any) *gomock.Call
- func (mr *MockManagerMockRecorder) Sync(current, desired any) *gomock.Call
Constants ¶
const ( SystemdActionType = "systemd" ExecutableActionType = "executable" // FilePathKey is a placeholder which will be replaced with the file path FilePathKey = "FilePath" )
const (
DefaultHookActionTimeout = 10 * time.Second
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ActionMap ¶
type ActionMap map[string][]ActionHook
type Manager ¶
type Manager interface {
Run(ctx context.Context)
Sync(current, desired *v1alpha1.RenderedDeviceSpec) error
OnBeforeCreate(ctx context.Context, path string)
OnAfterCreate(ctx context.Context, path string)
OnBeforeUpdate(ctx context.Context, path string)
OnAfterUpdate(ctx context.Context, path string)
OnBeforeRemove(ctx context.Context, path string)
OnAfterRemove(ctx context.Context, path string)
Errors() []error
Close() error
}
func NewManager ¶
func NewManager(exec executer.Executer, log *log.PrefixLogger) Manager
type MockActionHook ¶
type MockActionHook struct {
// contains filtered or unexported fields
}
MockActionHook is a mock of ActionHook interface.
func NewMockActionHook ¶
func NewMockActionHook(ctrl *gomock.Controller) *MockActionHook
NewMockActionHook creates a new mock instance.
func (*MockActionHook) EXPECT ¶
func (m *MockActionHook) EXPECT() *MockActionHookMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockActionHookMockRecorder ¶
type MockActionHookMockRecorder struct {
// contains filtered or unexported fields
}
MockActionHookMockRecorder is the mock recorder for MockActionHook.
type MockManager ¶
type MockManager struct {
// contains filtered or unexported fields
}
MockManager is a mock of Manager interface.
func NewMockManager ¶
func NewMockManager(ctrl *gomock.Controller) *MockManager
NewMockManager creates a new mock instance.
func (*MockManager) EXPECT ¶
func (m *MockManager) EXPECT() *MockManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManager) OnAfterCreate ¶
func (m *MockManager) OnAfterCreate(ctx context.Context, path string)
OnAfterCreate mocks base method.
func (*MockManager) OnAfterRemove ¶
func (m *MockManager) OnAfterRemove(ctx context.Context, path string)
OnAfterRemove mocks base method.
func (*MockManager) OnAfterUpdate ¶
func (m *MockManager) OnAfterUpdate(ctx context.Context, path string)
OnAfterUpdate mocks base method.
func (*MockManager) OnBeforeCreate ¶
func (m *MockManager) OnBeforeCreate(ctx context.Context, path string)
OnBeforeCreate mocks base method.
func (*MockManager) OnBeforeRemove ¶
func (m *MockManager) OnBeforeRemove(ctx context.Context, path string)
OnBeforeRemove mocks base method.
func (*MockManager) OnBeforeUpdate ¶
func (m *MockManager) OnBeforeUpdate(ctx context.Context, path string)
OnBeforeUpdate mocks base method.
func (*MockManager) Sync ¶
func (m *MockManager) Sync(current, desired *v1alpha1.RenderedDeviceSpec) error
Sync mocks base method.
type MockManagerMockRecorder ¶
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager.
func (*MockManagerMockRecorder) Close ¶
func (mr *MockManagerMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockManagerMockRecorder) Errors ¶
func (mr *MockManagerMockRecorder) Errors() *gomock.Call
Errors indicates an expected call of Errors.
func (*MockManagerMockRecorder) OnAfterCreate ¶
func (mr *MockManagerMockRecorder) OnAfterCreate(ctx, path any) *gomock.Call
OnAfterCreate indicates an expected call of OnAfterCreate.
func (*MockManagerMockRecorder) OnAfterRemove ¶
func (mr *MockManagerMockRecorder) OnAfterRemove(ctx, path any) *gomock.Call
OnAfterRemove indicates an expected call of OnAfterRemove.
func (*MockManagerMockRecorder) OnAfterUpdate ¶
func (mr *MockManagerMockRecorder) OnAfterUpdate(ctx, path any) *gomock.Call
OnAfterUpdate indicates an expected call of OnAfterUpdate.
func (*MockManagerMockRecorder) OnBeforeCreate ¶
func (mr *MockManagerMockRecorder) OnBeforeCreate(ctx, path any) *gomock.Call
OnBeforeCreate indicates an expected call of OnBeforeCreate.
func (*MockManagerMockRecorder) OnBeforeRemove ¶
func (mr *MockManagerMockRecorder) OnBeforeRemove(ctx, path any) *gomock.Call
OnBeforeRemove indicates an expected call of OnBeforeRemove.
func (*MockManagerMockRecorder) OnBeforeUpdate ¶
func (mr *MockManagerMockRecorder) OnBeforeUpdate(ctx, path any) *gomock.Call
OnBeforeUpdate indicates an expected call of OnBeforeUpdate.