func NewConnection(config *Config) (DB, error) {
	db, err := mongodb.NewConnection(config.MongoDB)
	if err != nil {
		return nil, err
	}
	return db, nil
}
NewConnection creates a new database connection
package db
import (
	"github.com/ricoberger/go-vue-starter/pkg/db/mongodb"
	"github.com/ricoberger/go-vue-starter/pkg/model"
)
type Config struct {
	MongoDB *mongodb.Config
}
type DB interface {
	CloseConnection() error
	CreateUser(u *model.User) error
	GetUser(id string) (*model.User, error)
	GetUserByEmail(email string) (*model.User, error)
	SaveUser(u *model.User) error
	DeleteUser(id string) error
}