work in progress

This commit is contained in:
ston1th 2018-09-04 23:15:47 +02:00
commit 07ff5ccffb
23 changed files with 228 additions and 240 deletions

View file

@ -1,4 +1,4 @@
package main
package server
import (
"context"
@ -10,6 +10,9 @@ import (
"net"
"net/http"
"time"
"git.giftfish.de/ston1th/gowiki/pkg/db"
"git.giftfish.de/ston1th/gowiki/pkg/index"
)
const (
@ -22,9 +25,8 @@ type HTTPServer struct {
Version string
SecCookie bool
Store *sessions.CookieStore
Editors *EditorStore
BS *BoltStore
Index *Index
BS *db.BoltStore
Index *index.Index
listener net.Listener
srv *http.Server
templ map[string]*template.Template
@ -37,7 +39,6 @@ func NewHTTPServer(l net.Listener, versin string, secCookie bool) (srv *HTTPServ
SecCookie: secCookie,
listener: l,
}
srv.Editors = NewEditorStore()
srv.cookieStore()
srv.loadTemplates()
srv.srv = &http.Server{