Documentation
¶
Index ¶
- type LoggerDebugFunc
- type LoggerDebugFuncCall
- type LoggerDebugWithFieldsFunc
- func (f *LoggerDebugWithFieldsFunc) History() []LoggerDebugWithFieldsFuncCall
- func (f *LoggerDebugWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerDebugWithFieldsFunc) PushReturn()
- func (f *LoggerDebugWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerDebugWithFieldsFunc) SetDefaultReturn()
- type LoggerDebugWithFieldsFuncCall
- type LoggerErrorFunc
- type LoggerErrorFuncCall
- type LoggerErrorWithFieldsFunc
- func (f *LoggerErrorWithFieldsFunc) History() []LoggerErrorWithFieldsFuncCall
- func (f *LoggerErrorWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerErrorWithFieldsFunc) PushReturn()
- func (f *LoggerErrorWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerErrorWithFieldsFunc) SetDefaultReturn()
- type LoggerErrorWithFieldsFuncCall
- type LoggerFatalFunc
- type LoggerFatalFuncCall
- type LoggerFatalWithFieldsFunc
- func (f *LoggerFatalWithFieldsFunc) History() []LoggerFatalWithFieldsFuncCall
- func (f *LoggerFatalWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerFatalWithFieldsFunc) PushReturn()
- func (f *LoggerFatalWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerFatalWithFieldsFunc) SetDefaultReturn()
- type LoggerFatalWithFieldsFuncCall
- type LoggerInfoFunc
- type LoggerInfoFuncCall
- type LoggerInfoWithFieldsFunc
- func (f *LoggerInfoWithFieldsFunc) History() []LoggerInfoWithFieldsFuncCall
- func (f *LoggerInfoWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerInfoWithFieldsFunc) PushReturn()
- func (f *LoggerInfoWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerInfoWithFieldsFunc) SetDefaultReturn()
- type LoggerInfoWithFieldsFuncCall
- type LoggerLogWithFieldsFunc
- func (f *LoggerLogWithFieldsFunc) History() []LoggerLogWithFieldsFuncCall
- func (f *LoggerLogWithFieldsFunc) PushHook(hook func(log.LogLevel, log.LogFields, string, ...interface{}))
- func (f *LoggerLogWithFieldsFunc) PushReturn()
- func (f *LoggerLogWithFieldsFunc) SetDefaultHook(hook func(log.LogLevel, log.LogFields, string, ...interface{}))
- func (f *LoggerLogWithFieldsFunc) SetDefaultReturn()
- type LoggerLogWithFieldsFuncCall
- type LoggerSyncFunc
- type LoggerSyncFuncCall
- type LoggerWarningFunc
- type LoggerWarningFuncCall
- type LoggerWarningWithFieldsFunc
- func (f *LoggerWarningWithFieldsFunc) History() []LoggerWarningWithFieldsFuncCall
- func (f *LoggerWarningWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerWarningWithFieldsFunc) PushReturn()
- func (f *LoggerWarningWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
- func (f *LoggerWarningWithFieldsFunc) SetDefaultReturn()
- type LoggerWarningWithFieldsFuncCall
- type LoggerWithFieldsFunc
- func (f *LoggerWithFieldsFunc) History() []LoggerWithFieldsFuncCall
- func (f *LoggerWithFieldsFunc) PushHook(hook func(log.LogFields) log.Logger)
- func (f *LoggerWithFieldsFunc) PushReturn(r0 log.Logger)
- func (f *LoggerWithFieldsFunc) SetDefaultHook(hook func(log.LogFields) log.Logger)
- func (f *LoggerWithFieldsFunc) SetDefaultReturn(r0 log.Logger)
- type LoggerWithFieldsFuncCall
- type LoggerWithIndirectCallerFunc
- func (f *LoggerWithIndirectCallerFunc) History() []LoggerWithIndirectCallerFuncCall
- func (f *LoggerWithIndirectCallerFunc) PushHook(hook func(int) log.Logger)
- func (f *LoggerWithIndirectCallerFunc) PushReturn(r0 log.Logger)
- func (f *LoggerWithIndirectCallerFunc) SetDefaultHook(hook func(int) log.Logger)
- func (f *LoggerWithIndirectCallerFunc) SetDefaultReturn(r0 log.Logger)
- type LoggerWithIndirectCallerFuncCall
- type MockLogger
- func (m *MockLogger) Debug(v0 string, v1 ...interface{})
- func (m *MockLogger) DebugWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
- func (m *MockLogger) Error(v0 string, v1 ...interface{})
- func (m *MockLogger) ErrorWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
- func (m *MockLogger) Fatal(v0 string, v1 ...interface{})
- func (m *MockLogger) FatalWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
- func (m *MockLogger) Info(v0 string, v1 ...interface{})
- func (m *MockLogger) InfoWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
- func (m *MockLogger) LogWithFields(v0 log.LogLevel, v1 log.LogFields, v2 string, v3 ...interface{})
- func (m *MockLogger) Sync() error
- func (m *MockLogger) Warning(v0 string, v1 ...interface{})
- func (m *MockLogger) WarningWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
- func (m *MockLogger) WithFields(v0 log.LogFields) log.Logger
- func (m *MockLogger) WithIndirectCaller(v0 int) log.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoggerDebugFunc ¶
type LoggerDebugFunc struct {
// contains filtered or unexported fields
}
LoggerDebugFunc describes the behavior when the Debug method of the parent MockLogger instance is invoked.
func (*LoggerDebugFunc) History ¶
func (f *LoggerDebugFunc) History() []LoggerDebugFuncCall
History returns a sequence of LoggerDebugFuncCall objects describing the invocations of this function.
func (*LoggerDebugFunc) PushHook ¶
func (f *LoggerDebugFunc) PushHook(hook func(string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the Debug method of the parent MockLogger 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 (*LoggerDebugFunc) PushReturn ¶
func (f *LoggerDebugFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerDebugFunc) SetDefaultHook ¶
func (f *LoggerDebugFunc) SetDefaultHook(hook func(string, ...interface{}))
SetDefaultHook sets function that is called when the Debug method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerDebugFunc) SetDefaultReturn ¶
func (f *LoggerDebugFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerDebugFuncCall ¶
type LoggerDebugFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 string
// Arg1 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg1 []interface{}
}
LoggerDebugFuncCall is an object that describes an invocation of method Debug on an instance of MockLogger.
func (LoggerDebugFuncCall) Args ¶
func (c LoggerDebugFuncCall) 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 (LoggerDebugFuncCall) Results ¶
func (c LoggerDebugFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerDebugWithFieldsFunc ¶
type LoggerDebugWithFieldsFunc struct {
// contains filtered or unexported fields
}
LoggerDebugWithFieldsFunc describes the behavior when the DebugWithFields method of the parent MockLogger instance is invoked.
func (*LoggerDebugWithFieldsFunc) History ¶
func (f *LoggerDebugWithFieldsFunc) History() []LoggerDebugWithFieldsFuncCall
History returns a sequence of LoggerDebugWithFieldsFuncCall objects describing the invocations of this function.
func (*LoggerDebugWithFieldsFunc) PushHook ¶
func (f *LoggerDebugWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the DebugWithFields method of the parent MockLogger 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 (*LoggerDebugWithFieldsFunc) PushReturn ¶
func (f *LoggerDebugWithFieldsFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerDebugWithFieldsFunc) SetDefaultHook ¶
func (f *LoggerDebugWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
SetDefaultHook sets function that is called when the DebugWithFields method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerDebugWithFieldsFunc) SetDefaultReturn ¶
func (f *LoggerDebugWithFieldsFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerDebugWithFieldsFuncCall ¶
type LoggerDebugWithFieldsFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 log.LogFields
// Arg1 is the value of the 2nd argument passed to this method
// invocation.
Arg1 string
// Arg2 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg2 []interface{}
}
LoggerDebugWithFieldsFuncCall is an object that describes an invocation of method DebugWithFields on an instance of MockLogger.
func (LoggerDebugWithFieldsFuncCall) Args ¶
func (c LoggerDebugWithFieldsFuncCall) 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 (LoggerDebugWithFieldsFuncCall) Results ¶
func (c LoggerDebugWithFieldsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerErrorFunc ¶
type LoggerErrorFunc struct {
// contains filtered or unexported fields
}
LoggerErrorFunc describes the behavior when the Error method of the parent MockLogger instance is invoked.
func (*LoggerErrorFunc) History ¶
func (f *LoggerErrorFunc) History() []LoggerErrorFuncCall
History returns a sequence of LoggerErrorFuncCall objects describing the invocations of this function.
func (*LoggerErrorFunc) PushHook ¶
func (f *LoggerErrorFunc) PushHook(hook func(string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the Error method of the parent MockLogger 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 (*LoggerErrorFunc) PushReturn ¶
func (f *LoggerErrorFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerErrorFunc) SetDefaultHook ¶
func (f *LoggerErrorFunc) SetDefaultHook(hook func(string, ...interface{}))
SetDefaultHook sets function that is called when the Error method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerErrorFunc) SetDefaultReturn ¶
func (f *LoggerErrorFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerErrorFuncCall ¶
type LoggerErrorFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 string
// Arg1 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg1 []interface{}
}
LoggerErrorFuncCall is an object that describes an invocation of method Error on an instance of MockLogger.
func (LoggerErrorFuncCall) Args ¶
func (c LoggerErrorFuncCall) 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 (LoggerErrorFuncCall) Results ¶
func (c LoggerErrorFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerErrorWithFieldsFunc ¶
type LoggerErrorWithFieldsFunc struct {
// contains filtered or unexported fields
}
LoggerErrorWithFieldsFunc describes the behavior when the ErrorWithFields method of the parent MockLogger instance is invoked.
func (*LoggerErrorWithFieldsFunc) History ¶
func (f *LoggerErrorWithFieldsFunc) History() []LoggerErrorWithFieldsFuncCall
History returns a sequence of LoggerErrorWithFieldsFuncCall objects describing the invocations of this function.
func (*LoggerErrorWithFieldsFunc) PushHook ¶
func (f *LoggerErrorWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the ErrorWithFields method of the parent MockLogger 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 (*LoggerErrorWithFieldsFunc) PushReturn ¶
func (f *LoggerErrorWithFieldsFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerErrorWithFieldsFunc) SetDefaultHook ¶
func (f *LoggerErrorWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
SetDefaultHook sets function that is called when the ErrorWithFields method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerErrorWithFieldsFunc) SetDefaultReturn ¶
func (f *LoggerErrorWithFieldsFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerErrorWithFieldsFuncCall ¶
type LoggerErrorWithFieldsFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 log.LogFields
// Arg1 is the value of the 2nd argument passed to this method
// invocation.
Arg1 string
// Arg2 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg2 []interface{}
}
LoggerErrorWithFieldsFuncCall is an object that describes an invocation of method ErrorWithFields on an instance of MockLogger.
func (LoggerErrorWithFieldsFuncCall) Args ¶
func (c LoggerErrorWithFieldsFuncCall) 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 (LoggerErrorWithFieldsFuncCall) Results ¶
func (c LoggerErrorWithFieldsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerFatalFunc ¶
type LoggerFatalFunc struct {
// contains filtered or unexported fields
}
LoggerFatalFunc describes the behavior when the Fatal method of the parent MockLogger instance is invoked.
func (*LoggerFatalFunc) History ¶
func (f *LoggerFatalFunc) History() []LoggerFatalFuncCall
History returns a sequence of LoggerFatalFuncCall objects describing the invocations of this function.
func (*LoggerFatalFunc) PushHook ¶
func (f *LoggerFatalFunc) PushHook(hook func(string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the Fatal method of the parent MockLogger 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 (*LoggerFatalFunc) PushReturn ¶
func (f *LoggerFatalFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerFatalFunc) SetDefaultHook ¶
func (f *LoggerFatalFunc) SetDefaultHook(hook func(string, ...interface{}))
SetDefaultHook sets function that is called when the Fatal method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerFatalFunc) SetDefaultReturn ¶
func (f *LoggerFatalFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerFatalFuncCall ¶
type LoggerFatalFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 string
// Arg1 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg1 []interface{}
}
LoggerFatalFuncCall is an object that describes an invocation of method Fatal on an instance of MockLogger.
func (LoggerFatalFuncCall) Args ¶
func (c LoggerFatalFuncCall) 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 (LoggerFatalFuncCall) Results ¶
func (c LoggerFatalFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerFatalWithFieldsFunc ¶
type LoggerFatalWithFieldsFunc struct {
// contains filtered or unexported fields
}
LoggerFatalWithFieldsFunc describes the behavior when the FatalWithFields method of the parent MockLogger instance is invoked.
func (*LoggerFatalWithFieldsFunc) History ¶
func (f *LoggerFatalWithFieldsFunc) History() []LoggerFatalWithFieldsFuncCall
History returns a sequence of LoggerFatalWithFieldsFuncCall objects describing the invocations of this function.
func (*LoggerFatalWithFieldsFunc) PushHook ¶
func (f *LoggerFatalWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the FatalWithFields method of the parent MockLogger 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 (*LoggerFatalWithFieldsFunc) PushReturn ¶
func (f *LoggerFatalWithFieldsFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerFatalWithFieldsFunc) SetDefaultHook ¶
func (f *LoggerFatalWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
SetDefaultHook sets function that is called when the FatalWithFields method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerFatalWithFieldsFunc) SetDefaultReturn ¶
func (f *LoggerFatalWithFieldsFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerFatalWithFieldsFuncCall ¶
type LoggerFatalWithFieldsFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 log.LogFields
// Arg1 is the value of the 2nd argument passed to this method
// invocation.
Arg1 string
// Arg2 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg2 []interface{}
}
LoggerFatalWithFieldsFuncCall is an object that describes an invocation of method FatalWithFields on an instance of MockLogger.
func (LoggerFatalWithFieldsFuncCall) Args ¶
func (c LoggerFatalWithFieldsFuncCall) 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 (LoggerFatalWithFieldsFuncCall) Results ¶
func (c LoggerFatalWithFieldsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerInfoFunc ¶
type LoggerInfoFunc struct {
// contains filtered or unexported fields
}
LoggerInfoFunc describes the behavior when the Info method of the parent MockLogger instance is invoked.
func (*LoggerInfoFunc) History ¶
func (f *LoggerInfoFunc) History() []LoggerInfoFuncCall
History returns a sequence of LoggerInfoFuncCall objects describing the invocations of this function.
func (*LoggerInfoFunc) PushHook ¶
func (f *LoggerInfoFunc) PushHook(hook func(string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the Info method of the parent MockLogger 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 (*LoggerInfoFunc) PushReturn ¶
func (f *LoggerInfoFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerInfoFunc) SetDefaultHook ¶
func (f *LoggerInfoFunc) SetDefaultHook(hook func(string, ...interface{}))
SetDefaultHook sets function that is called when the Info method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerInfoFunc) SetDefaultReturn ¶
func (f *LoggerInfoFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerInfoFuncCall ¶
type LoggerInfoFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 string
// Arg1 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg1 []interface{}
}
LoggerInfoFuncCall is an object that describes an invocation of method Info on an instance of MockLogger.
func (LoggerInfoFuncCall) Args ¶
func (c LoggerInfoFuncCall) 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 (LoggerInfoFuncCall) Results ¶
func (c LoggerInfoFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerInfoWithFieldsFunc ¶
type LoggerInfoWithFieldsFunc struct {
// contains filtered or unexported fields
}
LoggerInfoWithFieldsFunc describes the behavior when the InfoWithFields method of the parent MockLogger instance is invoked.
func (*LoggerInfoWithFieldsFunc) History ¶
func (f *LoggerInfoWithFieldsFunc) History() []LoggerInfoWithFieldsFuncCall
History returns a sequence of LoggerInfoWithFieldsFuncCall objects describing the invocations of this function.
func (*LoggerInfoWithFieldsFunc) PushHook ¶
func (f *LoggerInfoWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the InfoWithFields method of the parent MockLogger 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 (*LoggerInfoWithFieldsFunc) PushReturn ¶
func (f *LoggerInfoWithFieldsFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerInfoWithFieldsFunc) SetDefaultHook ¶
func (f *LoggerInfoWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
SetDefaultHook sets function that is called when the InfoWithFields method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerInfoWithFieldsFunc) SetDefaultReturn ¶
func (f *LoggerInfoWithFieldsFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerInfoWithFieldsFuncCall ¶
type LoggerInfoWithFieldsFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 log.LogFields
// Arg1 is the value of the 2nd argument passed to this method
// invocation.
Arg1 string
// Arg2 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg2 []interface{}
}
LoggerInfoWithFieldsFuncCall is an object that describes an invocation of method InfoWithFields on an instance of MockLogger.
func (LoggerInfoWithFieldsFuncCall) Args ¶
func (c LoggerInfoWithFieldsFuncCall) 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 (LoggerInfoWithFieldsFuncCall) Results ¶
func (c LoggerInfoWithFieldsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerLogWithFieldsFunc ¶
type LoggerLogWithFieldsFunc struct {
// contains filtered or unexported fields
}
LoggerLogWithFieldsFunc describes the behavior when the LogWithFields method of the parent MockLogger instance is invoked.
func (*LoggerLogWithFieldsFunc) History ¶
func (f *LoggerLogWithFieldsFunc) History() []LoggerLogWithFieldsFuncCall
History returns a sequence of LoggerLogWithFieldsFuncCall objects describing the invocations of this function.
func (*LoggerLogWithFieldsFunc) PushHook ¶
func (f *LoggerLogWithFieldsFunc) PushHook(hook func(log.LogLevel, log.LogFields, string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the LogWithFields method of the parent MockLogger 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 (*LoggerLogWithFieldsFunc) PushReturn ¶
func (f *LoggerLogWithFieldsFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerLogWithFieldsFunc) SetDefaultHook ¶
func (f *LoggerLogWithFieldsFunc) SetDefaultHook(hook func(log.LogLevel, log.LogFields, string, ...interface{}))
SetDefaultHook sets function that is called when the LogWithFields method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerLogWithFieldsFunc) SetDefaultReturn ¶
func (f *LoggerLogWithFieldsFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerLogWithFieldsFuncCall ¶
type LoggerLogWithFieldsFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 log.LogLevel
// Arg1 is the value of the 2nd argument passed to this method
// invocation.
Arg1 log.LogFields
// Arg2 is the value of the 3rd argument passed to this method
// invocation.
Arg2 string
// Arg3 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg3 []interface{}
}
LoggerLogWithFieldsFuncCall is an object that describes an invocation of method LogWithFields on an instance of MockLogger.
func (LoggerLogWithFieldsFuncCall) Args ¶
func (c LoggerLogWithFieldsFuncCall) 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 (LoggerLogWithFieldsFuncCall) Results ¶
func (c LoggerLogWithFieldsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerSyncFunc ¶
type LoggerSyncFunc struct {
// contains filtered or unexported fields
}
LoggerSyncFunc describes the behavior when the Sync method of the parent MockLogger instance is invoked.
func (*LoggerSyncFunc) History ¶
func (f *LoggerSyncFunc) History() []LoggerSyncFuncCall
History returns a sequence of LoggerSyncFuncCall objects describing the invocations of this function.
func (*LoggerSyncFunc) PushHook ¶
func (f *LoggerSyncFunc) PushHook(hook func() error)
PushHook adds a function to the end of hook queue. Each invocation of the Sync method of the parent MockLogger 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 (*LoggerSyncFunc) PushReturn ¶
func (f *LoggerSyncFunc) PushReturn(r0 error)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerSyncFunc) SetDefaultHook ¶
func (f *LoggerSyncFunc) SetDefaultHook(hook func() error)
SetDefaultHook sets function that is called when the Sync method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerSyncFunc) SetDefaultReturn ¶
func (f *LoggerSyncFunc) SetDefaultReturn(r0 error)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerSyncFuncCall ¶
type LoggerSyncFuncCall struct {
// Result0 is the value of the 1st result returned from this method
// invocation.
Result0 error
}
LoggerSyncFuncCall is an object that describes an invocation of method Sync on an instance of MockLogger.
func (LoggerSyncFuncCall) Args ¶
func (c LoggerSyncFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (LoggerSyncFuncCall) Results ¶
func (c LoggerSyncFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerWarningFunc ¶
type LoggerWarningFunc struct {
// contains filtered or unexported fields
}
LoggerWarningFunc describes the behavior when the Warning method of the parent MockLogger instance is invoked.
func (*LoggerWarningFunc) History ¶
func (f *LoggerWarningFunc) History() []LoggerWarningFuncCall
History returns a sequence of LoggerWarningFuncCall objects describing the invocations of this function.
func (*LoggerWarningFunc) PushHook ¶
func (f *LoggerWarningFunc) PushHook(hook func(string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the Warning method of the parent MockLogger 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 (*LoggerWarningFunc) PushReturn ¶
func (f *LoggerWarningFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerWarningFunc) SetDefaultHook ¶
func (f *LoggerWarningFunc) SetDefaultHook(hook func(string, ...interface{}))
SetDefaultHook sets function that is called when the Warning method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerWarningFunc) SetDefaultReturn ¶
func (f *LoggerWarningFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerWarningFuncCall ¶
type LoggerWarningFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 string
// Arg1 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg1 []interface{}
}
LoggerWarningFuncCall is an object that describes an invocation of method Warning on an instance of MockLogger.
func (LoggerWarningFuncCall) Args ¶
func (c LoggerWarningFuncCall) 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 (LoggerWarningFuncCall) Results ¶
func (c LoggerWarningFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerWarningWithFieldsFunc ¶
type LoggerWarningWithFieldsFunc struct {
// contains filtered or unexported fields
}
LoggerWarningWithFieldsFunc describes the behavior when the WarningWithFields method of the parent MockLogger instance is invoked.
func (*LoggerWarningWithFieldsFunc) History ¶
func (f *LoggerWarningWithFieldsFunc) History() []LoggerWarningWithFieldsFuncCall
History returns a sequence of LoggerWarningWithFieldsFuncCall objects describing the invocations of this function.
func (*LoggerWarningWithFieldsFunc) PushHook ¶
func (f *LoggerWarningWithFieldsFunc) PushHook(hook func(log.LogFields, string, ...interface{}))
PushHook adds a function to the end of hook queue. Each invocation of the WarningWithFields method of the parent MockLogger 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 (*LoggerWarningWithFieldsFunc) PushReturn ¶
func (f *LoggerWarningWithFieldsFunc) PushReturn()
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerWarningWithFieldsFunc) SetDefaultHook ¶
func (f *LoggerWarningWithFieldsFunc) SetDefaultHook(hook func(log.LogFields, string, ...interface{}))
SetDefaultHook sets function that is called when the WarningWithFields method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerWarningWithFieldsFunc) SetDefaultReturn ¶
func (f *LoggerWarningWithFieldsFunc) SetDefaultReturn()
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerWarningWithFieldsFuncCall ¶
type LoggerWarningWithFieldsFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 log.LogFields
// Arg1 is the value of the 2nd argument passed to this method
// invocation.
Arg1 string
// Arg2 is a slice containing the values of the variadic arguments
// passed to this method invocation.
Arg2 []interface{}
}
LoggerWarningWithFieldsFuncCall is an object that describes an invocation of method WarningWithFields on an instance of MockLogger.
func (LoggerWarningWithFieldsFuncCall) Args ¶
func (c LoggerWarningWithFieldsFuncCall) 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 (LoggerWarningWithFieldsFuncCall) Results ¶
func (c LoggerWarningWithFieldsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerWithFieldsFunc ¶
type LoggerWithFieldsFunc struct {
// contains filtered or unexported fields
}
LoggerWithFieldsFunc describes the behavior when the WithFields method of the parent MockLogger instance is invoked.
func (*LoggerWithFieldsFunc) History ¶
func (f *LoggerWithFieldsFunc) History() []LoggerWithFieldsFuncCall
History returns a sequence of LoggerWithFieldsFuncCall objects describing the invocations of this function.
func (*LoggerWithFieldsFunc) PushHook ¶
func (f *LoggerWithFieldsFunc) PushHook(hook func(log.LogFields) log.Logger)
PushHook adds a function to the end of hook queue. Each invocation of the WithFields method of the parent MockLogger 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 (*LoggerWithFieldsFunc) PushReturn ¶
func (f *LoggerWithFieldsFunc) PushReturn(r0 log.Logger)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerWithFieldsFunc) SetDefaultHook ¶
func (f *LoggerWithFieldsFunc) SetDefaultHook(hook func(log.LogFields) log.Logger)
SetDefaultHook sets function that is called when the WithFields method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerWithFieldsFunc) SetDefaultReturn ¶
func (f *LoggerWithFieldsFunc) SetDefaultReturn(r0 log.Logger)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerWithFieldsFuncCall ¶
type LoggerWithFieldsFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 log.LogFields
// Result0 is the value of the 1st result returned from this method
// invocation.
Result0 log.Logger
}
LoggerWithFieldsFuncCall is an object that describes an invocation of method WithFields on an instance of MockLogger.
func (LoggerWithFieldsFuncCall) Args ¶
func (c LoggerWithFieldsFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (LoggerWithFieldsFuncCall) Results ¶
func (c LoggerWithFieldsFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type LoggerWithIndirectCallerFunc ¶ added in v1.1.0
type LoggerWithIndirectCallerFunc struct {
// contains filtered or unexported fields
}
LoggerWithIndirectCallerFunc describes the behavior when the WithIndirectCaller method of the parent MockLogger instance is invoked.
func (*LoggerWithIndirectCallerFunc) History ¶ added in v1.1.0
func (f *LoggerWithIndirectCallerFunc) History() []LoggerWithIndirectCallerFuncCall
History returns a sequence of LoggerWithIndirectCallerFuncCall objects describing the invocations of this function.
func (*LoggerWithIndirectCallerFunc) PushHook ¶ added in v1.1.0
func (f *LoggerWithIndirectCallerFunc) PushHook(hook func(int) log.Logger)
PushHook adds a function to the end of hook queue. Each invocation of the WithIndirectCaller method of the parent MockLogger 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 (*LoggerWithIndirectCallerFunc) PushReturn ¶ added in v1.1.0
func (f *LoggerWithIndirectCallerFunc) PushReturn(r0 log.Logger)
PushReturn calls PushDefaultHook with a function that returns the given values.
func (*LoggerWithIndirectCallerFunc) SetDefaultHook ¶ added in v1.1.0
func (f *LoggerWithIndirectCallerFunc) SetDefaultHook(hook func(int) log.Logger)
SetDefaultHook sets function that is called when the WithIndirectCaller method of the parent MockLogger instance is invoked and the hook queue is empty.
func (*LoggerWithIndirectCallerFunc) SetDefaultReturn ¶ added in v1.1.0
func (f *LoggerWithIndirectCallerFunc) SetDefaultReturn(r0 log.Logger)
SetDefaultReturn calls SetDefaultDefaultHook with a function that returns the given values.
type LoggerWithIndirectCallerFuncCall ¶ added in v1.1.0
type LoggerWithIndirectCallerFuncCall struct {
// Arg0 is the value of the 1st argument passed to this method
// invocation.
Arg0 int
// Result0 is the value of the 1st result returned from this method
// invocation.
Result0 log.Logger
}
LoggerWithIndirectCallerFuncCall is an object that describes an invocation of method WithIndirectCaller on an instance of MockLogger.
func (LoggerWithIndirectCallerFuncCall) Args ¶ added in v1.1.0
func (c LoggerWithIndirectCallerFuncCall) Args() []interface{}
Args returns an interface slice containing the arguments of this invocation.
func (LoggerWithIndirectCallerFuncCall) Results ¶ added in v1.1.0
func (c LoggerWithIndirectCallerFuncCall) Results() []interface{}
Results returns an interface slice containing the results of this invocation.
type MockLogger ¶
type MockLogger struct {
// DebugFunc is an instance of a mock function object controlling the
// behavior of the method Debug.
DebugFunc *LoggerDebugFunc
// DebugWithFieldsFunc is an instance of a mock function object
// controlling the behavior of the method DebugWithFields.
DebugWithFieldsFunc *LoggerDebugWithFieldsFunc
// ErrorFunc is an instance of a mock function object controlling the
// behavior of the method Error.
ErrorFunc *LoggerErrorFunc
// ErrorWithFieldsFunc is an instance of a mock function object
// controlling the behavior of the method ErrorWithFields.
ErrorWithFieldsFunc *LoggerErrorWithFieldsFunc
// FatalFunc is an instance of a mock function object controlling the
// behavior of the method Fatal.
FatalFunc *LoggerFatalFunc
// FatalWithFieldsFunc is an instance of a mock function object
// controlling the behavior of the method FatalWithFields.
FatalWithFieldsFunc *LoggerFatalWithFieldsFunc
// InfoFunc is an instance of a mock function object controlling the
// behavior of the method Info.
InfoFunc *LoggerInfoFunc
// InfoWithFieldsFunc is an instance of a mock function object
// controlling the behavior of the method InfoWithFields.
InfoWithFieldsFunc *LoggerInfoWithFieldsFunc
// LogWithFieldsFunc is an instance of a mock function object
// controlling the behavior of the method LogWithFields.
LogWithFieldsFunc *LoggerLogWithFieldsFunc
// SyncFunc is an instance of a mock function object controlling the
// behavior of the method Sync.
SyncFunc *LoggerSyncFunc
// WarningFunc is an instance of a mock function object controlling the
// behavior of the method Warning.
WarningFunc *LoggerWarningFunc
// WarningWithFieldsFunc is an instance of a mock function object
// controlling the behavior of the method WarningWithFields.
WarningWithFieldsFunc *LoggerWarningWithFieldsFunc
// WithFieldsFunc is an instance of a mock function object controlling
// the behavior of the method WithFields.
WithFieldsFunc *LoggerWithFieldsFunc
// WithIndirectCallerFunc is an instance of a mock function object
// controlling the behavior of the method WithIndirectCaller.
WithIndirectCallerFunc *LoggerWithIndirectCallerFunc
}
MockLogger is a mock implementation of the Logger interface (from the package github.com/go-nacelle/log) used for unit testing.
func NewMockLogger ¶
func NewMockLogger() *MockLogger
NewMockLogger creates a new mock of the Logger interface. All methods return zero values for all results, unless overwritten.
func NewMockLoggerFrom ¶
func NewMockLoggerFrom(i log.Logger) *MockLogger
NewMockLoggerFrom creates a new mock of the MockLogger interface. All methods delegate to the given implementation, unless overwritten.
func (*MockLogger) Debug ¶
func (m *MockLogger) Debug(v0 string, v1 ...interface{})
Debug delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) DebugWithFields ¶
func (m *MockLogger) DebugWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
DebugWithFields delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) Error ¶
func (m *MockLogger) Error(v0 string, v1 ...interface{})
Error delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) ErrorWithFields ¶
func (m *MockLogger) ErrorWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
ErrorWithFields delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) Fatal ¶
func (m *MockLogger) Fatal(v0 string, v1 ...interface{})
Fatal delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) FatalWithFields ¶
func (m *MockLogger) FatalWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
FatalWithFields delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) Info ¶
func (m *MockLogger) Info(v0 string, v1 ...interface{})
Info delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) InfoWithFields ¶
func (m *MockLogger) InfoWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
InfoWithFields delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) LogWithFields ¶
LogWithFields delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) Sync ¶
func (m *MockLogger) Sync() error
Sync delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) Warning ¶
func (m *MockLogger) Warning(v0 string, v1 ...interface{})
Warning delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) WarningWithFields ¶
func (m *MockLogger) WarningWithFields(v0 log.LogFields, v1 string, v2 ...interface{})
WarningWithFields delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) WithFields ¶
func (m *MockLogger) WithFields(v0 log.LogFields) log.Logger
WithFields delegates to the next hook function in the queue and stores the parameter and result values of this invocation.
func (*MockLogger) WithIndirectCaller ¶ added in v1.1.0
func (m *MockLogger) WithIndirectCaller(v0 int) log.Logger
WithIndirectCaller delegates to the next hook function in the queue and stores the parameter and result values of this invocation.