hooktest

package
v0.0.0-...-9e584df Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 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