mocks

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mocks provides mock implementations for testing.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMsg

type MockMsg struct {
	// contains filtered or unexported fields
}

MockMsg is a mock of Msg interface.

func NewMockMsg

func NewMockMsg(ctrl *gomock.Controller) *MockMsg

NewMockMsg creates a new mock instance.

func (*MockMsg) Ack

func (m *MockMsg) Ack() error

Ack mocks base method.

func (*MockMsg) Data

func (m *MockMsg) Data() []byte

Data mocks base method.

func (*MockMsg) DoubleAck

func (m *MockMsg) DoubleAck(arg0 context.Context) error

DoubleAck mocks base method.

func (*MockMsg) EXPECT

func (m *MockMsg) EXPECT() *MockMsgMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMsg) Headers

func (m *MockMsg) Headers() nats.Header

Headers mocks base method.

func (*MockMsg) InProgress

func (m *MockMsg) InProgress() error

InProgress mocks base method.

func (*MockMsg) Metadata

func (m *MockMsg) Metadata() (*jetstream.MsgMetadata, error)

Metadata mocks base method.

func (*MockMsg) Nak

func (m *MockMsg) Nak() error

Nak mocks base method.

func (*MockMsg) NakWithDelay

func (m *MockMsg) NakWithDelay(delay time.Duration) error

NakWithDelay mocks base method.

func (*MockMsg) Reply

func (m *MockMsg) Reply() string

Reply mocks base method.

func (*MockMsg) Subject

func (m *MockMsg) Subject() string

Subject mocks base method.

func (*MockMsg) Term

func (m *MockMsg) Term() error

Term mocks base method.

func (*MockMsg) TermWithReason

func (m *MockMsg) TermWithReason(reason string) error

TermWithReason mocks base method.

type MockMsgMockRecorder

type MockMsgMockRecorder struct {
	// contains filtered or unexported fields
}

MockMsgMockRecorder is the mock recorder for MockMsg.

func (*MockMsgMockRecorder) Ack

func (mr *MockMsgMockRecorder) Ack() *gomock.Call

Ack indicates an expected call of Ack.

func (*MockMsgMockRecorder) Data

func (mr *MockMsgMockRecorder) Data() *gomock.Call

Data indicates an expected call of Data.

func (*MockMsgMockRecorder) DoubleAck

func (mr *MockMsgMockRecorder) DoubleAck(arg0 any) *gomock.Call

DoubleAck indicates an expected call of DoubleAck.

func (*MockMsgMockRecorder) Headers

func (mr *MockMsgMockRecorder) Headers() *gomock.Call

Headers indicates an expected call of Headers.

func (*MockMsgMockRecorder) InProgress

func (mr *MockMsgMockRecorder) InProgress() *gomock.Call

InProgress indicates an expected call of InProgress.

func (*MockMsgMockRecorder) Metadata

func (mr *MockMsgMockRecorder) Metadata() *gomock.Call

Metadata indicates an expected call of Metadata.

func (*MockMsgMockRecorder) Nak

func (mr *MockMsgMockRecorder) Nak() *gomock.Call

Nak indicates an expected call of Nak.

func (*MockMsgMockRecorder) NakWithDelay

func (mr *MockMsgMockRecorder) NakWithDelay(delay any) *gomock.Call

NakWithDelay indicates an expected call of NakWithDelay.

func (*MockMsgMockRecorder) Reply

func (mr *MockMsgMockRecorder) Reply() *gomock.Call

Reply indicates an expected call of Reply.

func (*MockMsgMockRecorder) Subject

func (mr *MockMsgMockRecorder) Subject() *gomock.Call

Subject indicates an expected call of Subject.

func (*MockMsgMockRecorder) Term

func (mr *MockMsgMockRecorder) Term() *gomock.Call

Term indicates an expected call of Term.

func (*MockMsgMockRecorder) TermWithReason

func (mr *MockMsgMockRecorder) TermWithReason(reason any) *gomock.Call

TermWithReason indicates an expected call of TermWithReason.

type MockStore

