Documentation
¶
Index ¶
- type MockSink
- type MockSource
- type MockTable
- type SinkWriteFunc
- func (f *SinkWriteFunc[K, V]) History() []SinkWriteFuncCall[K, V]
- func (f *SinkWriteFunc[K, V]) PushHook(hook func(...msg.Message[K, V]) error)
- func (f *SinkWriteFunc[K, V]) PushReturn(r0 error)
- func (f *SinkWriteFunc[K, V]) SetDefaultHook(hook func(...msg.Message[K, V]) error)
- func (f *SinkWriteFunc[K, V]) SetDefaultReturn(r0 error)
- type SinkWriteFuncCall
- type SourceCommitFunc
- func (f *SourceCommitFunc[K, V]) History() []SourceCommitFuncCall[K, V]
- func (f *SourceCommitFunc[K, V]) PushHook(hook func(...msg.Message[K, V]) error)
- func (f *SourceCommitFunc[K, V]) PushReturn(r0 error)
- func (f *SourceCommitFunc[K, V]) SetDefaultHook(hook func(...msg.Message[K, V]) error)
- func (f *SourceCommitFunc[K, V]) SetDefaultReturn(r0 error)
- type SourceCommitFuncCall
- type SourceErrorFunc
- func (f *SourceErrorFunc[K, V]) History() []SourceErrorFuncCall[K, V]
- func (f *SourceErrorFunc[K, V]) PushHook(hook func() error)
- func (f *SourceErrorFunc[K, V]) PushReturn(r0 error)
- func (f *SourceErrorFunc[K, V]) SetDefaultHook(hook func() error)
- func (f *SourceErrorFunc[K, V]) SetDefaultReturn(r0 error)
- type SourceErrorFuncCall
- type SourceMessagesFunc
- func (f *SourceMessagesFunc[K, V]) History() []SourceMessagesFuncCall[K, V]
- func (f *SourceMessagesFunc[K, V]) PushHook(hook func() chan msg.Message[K, V])
- func (f *SourceMessagesFunc[K, V]) PushReturn(r0 chan msg.Message[K, V])
- func (f *SourceMessagesFunc[K, V]) SetDefaultHook(hook func() chan msg.Message[K, V])
- func (f *SourceMessagesFunc[K, V]) SetDefaultReturn(r0 chan msg.Message[K, V])
- type SourceMessagesFuncCall
- type TableDeleteFunc
- type TableDeleteFuncCall
- type TableErrorFunc
- type TableErrorFuncCall
- type TableNextFunc
- func (f *TableNextFunc) History() []TableNextFuncCall
- func (f *TableNextFunc) PushHook(hook func() <-chan streams.NextCursor)
- func (f *TableNextFunc) PushReturn(r0 <-chan streams.NextCursor)
- func (f *TableNextFunc) SetDefaultHook(hook func() <-chan streams.NextCursor)
- func (f *TableNextFunc) SetDefaultReturn(r0 <-chan streams.NextCursor)
- type TableNextFuncCall
- type TableSetFunc
- type TableSetFuncCall
- type TableSetupFunc
- type TableSetupFuncCall
- type TableWriteFunc
- func (f *TableWriteFunc) History() []TableWriteFuncCall
- func (f *TableWriteFunc) PushHook(hook func(...msg.Message[string, []byte]) error)
- func (f *TableWriteFunc) PushReturn(r0 error)
- func (f *TableWriteFunc) SetDefaultHook(hook func(...msg.Message[string, []byte]) error)
- func (f *TableWriteFunc) SetDefaultReturn(r0 error)
- type TableWriteFuncCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSink ¶
type MockSink[K interface{}, V interface{}] struct { // WriteFunc is an instance of a mock function object controlling the // behavior of the method Write. WriteFunc *SinkWriteFunc[K, V] }
MockSink is a mock implementation of the Sink interface (from the package github.com/ionos-cloud/streams) used for unit testing.
func NewMockSink ¶
func NewMockSink[K interface{}, V interface{}]() *MockSink[K, V]
NewMockSink creates a new mock of the Sink interface. All methods return zero values for all results, unless overwritten.
func NewMockSinkFrom ¶
NewMockSinkFrom creates a new mock of the MockSink interface. All methods delegate to the given implementation, unless overwritten.
func NewStrictMockSink ¶
func NewStrictMockSink[K interface{}, V interface{}]() *MockSink[K, V]
NewStrictMockSink creates a new mock of the Sink interface. All methods panic on invocation, unless overwritten.
type MockSource ¶
type MockSource[K interface{}, V interface{}] struct { // CommitFunc is an instance of a mock function object controlling the // behavior of the method Commit. CommitFunc *SourceCommitFunc[K, V] // ErrorFunc is an instance of a mock function object controlling the // behavior of the method Error. ErrorFunc *SourceErrorFunc[K, V] // MessagesFunc is an instance of a mock function object controlling the // behavior of the method Messages. MessagesFunc *SourceMessagesFunc[K, V] }
MockSource is a mock implementation of the Source interface (from the package github.com/ionos-cloud/streams) used for unit testing.
func NewMockSource ¶
func NewMockSource[K interface{}, V interface{}]() *MockSource[K, V]
NewMockSource creates a new mock of the Source interface. All methods return zero values for all results, unless overwritten.
func NewMockSourceFrom ¶
func NewMockSourceFrom[K interface{}, V interface{}](i streams.Source[K, V]) *MockSource[K, V]
NewMockSourceFrom creates a new mock of the MockSource interface. All methods delegate to the given implementation, unless overwritten.
func NewStrictMockSource ¶
func NewStrictMockSource[K interface{}, V interface{}]() *MockSource[K, V]
NewStrictMockSource creates a new mock of the Source interface. All methods panic on invocation, unless overwritten.
func (*MockSource[K, V]) Commit ¶
func (m *MockSource[K, V]) Commit(v0 ...msg.Message[K, V]) error
Commit delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockSource[K, V]) Error ¶
func (m *MockSource[K, V]) Error() error
Error delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockSource[K, V]) Messages ¶
func (m *MockSource[K, V]) Messages() chan msg.Message[K, V]
Messages delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
type MockTable ¶
type MockTable struct { // DeleteFunc is an instance of a mock function object controlling the // behavior of the method Delete. DeleteFunc *TableDeleteFunc // ErrorFunc is an instance of a mock function object controlling the // behavior of the method Error. ErrorFunc *TableErrorFunc // NextFunc is an instance of a mock function object controlling the // behavior of the method Next. NextFunc *TableNextFunc // SetFunc is an instance of a mock function object controlling the // behavior of the method Set. SetFunc *TableSetFunc // SetupFunc is an instance of a mock function object controlling the // behavior of the method Setup. SetupFunc *TableSetupFunc // WriteFunc is an instance of a mock function object controlling the // behavior of the method Write. WriteFunc *TableWriteFunc }
MockTable is a mock implementation of the Table interface (from the package github.com/ionos-cloud/streams) used for unit testing.
func NewMockTable ¶
func NewMockTable() *MockTable
NewMockTable creates a new mock of the Table interface. All methods return zero values for all results, unless overwritten.
func NewMockTableFrom ¶
NewMockTableFrom creates a new mock of the MockTable interface. All methods delegate to the given implementation, unless overwritten.
func NewStrictMockTable ¶
func NewStrictMockTable() *MockTable
NewStrictMockTable creates a new mock of the Table interface. All methods panic on invocation, unless overwritten.
func (*MockTable) Delete ¶
Delete delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockTable) Error ¶
Error delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockTable) Next ¶
func (m *MockTable) Next() <-chan streams.NextCursor
Next delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockTable) Set ¶
Set delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
type SinkWriteFunc ¶
type SinkWriteFunc[K interface{}, V interface{}] struct {
// contains filtered or unexported fields
}
SinkWriteFunc describes the behavior when the Write method of the parent MockSink instance is invoked.
func (*SinkWriteFunc[K, V]) History ¶
func (f *SinkWriteFunc[K, V]) History() []SinkWriteFuncCall[K, V]
History returns a sequence of SinkWriteFuncCall objects describing the invocations of this function.
func (*SinkWriteFunc[K, V]) PushHook ¶
func (f *SinkWriteFunc[K, V]) PushHook(hook func(...msg.Message[K, V]) error)
PushHook adds a function to the end of hook queue. Each invocation of the Write method of the parent MockSink instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*SinkWriteFunc[K, V]) PushReturn ¶
func (f *SinkWriteFunc[K, V]) PushReturn(r0 error)
PushReturn calls PushHook with a function that returns the given values.
func (*SinkWriteFunc[K, V]) SetDefaultHook ¶
func (f *SinkWriteFunc[K, V]) SetDefaultHook(hook func(...msg.Message[K, V]) error)
SetDefaultHook sets function that is called when the Write method of the parent MockSink instance is invoked and the hook queue is empty.
func (*SinkWriteFunc[K, V]) SetDefaultReturn ¶
func (f *SinkWriteFunc[K, V]) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type SinkWriteFuncCall ¶
type SinkWriteFuncCall[K interface{}, V interface{}] struct { // Arg0 is a slice containing the values of the variadic arguments // passed to this method invocation. Arg0 []msg.Message[K, V] // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
SinkWriteFuncCall is an object that describes an invocation of method Write on an instance of MockSink.
func (SinkWriteFuncCall[K, V]) Args ¶
func (c SinkWriteFuncCall[K, V]) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation. The variadic slice argument is flattened in this array such that one positional argument and three variadic arguments would result in a slice of four, not two.
func (SinkWriteFuncCall[K, V]) Results ¶
func (c SinkWriteFuncCall[K, V]) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type SourceCommitFunc ¶
type SourceCommitFunc[K interface{}, V interface{}] struct {
// contains filtered or unexported fields
}
SourceCommitFunc describes the behavior when the Commit method of the parent MockSource instance is invoked.
func (*SourceCommitFunc[K, V]) History ¶
func (f *SourceCommitFunc[K, V]) History() []SourceCommitFuncCall[K, V]
History returns a sequence of SourceCommitFuncCall objects describing the invocations of this function.
func (*SourceCommitFunc[K, V]) PushHook ¶
func (f *SourceCommitFunc[K, V]) PushHook(hook func(...msg.Message[K, V]) error)
PushHook adds a function to the end of hook queue. Each invocation of the Commit method of the parent MockSource instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*SourceCommitFunc[K, V]) PushReturn ¶
func (f *SourceCommitFunc[K, V]) PushReturn(r0 error)
PushReturn calls PushHook with a function that returns the given values.
func (*SourceCommitFunc[K, V]) SetDefaultHook ¶
func (f *SourceCommitFunc[K, V]) SetDefaultHook(hook func(...msg.Message[K, V]) error)
SetDefaultHook sets function that is called when the Commit method of the parent MockSource instance is invoked and the hook queue is empty.
func (*SourceCommitFunc[K, V]) SetDefaultReturn ¶
func (f *SourceCommitFunc[K, V]) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type SourceCommitFuncCall ¶
type SourceCommitFuncCall[K interface{}, V interface{}] struct { // Arg0 is a slice containing the values of the variadic arguments // passed to this method invocation. Arg0 []msg.Message[K, V] // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
SourceCommitFuncCall is an object that describes an invocation of method Commit on an instance of MockSource.
func (SourceCommitFuncCall[K, V]) Args ¶
func (c SourceCommitFuncCall[K, V]) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation. The variadic slice argument is flattened in this array such that one positional argument and three variadic arguments would result in a slice of four, not two.
func (SourceCommitFuncCall[K, V]) Results ¶
func (c SourceCommitFuncCall[K, V]) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type SourceErrorFunc ¶
type SourceErrorFunc[K interface{}, V interface{}] struct {
// contains filtered or unexported fields
}
SourceErrorFunc describes the behavior when the Error method of the parent MockSource instance is invoked.
func (*SourceErrorFunc[K, V]) History ¶
func (f *SourceErrorFunc[K, V]) History() []SourceErrorFuncCall[K, V]
History returns a sequence of SourceErrorFuncCall objects describing the invocations of this function.
func (*SourceErrorFunc[K, V]) PushHook ¶
func (f *SourceErrorFunc[K, V]) PushHook(hook func() error)
PushHook adds a function to the end of hook queue. Each invocation of the Error method of the parent MockSource instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*SourceErrorFunc[K, V]) PushReturn ¶
func (f *SourceErrorFunc[K, V]) PushReturn(r0 error)
PushReturn calls PushHook with a function that returns the given values.
func (*SourceErrorFunc[K, V]) SetDefaultHook ¶
func (f *SourceErrorFunc[K, V]) SetDefaultHook(hook func() error)
SetDefaultHook sets function that is called when the Error method of the parent MockSource instance is invoked and the hook queue is empty.
func (*SourceErrorFunc[K, V]) SetDefaultReturn ¶
func (f *SourceErrorFunc[K, V]) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type SourceErrorFuncCall ¶
type SourceErrorFuncCall[K interface{}, V interface{}] struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
SourceErrorFuncCall is an object that describes an invocation of method Error on an instance of MockSource.
func (SourceErrorFuncCall[K, V]) Args ¶
func (c SourceErrorFuncCall[K, V]) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (SourceErrorFuncCall[K, V]) Results ¶
func (c SourceErrorFuncCall[K, V]) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type SourceMessagesFunc ¶
type SourceMessagesFunc[K interface{}, V interface{}] struct {
// contains filtered or unexported fields
}
SourceMessagesFunc describes the behavior when the Messages method of the parent MockSource instance is invoked.
func (*SourceMessagesFunc[K, V]) History ¶
func (f *SourceMessagesFunc[K, V]) History() []SourceMessagesFuncCall[K, V]
History returns a sequence of SourceMessagesFuncCall objects describing the invocations of this function.
func (*SourceMessagesFunc[K, V]) PushHook ¶
func (f *SourceMessagesFunc[K, V]) PushHook(hook func() chan msg.Message[K, V])
PushHook adds a function to the end of hook queue. Each invocation of the Messages method of the parent MockSource instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*SourceMessagesFunc[K, V]) PushReturn ¶
func (f *SourceMessagesFunc[K, V]) PushReturn(r0 chan msg.Message[K, V])
PushReturn calls PushHook with a function that returns the given values.
func (*SourceMessagesFunc[K, V]) SetDefaultHook ¶
func (f *SourceMessagesFunc[K, V]) SetDefaultHook(hook func() chan msg.Message[K, V])
SetDefaultHook sets function that is called when the Messages method of the parent MockSource instance is invoked and the hook queue is empty.
func (*SourceMessagesFunc[K, V]) SetDefaultReturn ¶
func (f *SourceMessagesFunc[K, V]) SetDefaultReturn(r0 chan msg.Message[K, V])
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type SourceMessagesFuncCall ¶
type SourceMessagesFuncCall[K interface{}, V interface{}] struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 chan msg.Message[K, V] }
SourceMessagesFuncCall is an object that describes an invocation of method Messages on an instance of MockSource.
func (SourceMessagesFuncCall[K, V]) Args ¶
func (c SourceMessagesFuncCall[K, V]) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (SourceMessagesFuncCall[K, V]) Results ¶
func (c SourceMessagesFuncCall[K, V]) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type TableDeleteFunc ¶
type TableDeleteFunc struct {
// contains filtered or unexported fields
}
TableDeleteFunc describes the behavior when the Delete method of the parent MockTable instance is invoked.
func (*TableDeleteFunc) History ¶
func (f *TableDeleteFunc) History() []TableDeleteFuncCall
History returns a sequence of TableDeleteFuncCall objects describing the invocations of this function.
func (*TableDeleteFunc) PushHook ¶
func (f *TableDeleteFunc) PushHook(hook func(string) error)
PushHook adds a function to the end of hook queue. Each invocation of the Delete method of the parent MockTable instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*TableDeleteFunc) PushReturn ¶
func (f *TableDeleteFunc) PushReturn(r0 error)
PushReturn calls PushHook with a function that returns the given values.
func (*TableDeleteFunc) SetDefaultHook ¶
func (f *TableDeleteFunc) SetDefaultHook(hook func(string) error)
SetDefaultHook sets function that is called when the Delete method of the parent MockTable instance is invoked and the hook queue is empty.
func (*TableDeleteFunc) SetDefaultReturn ¶
func (f *TableDeleteFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type TableDeleteFuncCall ¶
type TableDeleteFuncCall struct { // Arg0 is the value of the 1st argument passed to this method // invocation. Arg0 string // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
TableDeleteFuncCall is an object that describes an invocation of method Delete on an instance of MockTable.
func (TableDeleteFuncCall) Args ¶
func (c TableDeleteFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (TableDeleteFuncCall) Results ¶
func (c TableDeleteFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type TableErrorFunc ¶
type TableErrorFunc struct {
// contains filtered or unexported fields
}
TableErrorFunc describes the behavior when the Error method of the parent MockTable instance is invoked.
func (*TableErrorFunc) History ¶
func (f *TableErrorFunc) History() []TableErrorFuncCall
History returns a sequence of TableErrorFuncCall objects describing the invocations of this function.
func (*TableErrorFunc) PushHook ¶
func (f *TableErrorFunc) PushHook(hook func() error)
PushHook adds a function to the end of hook queue. Each invocation of the Error method of the parent MockTable instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*TableErrorFunc) PushReturn ¶
func (f *TableErrorFunc) PushReturn(r0 error)
PushReturn calls PushHook with a function that returns the given values.
func (*TableErrorFunc) SetDefaultHook ¶
func (f *TableErrorFunc) SetDefaultHook(hook func() error)
SetDefaultHook sets function that is called when the Error method of the parent MockTable instance is invoked and the hook queue is empty.
func (*TableErrorFunc) SetDefaultReturn ¶
func (f *TableErrorFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type TableErrorFuncCall ¶
type TableErrorFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
TableErrorFuncCall is an object that describes an invocation of method Error on an instance of MockTable.
func (TableErrorFuncCall) Args ¶
func (c TableErrorFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (TableErrorFuncCall) Results ¶
func (c TableErrorFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type TableNextFunc ¶
type TableNextFunc struct {
// contains filtered or unexported fields
}
TableNextFunc describes the behavior when the Next method of the parent MockTable instance is invoked.
func (*TableNextFunc) History ¶
func (f *TableNextFunc) History() []TableNextFuncCall
History returns a sequence of TableNextFuncCall objects describing the invocations of this function.
func (*TableNextFunc) PushHook ¶
func (f *TableNextFunc) PushHook(hook func() <-chan streams.NextCursor)
PushHook adds a function to the end of hook queue. Each invocation of the Next method of the parent MockTable instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*TableNextFunc) PushReturn ¶
func (f *TableNextFunc) PushReturn(r0 <-chan streams.NextCursor)
PushReturn calls PushHook with a function that returns the given values.
func (*TableNextFunc) SetDefaultHook ¶
func (f *TableNextFunc) SetDefaultHook(hook func() <-chan streams.NextCursor)
SetDefaultHook sets function that is called when the Next method of the parent MockTable instance is invoked and the hook queue is empty.
func (*TableNextFunc) SetDefaultReturn ¶
func (f *TableNextFunc) SetDefaultReturn(r0 <-chan streams.NextCursor)
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type TableNextFuncCall ¶
type TableNextFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 <-chan streams.NextCursor }
TableNextFuncCall is an object that describes an invocation of method Next on an instance of MockTable.
func (TableNextFuncCall) Args ¶
func (c TableNextFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (TableNextFuncCall) Results ¶
func (c TableNextFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type TableSetFunc ¶
type TableSetFunc struct {
// contains filtered or unexported fields
}
TableSetFunc describes the behavior when the Set method of the parent MockTable instance is invoked.
func (*TableSetFunc) History ¶
func (f *TableSetFunc) History() []TableSetFuncCall
History returns a sequence of TableSetFuncCall objects describing the invocations of this function.
func (*TableSetFunc) PushHook ¶
func (f *TableSetFunc) PushHook(hook func(string, []byte) error)
PushHook adds a function to the end of hook queue. Each invocation of the Set method of the parent MockTable instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*TableSetFunc) PushReturn ¶
func (f *TableSetFunc) PushReturn(r0 error)
PushReturn calls PushHook with a function that returns the given values.
func (*TableSetFunc) SetDefaultHook ¶
func (f *TableSetFunc) SetDefaultHook(hook func(string, []byte) error)
SetDefaultHook sets function that is called when the Set method of the parent MockTable instance is invoked and the hook queue is empty.
func (*TableSetFunc) SetDefaultReturn ¶
func (f *TableSetFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type TableSetFuncCall ¶
type TableSetFuncCall struct { // Arg0 is the value of the 1st argument passed to this method // invocation. Arg0 string // Arg1 is the value of the 2nd argument passed to this method // invocation. Arg1 []byte // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
TableSetFuncCall is an object that describes an invocation of method Set on an instance of MockTable.
func (TableSetFuncCall) Args ¶
func (c TableSetFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (TableSetFuncCall) Results ¶
func (c TableSetFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type TableSetupFunc ¶
type TableSetupFunc struct {
// contains filtered or unexported fields
}
TableSetupFunc describes the behavior when the Setup method of the parent MockTable instance is invoked.
func (*TableSetupFunc) History ¶
func (f *TableSetupFunc) History() []TableSetupFuncCall
History returns a sequence of TableSetupFuncCall objects describing the invocations of this function.
func (*TableSetupFunc) PushHook ¶
func (f *TableSetupFunc) PushHook(hook func() error)
PushHook adds a function to the end of hook queue. Each invocation of the Setup method of the parent MockTable instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*TableSetupFunc) PushReturn ¶
func (f *TableSetupFunc) PushReturn(r0 error)
PushReturn calls PushHook with a function that returns the given values.
func (*TableSetupFunc) SetDefaultHook ¶
func (f *TableSetupFunc) SetDefaultHook(hook func() error)
SetDefaultHook sets function that is called when the Setup method of the parent MockTable instance is invoked and the hook queue is empty.
func (*TableSetupFunc) SetDefaultReturn ¶
func (f *TableSetupFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type TableSetupFuncCall ¶
type TableSetupFuncCall struct { // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
TableSetupFuncCall is an object that describes an invocation of method Setup on an instance of MockTable.
func (TableSetupFuncCall) Args ¶
func (c TableSetupFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (TableSetupFuncCall) Results ¶
func (c TableSetupFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type TableWriteFunc ¶
type TableWriteFunc struct {
// contains filtered or unexported fields
}
TableWriteFunc describes the behavior when the Write method of the parent MockTable instance is invoked.
func (*TableWriteFunc) History ¶
func (f *TableWriteFunc) History() []TableWriteFuncCall
History returns a sequence of TableWriteFuncCall objects describing the invocations of this function.
func (*TableWriteFunc) PushHook ¶
PushHook adds a function to the end of hook queue. Each invocation of the Write method of the parent MockTable instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.
func (*TableWriteFunc) PushReturn ¶
func (f *TableWriteFunc) PushReturn(r0 error)
PushReturn calls PushHook with a function that returns the given values.
func (*TableWriteFunc) SetDefaultHook ¶
SetDefaultHook sets function that is called when the Write method of the parent MockTable instance is invoked and the hook queue is empty.
func (*TableWriteFunc) SetDefaultReturn ¶
func (f *TableWriteFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultHook with a function that returns the given values.
type TableWriteFuncCall ¶
type TableWriteFuncCall struct { // Arg0 is a slice containing the values of the variadic arguments // passed to this method invocation. Arg0 []msg.Message[string, []byte] // Result0 is the value of the 1st result returned from this method // invocation. Result0 error }
TableWriteFuncCall is an object that describes an invocation of method Write on an instance of MockTable.
func (TableWriteFuncCall) Args ¶
func (c TableWriteFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation. The variadic slice argument is flattened in this array such that one positional argument and three variadic arguments would result in a slice of four, not two.
func (TableWriteFuncCall) Results ¶
func (c TableWriteFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.