Documentation ¶
Index ¶
- type DBLogger
- func (dbl DBLogger) Error(_ context.Context, msg string, data ...interface{})
- func (dbl DBLogger) Info(_ context.Context, msg string, data ...interface{})
- func (dbl *DBLogger) LogMode(lvl gormlogger.LogLevel) gormlogger.Interface
- func (dbl DBLogger) Trace(_ context.Context, _ time.Time, fc func() (string, int64), err error)
- func (dbl DBLogger) Warn(_ context.Context, msg string, data ...interface{})
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBLogger ¶
type DBLogger struct {
// contains filtered or unexported fields
}
DBLogger implements a wrapper around the zerolog Logger type and implements the GORM logging interface.
func NewDBLogger ¶
NewDBLogger creates a new wrapped DBLogger with a given zerolog logger.
func (*DBLogger) LogMode ¶
func (dbl *DBLogger) LogMode(lvl gormlogger.LogLevel) gormlogger.Interface
LogMode returns a new wrapped zerolog logger with a provided GORM log level which is mapped to a zerolog level.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the encapsulating Atlas service. It wraps a router which is responsible for handling all versioned API requests with a given Router that interacts the with Atlas data model. The Service is responsible for establishing a database connection and managing session cookies.
func (*Service) Cleanup ¶
func (s *Service) Cleanup()
Cleanup performs server cleanup. If the internal HTTP server is non-nil, the server will be shutdown after a grace period deadline.