type MockStore struct {
	// contains filtered or unexported fields
}

MockStore is a mock of Store interface.

func NewMockStore

func NewMockStore(ctrl *gomock.Controller) *MockStore

NewMockStore creates a new mock instance.

func (*MockStore) EXPECT

func (m *MockStore) EXPECT() *MockStoreMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStore) Get

func (m *MockStore) Get(ctx context.Context, id string) (*audit.Entry, error)

Get mocks base method.

func (*MockStore) List

func (m *MockStore) List(ctx context.Context, limit, offset int) ([]audit.Entry, int, error)

List mocks base method.

func (*MockStore) ListAll

func (m *MockStore) ListAll(ctx context.Context) ([]audit.Entry, error)

ListAll mocks base method.

func (*MockStore) Write

func (m *MockStore) Write(ctx context.Context, entry audit.Entry) error

Write mocks base method.

type MockStoreMockRecorder

type MockStoreMockRecorder struct {
	// contains filtered or unexported fields
}

MockStoreMockRecorder is the mock recorder for MockStore.

func (*MockStoreMockRecorder) Get

func (mr *MockStoreMockRecorder) Get(ctx, id any) *gomock.Call

Get indicates an expected call of Get.

func (*MockStoreMockRecorder) List

func (mr *MockStoreMockRecorder) List(ctx, limit, offset any) *gomock.Call

List indicates an expected call of List.

func (*MockStoreMockRecorder) ListAll

func (mr *MockStoreMockRecorder) ListAll(ctx any) *gomock.Call

ListAll indicates an expected call of ListAll.

func (*MockStoreMockRecorder) Write

func (mr *MockStoreMockRecorder) Write(ctx, entry any) *gomock.Call

Write indicates an expected call of Write.

type MockStream

type MockStream struct {
	// contains filtered or unexported fields
}

MockStream is a mock of Stream interface.

func NewMockStream

func NewMockStream(ctrl *gomock.Controller) *MockStream

NewMockStream creates a new mock instance.

func (*MockStream) EXPECT

func (m *MockStream) EXPECT() *MockStreamMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStream) Publish added in v0.3.0

func (m *MockStream) Publish(ctx context.Context, subject string, data []byte) error

Publish mocks base method.

func (*MockStream) StreamInfo added in v0.3.0

func (m *MockStream) StreamInfo(ctx context.Context, name string) (*jetstream.StreamInfo, error)

StreamInfo mocks base method.

func (*MockStream) StreamLastMsg added in v0.3.0

func (m *MockStream) StreamLastMsg(ctx context.Context, name, subject string) (*jetstream.RawStreamMsg, error)

StreamLastMsg mocks base method.

func (*MockStream) StreamRead added in v0.3.0

func (m *MockStream) StreamRead(ctx context.Context, name string, from uint64, count int) ([]jetstream.Msg, error)

StreamRead mocks base method.

type MockStreamMockRecorder

type MockStreamMockRecorder struct {
	// contains filtered or unexported fields
}

MockStreamMockRecorder is the mock recorder for MockStream.

func (*MockStreamMockRecorder) Publish added in v0.3.0

func (mr *MockStreamMockRecorder) Publish(ctx, subject, data any) *gomock.Call

Publish indicates an expected call of Publish.

func (*MockStreamMockRecorder) StreamInfo added in v0.3.0

func (mr *MockStreamMockRecorder) StreamInfo(ctx, name any) *gomock.Call

StreamInfo indicates an expected call of StreamInfo.

func (*MockStreamMockRecorder) StreamLastMsg added in v0.3.0

func (mr *MockStreamMockRecorder) StreamLastMsg(ctx, name, subject any) *gomock.Call

StreamLastMsg indicates an expected call of StreamLastMsg.

func (*MockStreamMockRecorder) StreamRead added in v0.3.0

func (mr *MockStreamMockRecorder) StreamRead(ctx, name, from, count any) *gomock.Call

StreamRead indicates an expected call of StreamRead.

Jump to

Keyboard shortcuts

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