Documentation ¶
Index ¶
- type BrokerProviderMock
- func (p *BrokerProviderMock) GracefulStop(ctx context.Context) error
- func (p *BrokerProviderMock) Init(opts *broker.InitOptions)
- func (p *BrokerProviderMock) Publish(ctx context.Context, topic string, msg *broker.Message) error
- func (p *BrokerProviderMock) Subscribe(ctx context.Context, topic string, handler broker.SubscribeHandler) error
- type EngineMock
- type EngineMockRenderCallArgs
- type PublishCallArgs
- type ResponseMock
- type SubscribeCallArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerProviderMock ¶
type BrokerProviderMock struct { InitCalled bool PublishCalled bool PublishCallArgs *PublishCallArgs SubscribeCalled bool SubscribeCallArgs *SubscribeCallArgs }
func (*BrokerProviderMock) GracefulStop ¶
func (p *BrokerProviderMock) GracefulStop(ctx context.Context) error
func (*BrokerProviderMock) Init ¶
func (p *BrokerProviderMock) Init(opts *broker.InitOptions)
func (*BrokerProviderMock) Subscribe ¶
func (p *BrokerProviderMock) Subscribe(ctx context.Context, topic string, handler broker.SubscribeHandler) error
type EngineMock ¶
type EngineMock struct { InitCalled bool RenderCalled bool RenderCallArgs *EngineMockRenderCallArgs }
func (*EngineMock) Init ¶
func (e *EngineMock) Init() error
func (*EngineMock) Render ¶
func (e *EngineMock) Render(w http.ResponseWriter, status int, template string, data *sync.Map) error
type EngineMockRenderCallArgs ¶
type EngineMockRenderCallArgs struct {
// contains filtered or unexported fields
}
type PublishCallArgs ¶
type ResponseMock ¶
type ResponseMock struct {
// contains filtered or unexported fields
}
func NewResponseMock ¶
func NewResponseMock(t *testing.T) *ResponseMock
func (*ResponseMock) Assert ¶
func (r *ResponseMock) Assert(status int, body string)
func (*ResponseMock) Header ¶
func (r *ResponseMock) Header() http.Header
func (*ResponseMock) WriteHeader ¶
func (r *ResponseMock) WriteHeader(status int)
type SubscribeCallArgs ¶
type SubscribeCallArgs struct { Ctx context.Context Topic string Handler broker.SubscribeHandler }
Click to show internal directories.
Click to hide internal directories.