add internal/{processor,streaming}

This commit is contained in:
sam 2023-10-15 17:08:55 +02:00
parent 6f17b59a47
commit 5c6da51234
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
6 changed files with 128 additions and 29 deletions

View file

@ -9,6 +9,7 @@ import (
"git.sleepycat.moe/sam/mercury/internal/concurrent"
"git.sleepycat.moe/sam/mercury/internal/database"
"git.sleepycat.moe/sam/mercury/internal/database/sql"
"git.sleepycat.moe/sam/mercury/internal/processor"
"git.sleepycat.moe/sam/mercury/web/templates"
"github.com/flosch/pongo2/v6"
"github.com/go-chi/chi/v5"
@ -25,6 +26,7 @@ type App struct {
AppConfig config.Config
DBConfig *concurrent.Value[database.Config]
Database *sql.Base
Processor *processor.Processor
tmpl *pongo2.TemplateSet
tokenKey []byte
@ -35,6 +37,7 @@ func NewApp(ctx context.Context, cfg config.Config, db *sql.Base) (*App, error)
Router: chi.NewRouter(),
AppConfig: cfg,
Database: db,
Processor: processor.New(db),
}
if cfg.Core.SecretKey == "" {