mocks

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package mocks provides shared mock implementations for testing database components. This package centralizes common mocks used across all database package tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEvent

type LogEvent struct{}

LogEvent implements logger.LogEvent interface for testing. All methods are no-op implementations that satisfy the interface without producing any output.

func (*LogEvent) Bytes

func (e *LogEvent) Bytes(_ string, _ []byte) logger.LogEvent

Bytes adds a byte slice field to the log event (no-op for testing)

func (*LogEvent) Dur

func (e *LogEvent) Dur(_ string, _ time.Duration) logger.LogEvent

Dur adds a duration field to the log event (no-op for testing)

func (*LogEvent) Err

func (e *LogEvent) Err(_ error) logger.LogEvent

Err adds an error field to the log event (no-op for testing)

func (*LogEvent) Int

func (e *LogEvent) Int(_ string, _ int) logger.LogEvent

Int adds an int field to the log event (no-op for testing)

func (*LogEvent) Int64

func (e *LogEvent) Int64(_ string, _ int64) logger.LogEvent

Int64 adds an int64 field to the log event (no-op for testing)

func (*LogEvent) Interface

func (e *LogEvent) Interface(_ string, _ any) logger.LogEvent

Interface adds an interface{} field to the log event (no-op for testing)

func (*LogEvent) Msg

func (e *LogEvent) Msg(_ string)

Msg logs the message (no-op for testing)

func (*LogEvent) Msgf

func (e *LogEvent) Msgf(_ string, _ ...any)

Msgf logs a formatted message (no-op for testing)

func (*LogEvent) Str

func (e *LogEvent) Str(_, _ string) logger.LogEvent

Str adds a string field to the log event (no-op for testing)

func (*LogEvent) Uint64

func (e *LogEvent) Uint64(_ string, _ uint64) logger.LogEvent

Uint64 adds a uint64 field to the log event (no-op for testing)

type Logger

type Logger struct{}

Logger implements logger.Logger interface for testing. It provides a no-op implementation that satisfies the interface without producing any actual logging output.

func (*Logger) Debug

func (l *Logger) Debug() logger.LogEvent

Debug returns a no-op LogEvent for debug-level logging

func (*Logger) Error

func (l *Logger) Error() logger.LogEvent

Error returns a no-op LogEvent for error-level logging

func (*Logger) Fatal

func (l *Logger) Fatal() logger.LogEvent

Fatal returns a no-op LogEvent for fatal-level logging

func (*Logger) Info

func (l *Logger) Info() logger.LogEvent

Info returns a no-op LogEvent for info-level logging

func (*Logger) Warn

func (l *Logger) Warn() logger.LogEvent

Warn returns a no-op LogEvent for warning-level logging

func (*Logger) WithContext

func (l *Logger) WithContext(_ any) logger.Logger

WithContext returns the same logger instance (no-op for testing)

func (*Logger) WithFields

func (l *Logger) WithFields(_ map[string]any) logger.Logger

WithFields returns the same logger instance (no-op for testing)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL