Help us shape the future of Go! Take the 2026 Go Developer Survey

mocks

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 4 Imported by: 0

README

Generated core-interface doubles

The current three files are generated from core/worker.go by explicitly selected go.uber.org/mock/mockgen v0.6.0, not an ambient executable. Run from the repository root with Go 1.27.2 and normal public proxy/SumDB:

GOTOOLCHAIN=go1.27.2 GOWORK=off go generate ./mocks
git diff -- mocks/mock_worker.go mocks/mock_queued_message.go mocks/mock_task_message.go
GOTOOLCHAIN=go1.27.2 GOWORK=off go test . ./core ./job ./mocks

The directives execute in mocks/ with relative destination names and the unversioned github.com/faustbrian/go-queue/core import path. Regenerate all three files after a reviewed interface or producer change; do not manually edit generated bodies. The root module's runtime dependency pin alone does not identify a generator.

Authenticated migration inputs

The selected producer is Apache-2.0 licensed. Public module authentication resolved https://github.com/uber/mock tag v0.6.0 to commit 2d1c58167e30f380cf78e44a43b100a14767e817, with module sums:

  • Module: h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=
  • go.mod: h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU=

At migration, the owning interface input SHA-256 was c0abbf226a1796b703b392123660390fcc162ef0fbdf3f0c8ffb60c1b88d76bc. Two independent output directories produced identical bytes with these inputs. Generated file headers truthfully record MockGen and its relative commands; the pinned directives and this record identify the selected producer version.

The inherited generator version is still unknown. The historical source audit retains the original failed reproduction and provenance uncertainty; this is a future producer migration, not historical attribution. The selected producer adds private isgomock markers and retains Worker parameter names. GoMock may now format mock arguments by type in unexpected-call diagnostics. Interface methods, recording and successful return behavior must remain compatible; generated diagnostic bytes are not a delivery/runtime guarantee.

Documentation

Overview

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks contains externally generated GoMock doubles for core interfaces. Current outputs use the explicitly selected MockGen v0.6.0 producer below; see README.md for authenticated inputs and reproduction. The inherited outputs' original producer remains unknown, independently of the runtime dependency pin. Do not manually edit generated bodies. Commands run from this directory and bind the unversioned root core path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockQueuedMessage

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

MockQueuedMessage is a mock of QueuedMessage interface.

func NewMockQueuedMessage

func NewMockQueuedMessage(ctrl *gomock.Controller) *MockQueuedMessage

NewMockQueuedMessage creates a new mock instance.

func (*MockQueuedMessage) Bytes

func (m *MockQueuedMessage) Bytes() []byte

Bytes mocks base method.

func (*MockQueuedMessage) EXPECT

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

type MockQueuedMessageMockRecorder

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

MockQueuedMessageMockRecorder is the mock recorder for MockQueuedMessage.

func (*MockQueuedMessageMockRecorder) Bytes

Bytes indicates an expected call of Bytes.

type MockTaskMessage

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

MockTaskMessage is a mock of TaskMessage interface.

func NewMockTaskMessage

func NewMockTaskMessage(ctrl *gomock.Controller) *MockTaskMessage

NewMockTaskMessage creates a new mock instance.

func (*MockTaskMessage) Bytes

func (m *MockTaskMessage) Bytes() []byte

Bytes mocks base method.

func (*MockTaskMessage) EXPECT

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

func (*MockTaskMessage) Payload

func (m *MockTaskMessage) Payload() []byte

Payload mocks base method.

type MockTaskMessageMockRecorder

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

MockTaskMessageMockRecorder is the mock recorder for MockTaskMessage.

func (*MockTaskMessageMockRecorder) Bytes

Bytes indicates an expected call of Bytes.

func (*MockTaskMessageMockRecorder) Payload

func (mr *MockTaskMessageMockRecorder) Payload() *gomock.Call

Payload indicates an expected call of Payload.

type MockWorker

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

MockWorker is a mock of Worker interface.

func NewMockWorker

func NewMockWorker(ctrl *gomock.Controller) *MockWorker

NewMockWorker creates a new mock instance.

func (*MockWorker) EXPECT

func (m *MockWorker) EXPECT() *MockWorkerMockRecorder

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

func (*MockWorker) Queue

func (m *MockWorker) Queue(task core.TaskMessage) error

Queue mocks base method.

func (*MockWorker) Request

func (m *MockWorker) Request() (core.TaskMessage, error)

Request mocks base method.

func (*MockWorker) Run

func (m *MockWorker) Run(ctx context.Context, task core.TaskMessage) error

Run mocks base method.

func (*MockWorker) Shutdown

func (m *MockWorker) Shutdown() error

Shutdown mocks base method.

type MockWorkerMockRecorder

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

MockWorkerMockRecorder is the mock recorder for MockWorker.

func (*MockWorkerMockRecorder) Queue

func (mr *MockWorkerMockRecorder) Queue(task any) *gomock.Call

Queue indicates an expected call of Queue.

func (*MockWorkerMockRecorder) Request

func (mr *MockWorkerMockRecorder) Request() *gomock.Call

Request indicates an expected call of Request.

func (*MockWorkerMockRecorder) Run

func (mr *MockWorkerMockRecorder) Run(ctx, task any) *gomock.Call

Run indicates an expected call of Run.

func (*MockWorkerMockRecorder) Shutdown

func (mr *MockWorkerMockRecorder) Shutdown() *gomock.Call

Shutdown indicates an expected call of Shutdown.

Jump to

Keyboard shortcuts

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