Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilConfig = errors.New("config cannot be nil") ErrNilConnection = errors.New("connection cannot be nil") ErrNilPool = errors.New("pool cannot be nil") ErrAlreadyConnected = errors.New("connection to database already established") ErrConnectionFailed = errors.New("failed to connect to database") ErrPingFailed = errors.New("failed to ping database") ErrNotConnected = errors.New("connection to database not established") ErrFailedToDisconnect = errors.New("failed to disconnect from database") ErrEmptyDriverName = errors.New("driver name cannot be empty") ErrEmptyDataSourceName = errors.New("data source name cannot be empty") ErrNilQuery = errors.New("sql query cannot be nil") ErrNilRow = errors.New("sql row cannot be nil") )
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is the logger for the database connection
func NewLogger ¶
func NewLogger(header string, modeLogger gologgermode.Logger) (*Logger, error)
NewLogger is the logger for the database connection
func (*Logger) ConnectedToDatabase ¶
func (l *Logger) ConnectedToDatabase()
ConnectedToDatabase logs a success message when the server connects to the database
func (*Logger) DisconnectedFromDatabase ¶
func (l *Logger) DisconnectedFromDatabase()
DisconnectedFromDatabase logs a success message when the server disconnects from the database
Click to show internal directories.
Click to hide internal directories.