made db module

This commit is contained in:
Leyla Becker 2025-04-21 17:34:39 -05:00
parent 2dd8cc3d2b
commit 3dacf06005
12 changed files with 82 additions and 99 deletions

View file

@ -1,15 +0,0 @@
package utils
import (
"github.com/sirupsen/logrus"
"github.com/vingarcia/ksql"
)
// TODO Figure out where this should be
// This exists so that you don't have to individually pass around the logger and database.
type ApiService struct {
db *ksql.DB
log *logrus.Logger
}
var s *ApiService

View file

@ -1,13 +0,0 @@
package utils
import (
"github.com/sirupsen/logrus"
)
func InitializeLogger() *logrus.Logger {
log := logrus.New()
log.SetFormatter(&logrus.TextFormatter{
FullTimestamp: true, // Include the full timestamp (with date and time)
})
return log
}