mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? - Wire up CHASM implementations ## Why? - CHASM workstream ## How did you test it? - [x] built - [x] run locally and tested manually - [x] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s) ## Potential risks - No risk. CHASM logic is still disabled via dynamic config
143 lines
5.1 KiB
Go
143 lines
5.1 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: engine.go
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package chasm -source engine.go -destination engine_mock.go
|
|
//
|
|
|
|
// Package chasm is a generated GoMock package.
|
|
package chasm
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockEngine is a mock of Engine interface.
|
|
type MockEngine struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockEngineMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockEngineMockRecorder is the mock recorder for MockEngine.
|
|
type MockEngineMockRecorder struct {
|
|
mock *MockEngine
|
|
}
|
|
|
|
// NewMockEngine creates a new mock instance.
|
|
func NewMockEngine(ctrl *gomock.Controller) *MockEngine {
|
|
mock := &MockEngine{ctrl: ctrl}
|
|
mock.recorder = &MockEngineMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockEngine) EXPECT() *MockEngineMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// NewEntity mocks base method.
|
|
func (m *MockEngine) NewEntity(arg0 context.Context, arg1 ComponentRef, arg2 func(MutableContext) (Component, error), arg3 ...TransitionOption) (EntityKey, []byte, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2}
|
|
for _, a := range arg3 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "NewEntity", varargs...)
|
|
ret0, _ := ret[0].(EntityKey)
|
|
ret1, _ := ret[1].([]byte)
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// NewEntity indicates an expected call of NewEntity.
|
|
func (mr *MockEngineMockRecorder) NewEntity(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewEntity", reflect.TypeOf((*MockEngine)(nil).NewEntity), varargs...)
|
|
}
|
|
|
|
// PollComponent mocks base method.
|
|
func (m *MockEngine) PollComponent(arg0 context.Context, arg1 ComponentRef, arg2 func(Context, Component) (any, bool, error), arg3 func(MutableContext, Component, any) error, arg4 ...TransitionOption) ([]byte, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2, arg3}
|
|
for _, a := range arg4 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "PollComponent", varargs...)
|
|
ret0, _ := ret[0].([]byte)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// PollComponent indicates an expected call of PollComponent.
|
|
func (mr *MockEngineMockRecorder) PollComponent(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollComponent", reflect.TypeOf((*MockEngine)(nil).PollComponent), varargs...)
|
|
}
|
|
|
|
// ReadComponent mocks base method.
|
|
func (m *MockEngine) ReadComponent(arg0 context.Context, arg1 ComponentRef, arg2 func(Context, Component) error, arg3 ...TransitionOption) error {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2}
|
|
for _, a := range arg3 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "ReadComponent", varargs...)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// ReadComponent indicates an expected call of ReadComponent.
|
|
func (mr *MockEngineMockRecorder) ReadComponent(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadComponent", reflect.TypeOf((*MockEngine)(nil).ReadComponent), varargs...)
|
|
}
|
|
|
|
// UpdateComponent mocks base method.
|
|
func (m *MockEngine) UpdateComponent(arg0 context.Context, arg1 ComponentRef, arg2 func(MutableContext, Component) error, arg3 ...TransitionOption) ([]byte, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2}
|
|
for _, a := range arg3 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "UpdateComponent", varargs...)
|
|
ret0, _ := ret[0].([]byte)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// UpdateComponent indicates an expected call of UpdateComponent.
|
|
func (mr *MockEngineMockRecorder) UpdateComponent(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateComponent", reflect.TypeOf((*MockEngine)(nil).UpdateComponent), varargs...)
|
|
}
|
|
|
|
// UpdateWithNewEntity mocks base method.
|
|
func (m *MockEngine) UpdateWithNewEntity(arg0 context.Context, arg1 ComponentRef, arg2 func(MutableContext) (Component, error), arg3 func(MutableContext, Component) error, arg4 ...TransitionOption) (EntityKey, []byte, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2, arg3}
|
|
for _, a := range arg4 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "UpdateWithNewEntity", varargs...)
|
|
ret0, _ := ret[0].(EntityKey)
|
|
ret1, _ := ret[1].([]byte)
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// UpdateWithNewEntity indicates an expected call of UpdateWithNewEntity.
|
|
func (mr *MockEngineMockRecorder) UpdateWithNewEntity(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWithNewEntity", reflect.TypeOf((*MockEngine)(nil).UpdateWithNewEntity), varargs...)
|
|
}
|