work in progress
This commit is contained in:
parent
38f7c31517
commit
07ff5ccffb
23 changed files with 228 additions and 240 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue