Documentation ¶
Index ¶
- type MockEngine
- type MockRequestHandler
- func (m *MockRequestHandler) GetConfig() engine.Config
- func (m *MockRequestHandler) GetEngine(cfg engine.Config, rs resource.Resource, pe *persist.Persister) engine.Engine
- func (m *MockRequestHandler) GetRequestParser() handlers.RequestParser
- func (m *MockRequestHandler) Output(rs handlers.RequestSession) (handlers.RequestSession, error)
- func (m *MockRequestHandler) Process(rqs handlers.RequestSession) (handlers.RequestSession, error)
- func (m *MockRequestHandler) Reset(rs handlers.RequestSession) (handlers.RequestSession, error)
- func (m *MockRequestHandler) Shutdown()
- type MockRequestParser
- type MockWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockEngine ¶
type MockEngine struct { InitFunc func(context.Context) (bool, error) ExecFunc func(context.Context, []byte) (bool, error) FlushFunc func(context.Context, io.Writer) (int, error) FinishFunc func() error }
MockEngine implements the engine.Engine interface for testing
func (*MockEngine) Finish ¶
func (m *MockEngine) Finish() error
type MockRequestHandler ¶
type MockRequestHandler struct { ProcessFunc func(handlers.RequestSession) (handlers.RequestSession, error) GetConfigFunc func() engine.Config GetEngineFunc func(cfg engine.Config, rs resource.Resource, pe *persist.Persister) engine.Engine OutputFunc func(rs handlers.RequestSession) (handlers.RequestSession, error) ResetFunc func(rs handlers.RequestSession) (handlers.RequestSession, error) ShutdownFunc func() GetRequestParserFunc func() handlers.RequestParser }
MockRequestHandler implements handlers.RequestHandler interface for testing
func (*MockRequestHandler) GetConfig ¶
func (m *MockRequestHandler) GetConfig() engine.Config
func (*MockRequestHandler) GetRequestParser ¶
func (m *MockRequestHandler) GetRequestParser() handlers.RequestParser
func (*MockRequestHandler) Output ¶
func (m *MockRequestHandler) Output(rs handlers.RequestSession) (handlers.RequestSession, error)
func (*MockRequestHandler) Process ¶
func (m *MockRequestHandler) Process(rqs handlers.RequestSession) (handlers.RequestSession, error)
func (*MockRequestHandler) Reset ¶
func (m *MockRequestHandler) Reset(rs handlers.RequestSession) (handlers.RequestSession, error)
func (*MockRequestHandler) Shutdown ¶
func (m *MockRequestHandler) Shutdown()
type MockRequestParser ¶
type MockRequestParser struct { GetSessionIdFunc func(any) (string, error) GetInputFunc func(any) ([]byte, error) }
MockRequestParser implements the handlers.RequestParser interface for testing
func (*MockRequestParser) GetSessionId ¶
func (m *MockRequestParser) GetSessionId(rq any) (string, error)
type MockWriter ¶
MockWriter implements a mock io.Writer for testing
func (*MockWriter) Header ¶
func (m *MockWriter) Header() http.Header
func (*MockWriter) WriteHeader ¶
func (m *MockWriter) WriteHeader(statusCode int)
func (*MockWriter) WriteString ¶
func (m *MockWriter) WriteString(s string) (n int, err error)
Click to show internal directories.
Click to hide internal directories.