Documentation ¶
Overview ¶
Package test is a generated GoMock package.
Index ¶
- func MatchEntry(x, y golog.Entry) error
- func NewFakeCheckLogger(w *InMemWriter) golog.Logger
- func NewFakeLogger(w *InMemWriter) golog.Logger
- func NewNullCheckLogger() golog.CheckLogger
- func NewNullLogger() golog.Logger
- type InMemWriter
- type MockCheckedLogger
- type MockCheckedLoggerMockRecorder
- type MockEntry
- type MockEntryMockRecorder
- type MockFlusher
- type MockFlusherMockRecorder
- type MockLogger
- func (m *MockLogger) Debug(arg0 context.Context, arg1 string)
- func (m *MockLogger) EXPECT() *MockLoggerMockRecorder
- func (m *MockLogger) Error(arg0 context.Context, arg1 string)
- func (m *MockLogger) Fatal(arg0 context.Context, arg1 string)
- func (m *MockLogger) Info(arg0 context.Context, arg1 string)
- func (m *MockLogger) Warn(arg0 context.Context, arg1 string)
- func (m *MockLogger) With(arg0 ...golog.Field) golog.Logger
- type MockLoggerMockRecorder
- func (mr *MockLoggerMockRecorder) Debug(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Error(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Fatal(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Info(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Warn(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) With(arg0 ...interface{}) *gomock.Call
- type MockWriter
- type MockWriterMockRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchEntry ¶ added in v1.12.0
MatchEntry is a utility function to match two entries. It only matched golog.StdEntry, fails otherwise
func NewFakeCheckLogger ¶ added in v1.12.0
func NewFakeCheckLogger(w *InMemWriter) golog.Logger
NewFakeCheckLogger returns a check logger that writes entries to the passed inmemory writer useful to check whether the logs are written as expected
func NewFakeLogger ¶ added in v1.12.0
func NewFakeLogger(w *InMemWriter) golog.Logger
NewFakeLogger returns a logger that writes entries to the passed inmemory writer useful to check whether the logs are written as expected
func NewNullCheckLogger ¶ added in v1.9.0
func NewNullCheckLogger() golog.CheckLogger
NewNullCheckLogger returns a null check logger useful for passing a logger as dependency
func NewNullLogger ¶ added in v1.9.0
NewNullLogger returns a null logger useful for passing a logger as dependency
Types ¶
type InMemWriter ¶ added in v1.12.0
InMemWriter is a Writer which keep in memory all the entries
func NewInMemWriter ¶ added in v1.12.0
func NewInMemWriter() *InMemWriter
NewInMemWriter returns a InMemWriter
func (*InMemWriter) Flush ¶ added in v1.14.0
func (w *InMemWriter) Flush() error
Flush flushes the data
func (*InMemWriter) Write ¶ added in v1.12.0
func (w *InMemWriter) Write(msg []byte) (int, error)
Write writes an Entry to the slice
func (*InMemWriter) WriteEntry ¶ added in v1.12.0
func (w *InMemWriter) WriteEntry(e golog.Entry)
WriteEntry writes an Entry to the slice
type MockCheckedLogger ¶
type MockCheckedLogger struct {
// contains filtered or unexported fields
}
MockCheckedLogger is a mock of CheckedLogger interface.
func NewMockCheckedLogger ¶
func NewMockCheckedLogger(ctrl *gomock.Controller) *MockCheckedLogger
NewMockCheckedLogger creates a new mock instance.
func (*MockCheckedLogger) EXPECT ¶
func (m *MockCheckedLogger) EXPECT() *MockCheckedLoggerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCheckedLogger) Log ¶
func (m *MockCheckedLogger) Log(arg0 ...golog.Field)
Log mocks base method.
type MockCheckedLoggerMockRecorder ¶
type MockCheckedLoggerMockRecorder struct {
// contains filtered or unexported fields
}
MockCheckedLoggerMockRecorder is the mock recorder for MockCheckedLogger.
func (*MockCheckedLoggerMockRecorder) Log ¶
func (mr *MockCheckedLoggerMockRecorder) Log(arg0 ...interface{}) *gomock.Call
Log indicates an expected call of Log.
type MockEntry ¶
type MockEntry struct {
// contains filtered or unexported fields
}
MockEntry is a mock of Entry interface.
func NewMockEntry ¶
func NewMockEntry(ctrl *gomock.Controller) *MockEntry
NewMockEntry creates a new mock instance.
func (*MockEntry) EXPECT ¶
func (m *MockEntry) EXPECT() *MockEntryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockEntryMockRecorder ¶
type MockEntryMockRecorder struct {
// contains filtered or unexported fields
}
MockEntryMockRecorder is the mock recorder for MockEntry.
func (*MockEntryMockRecorder) Context ¶
func (mr *MockEntryMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context.
func (*MockEntryMockRecorder) Fields ¶
func (mr *MockEntryMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields.
func (*MockEntryMockRecorder) Level ¶
func (mr *MockEntryMockRecorder) Level() *gomock.Call
Level indicates an expected call of Level.
func (*MockEntryMockRecorder) Message ¶
func (mr *MockEntryMockRecorder) Message() *gomock.Call
Message indicates an expected call of Message.
func (*MockEntryMockRecorder) With ¶
func (mr *MockEntryMockRecorder) With(arg0 ...interface{}) *gomock.Call
With indicates an expected call of With.
type MockFlusher ¶
type MockFlusher struct {
// contains filtered or unexported fields
}
MockFlusher is a mock of Flusher interface.
func NewMockFlusher ¶
func NewMockFlusher(ctrl *gomock.Controller) *MockFlusher
NewMockFlusher creates a new mock instance.
func (*MockFlusher) EXPECT ¶
func (m *MockFlusher) EXPECT() *MockFlusherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockFlusherMockRecorder ¶
type MockFlusherMockRecorder struct {
// contains filtered or unexported fields
}
MockFlusherMockRecorder is the mock recorder for MockFlusher.
func (*MockFlusherMockRecorder) Flush ¶
func (mr *MockFlusherMockRecorder) Flush() *gomock.Call
Flush indicates an expected call of Flush.
type MockLogger ¶
type MockLogger struct {
// contains filtered or unexported fields
}
MockLogger is a mock of Logger interface.
func NewMockLogger ¶
func NewMockLogger(ctrl *gomock.Controller) *MockLogger
NewMockLogger creates a new mock instance.
func (*MockLogger) Debug ¶
func (m *MockLogger) Debug(arg0 context.Context, arg1 string)
Debug mocks base method.
func (*MockLogger) EXPECT ¶
func (m *MockLogger) EXPECT() *MockLoggerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLogger) Error ¶
func (m *MockLogger) Error(arg0 context.Context, arg1 string)
Error mocks base method.
func (*MockLogger) Fatal ¶
func (m *MockLogger) Fatal(arg0 context.Context, arg1 string)
Fatal mocks base method.
func (*MockLogger) Info ¶
func (m *MockLogger) Info(arg0 context.Context, arg1 string)
Info mocks base method.
type MockLoggerMockRecorder ¶
type MockLoggerMockRecorder struct {
// contains filtered or unexported fields
}
MockLoggerMockRecorder is the mock recorder for MockLogger.
func (*MockLoggerMockRecorder) Debug ¶
func (mr *MockLoggerMockRecorder) Debug(arg0, arg1 interface{}) *gomock.Call
Debug indicates an expected call of Debug.
func (*MockLoggerMockRecorder) Error ¶
func (mr *MockLoggerMockRecorder) Error(arg0, arg1 interface{}) *gomock.Call
Error indicates an expected call of Error.
func (*MockLoggerMockRecorder) Fatal ¶
func (mr *MockLoggerMockRecorder) Fatal(arg0, arg1 interface{}) *gomock.Call
Fatal indicates an expected call of Fatal.
func (*MockLoggerMockRecorder) Info ¶
func (mr *MockLoggerMockRecorder) Info(arg0, arg1 interface{}) *gomock.Call
Info indicates an expected call of Info.
func (*MockLoggerMockRecorder) Warn ¶
func (mr *MockLoggerMockRecorder) Warn(arg0, arg1 interface{}) *gomock.Call
Warn indicates an expected call of Warn.
func (*MockLoggerMockRecorder) With ¶
func (mr *MockLoggerMockRecorder) With(arg0 ...interface{}) *gomock.Call
With indicates an expected call of With.
type MockWriter ¶
type MockWriter struct {
// contains filtered or unexported fields
}
MockWriter is a mock of Writer interface.
func NewMockWriter ¶
func NewMockWriter(ctrl *gomock.Controller) *MockWriter
NewMockWriter creates a new mock instance.
func (*MockWriter) EXPECT ¶
func (m *MockWriter) EXPECT() *MockWriterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockWriter) Flush ¶ added in v1.14.0
func (m *MockWriter) Flush() error
Flush mocks base method.
func (*MockWriter) Write ¶
func (m *MockWriter) Write(arg0 []byte) (int, error)
Write mocks base method.
func (*MockWriter) WriteEntry ¶
func (m *MockWriter) WriteEntry(arg0 golog.Entry)
WriteEntry mocks base method.
type MockWriterMockRecorder ¶
type MockWriterMockRecorder struct {
// contains filtered or unexported fields
}
MockWriterMockRecorder is the mock recorder for MockWriter.
func (*MockWriterMockRecorder) Flush ¶ added in v1.14.0
func (mr *MockWriterMockRecorder) Flush() *gomock.Call
Flush indicates an expected call of Flush.
func (*MockWriterMockRecorder) Write ¶
func (mr *MockWriterMockRecorder) Write(arg0 interface{}) *gomock.Call
Write indicates an expected call of Write.
func (*MockWriterMockRecorder) WriteEntry ¶
func (mr *MockWriterMockRecorder) WriteEntry(arg0 interface{}) *gomock.Call
WriteEntry indicates an expected call of WriteEntry.