made db module
This commit is contained in:
parent
2dd8cc3d2b
commit
3dacf06005
12 changed files with 82 additions and 99 deletions
|
@ -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
|
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue