// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewCILogStore creates a new instance of CILogStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewCILogStore(t interface { mock.TestingT Cleanup(func()) }) *CILogStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &CILogStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // CILogStore is an autogenerated mock type for the CILogStore type type CILogStore struct { mock.Mock } type CILogStore_Expecter struct { mock *mock.Mock } func (_m *CILogStore) EXPECT() *CILogStore_Expecter { return &CILogStore_Expecter{mock: &_m.Mock} } // Append provides a mock function for the type CILogStore func (_mock *CILogStore) Append(ctx context.Context, ref ports.CILogRef, offset int64, lines []domain.CILogLine, limit int64) (int64, int, error) { ret := _mock.Called(ctx, ref, offset, lines, limit) if len(ret) == 0 { panic("no return value specified for Append") } var r0 int64 var r1 int var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef, int64, []domain.CILogLine, int64) (int64, int, error)); ok { return returnFunc(ctx, ref, offset, lines, limit) } if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef, int64, []domain.CILogLine, int64) int64); ok { r0 = returnFunc(ctx, ref, offset, lines, limit) } else { r0 = ret.Get(0).(int64) } if returnFunc, ok := ret.Get(1).(func(context.Context, ports.CILogRef, int64, []domain.CILogLine, int64) int); ok { r1 = returnFunc(ctx, ref, offset, lines, limit) } else { r1 = ret.Get(1).(int) } if returnFunc, ok := ret.Get(2).(func(context.Context, ports.CILogRef, int64, []domain.CILogLine, int64) error); ok { r2 = returnFunc(ctx, ref, offset, lines, limit) } else { r2 = ret.Error(2) } return r0, r1, r2 } // CILogStore_Append_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Append' type CILogStore_Append_Call struct { *mock.Call } // Append is a helper method to define mock.On call // - ctx context.Context // - ref ports.CILogRef // - offset int64 // - lines []domain.CILogLine // - limit int64 func (_e *CILogStore_Expecter) Append(ctx any, ref any, offset any, lines any, limit any) *CILogStore_Append_Call { return &CILogStore_Append_Call{Call: _e.mock.On("Append", ctx, ref, offset, lines, limit)} } func (_c *CILogStore_Append_Call) Run(run func(ctx context.Context, ref ports.CILogRef, offset int64, lines []domain.CILogLine, limit int64)) *CILogStore_Append_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.CILogRef if args[1] != nil { arg1 = args[1].(ports.CILogRef) } var arg2 int64 if args[2] != nil { arg2 = args[2].(int64) } var arg3 []domain.CILogLine if args[3] != nil { arg3 = args[3].([]domain.CILogLine) } var arg4 int64 if args[4] != nil { arg4 = args[4].(int64) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *CILogStore_Append_Call) Return(next int64, added int, err error) *CILogStore_Append_Call { _c.Call.Return(next, added, err) return _c } func (_c *CILogStore_Append_Call) RunAndReturn(run func(ctx context.Context, ref ports.CILogRef, offset int64, lines []domain.CILogLine, limit int64) (int64, int, error)) *CILogStore_Append_Call { _c.Call.Return(run) return _c } // AppendForced provides a mock function for the type CILogStore func (_mock *CILogStore) AppendForced(ctx context.Context, ref ports.CILogRef, lines []domain.CILogLine) (int64, error) { ret := _mock.Called(ctx, ref, lines) if len(ret) == 0 { panic("no return value specified for AppendForced") } var r0 int64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef, []domain.CILogLine) (int64, error)); ok { return returnFunc(ctx, ref, lines) } if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef, []domain.CILogLine) int64); ok { r0 = returnFunc(ctx, ref, lines) } else { r0 = ret.Get(0).(int64) } if returnFunc, ok := ret.Get(1).(func(context.Context, ports.CILogRef, []domain.CILogLine) error); ok { r1 = returnFunc(ctx, ref, lines) } else { r1 = ret.Error(1) } return r0, r1 } // CILogStore_AppendForced_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppendForced' type CILogStore_AppendForced_Call struct { *mock.Call } // AppendForced is a helper method to define mock.On call // - ctx context.Context // - ref ports.CILogRef // - lines []domain.CILogLine func (_e *CILogStore_Expecter) AppendForced(ctx any, ref any, lines any) *CILogStore_AppendForced_Call { return &CILogStore_AppendForced_Call{Call: _e.mock.On("AppendForced", ctx, ref, lines)} } func (_c *CILogStore_AppendForced_Call) Run(run func(ctx context.Context, ref ports.CILogRef, lines []domain.CILogLine)) *CILogStore_AppendForced_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.CILogRef if args[1] != nil { arg1 = args[1].(ports.CILogRef) } var arg2 []domain.CILogLine if args[2] != nil { arg2 = args[2].([]domain.CILogLine) } run( arg0, arg1, arg2, ) }) return _c } func (_c *CILogStore_AppendForced_Call) Return(next int64, err error) *CILogStore_AppendForced_Call { _c.Call.Return(next, err) return _c } func (_c *CILogStore_AppendForced_Call) RunAndReturn(run func(ctx context.Context, ref ports.CILogRef, lines []domain.CILogLine) (int64, error)) *CILogStore_AppendForced_Call { _c.Call.Return(run) return _c } // Changed provides a mock function for the type CILogStore func (_mock *CILogStore) Changed(ref ports.CILogRef) <-chan struct{} { ret := _mock.Called(ref) if len(ret) == 0 { panic("no return value specified for Changed") } var r0 <-chan struct{} if returnFunc, ok := ret.Get(0).(func(ports.CILogRef) <-chan struct{}); ok { r0 = returnFunc(ref) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(<-chan struct{}) } } return r0 } // CILogStore_Changed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Changed' type CILogStore_Changed_Call struct { *mock.Call } // Changed is a helper method to define mock.On call // - ref ports.CILogRef func (_e *CILogStore_Expecter) Changed(ref any) *CILogStore_Changed_Call { return &CILogStore_Changed_Call{Call: _e.mock.On("Changed", ref)} } func (_c *CILogStore_Changed_Call) Run(run func(ref ports.CILogRef)) *CILogStore_Changed_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 ports.CILogRef if args[0] != nil { arg0 = args[0].(ports.CILogRef) } run( arg0, ) }) return _c } func (_c *CILogStore_Changed_Call) Return(valCh <-chan struct{}) *CILogStore_Changed_Call { _c.Call.Return(valCh) return _c } func (_c *CILogStore_Changed_Call) RunAndReturn(run func(ref ports.CILogRef) <-chan struct{}) *CILogStore_Changed_Call { _c.Call.Return(run) return _c } // Count provides a mock function for the type CILogStore func (_mock *CILogStore) Count(ctx context.Context, ref ports.CILogRef) (int64, error) { ret := _mock.Called(ctx, ref) if len(ret) == 0 { panic("no return value specified for Count") } var r0 int64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef) (int64, error)); ok { return returnFunc(ctx, ref) } if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef) int64); ok { r0 = returnFunc(ctx, ref) } else { r0 = ret.Get(0).(int64) } if returnFunc, ok := ret.Get(1).(func(context.Context, ports.CILogRef) error); ok { r1 = returnFunc(ctx, ref) } else { r1 = ret.Error(1) } return r0, r1 } // CILogStore_Count_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Count' type CILogStore_Count_Call struct { *mock.Call } // Count is a helper method to define mock.On call // - ctx context.Context // - ref ports.CILogRef func (_e *CILogStore_Expecter) Count(ctx any, ref any) *CILogStore_Count_Call { return &CILogStore_Count_Call{Call: _e.mock.On("Count", ctx, ref)} } func (_c *CILogStore_Count_Call) Run(run func(ctx context.Context, ref ports.CILogRef)) *CILogStore_Count_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.CILogRef if args[1] != nil { arg1 = args[1].(ports.CILogRef) } run( arg0, arg1, ) }) return _c } func (_c *CILogStore_Count_Call) Return(n int64, err error) *CILogStore_Count_Call { _c.Call.Return(n, err) return _c } func (_c *CILogStore_Count_Call) RunAndReturn(run func(ctx context.Context, ref ports.CILogRef) (int64, error)) *CILogStore_Count_Call { _c.Call.Return(run) return _c } // Read provides a mock function for the type CILogStore func (_mock *CILogStore) Read(ctx context.Context, ref ports.CILogRef, from int64, maxLines int, maxBytes int) ([]domain.CILogLine, error) { ret := _mock.Called(ctx, ref, from, maxLines, maxBytes) if len(ret) == 0 { panic("no return value specified for Read") } var r0 []domain.CILogLine var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef, int64, int, int) ([]domain.CILogLine, error)); ok { return returnFunc(ctx, ref, from, maxLines, maxBytes) } if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef, int64, int, int) []domain.CILogLine); ok { r0 = returnFunc(ctx, ref, from, maxLines, maxBytes) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.CILogLine) } } if returnFunc, ok := ret.Get(1).(func(context.Context, ports.CILogRef, int64, int, int) error); ok { r1 = returnFunc(ctx, ref, from, maxLines, maxBytes) } else { r1 = ret.Error(1) } return r0, r1 } // CILogStore_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read' type CILogStore_Read_Call struct { *mock.Call } // Read is a helper method to define mock.On call // - ctx context.Context // - ref ports.CILogRef // - from int64 // - maxLines int // - maxBytes int func (_e *CILogStore_Expecter) Read(ctx any, ref any, from any, maxLines any, maxBytes any) *CILogStore_Read_Call { return &CILogStore_Read_Call{Call: _e.mock.On("Read", ctx, ref, from, maxLines, maxBytes)} } func (_c *CILogStore_Read_Call) Run(run func(ctx context.Context, ref ports.CILogRef, from int64, maxLines int, maxBytes int)) *CILogStore_Read_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.CILogRef if args[1] != nil { arg1 = args[1].(ports.CILogRef) } var arg2 int64 if args[2] != nil { arg2 = args[2].(int64) } var arg3 int if args[3] != nil { arg3 = args[3].(int) } var arg4 int if args[4] != nil { arg4 = args[4].(int) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *CILogStore_Read_Call) Return(cILogLines []domain.CILogLine, err error) *CILogStore_Read_Call { _c.Call.Return(cILogLines, err) return _c } func (_c *CILogStore_Read_Call) RunAndReturn(run func(ctx context.Context, ref ports.CILogRef, from int64, maxLines int, maxBytes int) ([]domain.CILogLine, error)) *CILogStore_Read_Call { _c.Call.Return(run) return _c } // RemoveRuns provides a mock function for the type CILogStore func (_mock *CILogStore) RemoveRuns(ctx context.Context, runIDs []int64) error { ret := _mock.Called(ctx, runIDs) if len(ret) == 0 { panic("no return value specified for RemoveRuns") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, []int64) error); ok { r0 = returnFunc(ctx, runIDs) } else { r0 = ret.Error(0) } return r0 } // CILogStore_RemoveRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRuns' type CILogStore_RemoveRuns_Call struct { *mock.Call } // RemoveRuns is a helper method to define mock.On call // - ctx context.Context // - runIDs []int64 func (_e *CILogStore_Expecter) RemoveRuns(ctx any, runIDs any) *CILogStore_RemoveRuns_Call { return &CILogStore_RemoveRuns_Call{Call: _e.mock.On("RemoveRuns", ctx, runIDs)} } func (_c *CILogStore_RemoveRuns_Call) Run(run func(ctx context.Context, runIDs []int64)) *CILogStore_RemoveRuns_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []int64 if args[1] != nil { arg1 = args[1].([]int64) } run( arg0, arg1, ) }) return _c } func (_c *CILogStore_RemoveRuns_Call) Return(err error) *CILogStore_RemoveRuns_Call { _c.Call.Return(err) return _c } func (_c *CILogStore_RemoveRuns_Call) RunAndReturn(run func(ctx context.Context, runIDs []int64) error) *CILogStore_RemoveRuns_Call { _c.Call.Return(run) return _c } // Reset provides a mock function for the type CILogStore func (_mock *CILogStore) Reset(ctx context.Context, ref ports.CILogRef) error { ret := _mock.Called(ctx, ref) if len(ret) == 0 { panic("no return value specified for Reset") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CILogRef) error); ok { r0 = returnFunc(ctx, ref) } else { r0 = ret.Error(0) } return r0 } // CILogStore_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' type CILogStore_Reset_Call struct { *mock.Call } // Reset is a helper method to define mock.On call // - ctx context.Context // - ref ports.CILogRef func (_e *CILogStore_Expecter) Reset(ctx any, ref any) *CILogStore_Reset_Call { return &CILogStore_Reset_Call{Call: _e.mock.On("Reset", ctx, ref)} } func (_c *CILogStore_Reset_Call) Run(run func(ctx context.Context, ref ports.CILogRef)) *CILogStore_Reset_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.CILogRef if args[1] != nil { arg1 = args[1].(ports.CILogRef) } run( arg0, arg1, ) }) return _c } func (_c *CILogStore_Reset_Call) Return(err error) *CILogStore_Reset_Call { _c.Call.Return(err) return _c } func (_c *CILogStore_Reset_Call) RunAndReturn(run func(ctx context.Context, ref ports.CILogRef) error) *CILogStore_Reset_Call { _c.Call.Return(run) return _c } // RunIDs provides a mock function for the type CILogStore func (_mock *CILogStore) RunIDs(ctx context.Context) ([]int64, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for RunIDs") } var r0 []int64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]int64, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []int64); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]int64) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // CILogStore_RunIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunIDs' type CILogStore_RunIDs_Call struct { *mock.Call } // RunIDs is a helper method to define mock.On call // - ctx context.Context func (_e *CILogStore_Expecter) RunIDs(ctx any) *CILogStore_RunIDs_Call { return &CILogStore_RunIDs_Call{Call: _e.mock.On("RunIDs", ctx)} } func (_c *CILogStore_RunIDs_Call) Run(run func(ctx context.Context)) *CILogStore_RunIDs_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *CILogStore_RunIDs_Call) Return(int64s []int64, err error) *CILogStore_RunIDs_Call { _c.Call.Return(int64s, err) return _c } func (_c *CILogStore_RunIDs_Call) RunAndReturn(run func(ctx context.Context) ([]int64, error)) *CILogStore_RunIDs_Call { _c.Call.Return(run) return _c }