hooktest

package
v0.0.0-...-20647f5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockHandler

type MockHandler struct {
	BeforeCalled bool
	BeforeError  bool

	DoneCalled bool
	DoneError  bool

	ErrorCalled       bool
	ErrorError        bool
	IgnoreOriginalErr bool
	Err               error

	// callbacks useful for testing
	BeforeCallback func()
	DoneCallback   func()
}

MockHandler is a mock hookstate.Handler.

func NewMockHandler

func NewMockHandler() *MockHandler

NewMockHandler returns a new MockHandler.

func (*MockHandler) Before

func (h *MockHandler) Before() error

Before satisfies hookstate.Handler.Before

func (*MockHandler) Done

func (h *MockHandler) Done() error

Done satisfies hookstate.Handler.Done

func (*MockHandler) Error

func (h *MockHandler) Error(err error) (bool, error)

Error satisfies hookstate.Handler.Error

Jump to

Keyboard shortcuts

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