Commit eb097aee authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Make server core package internal and rename to servercore

parent 60e4f166
......@@ -2,7 +2,7 @@
// or attribute-based signature applications to perform IRMA sessions with irmaclient instances
// (i.e. the IRMA app). It exposes a small interface to expose to other programming languages
// through cgo. It is used by the irmarequestor package but otherwise not meant for use in Go.
package core
package servercore
import (
"encoding/json"
......
package core
package servercore
import (
"github.com/privacybydesign/gabi"
......
package core
package servercore
import (
"encoding/json"
......
package core
package servercore
import (
"math/rand"
......
......@@ -11,13 +11,13 @@ import (
"github.com/go-errors/errors"
"github.com/privacybydesign/irmago"
"github.com/privacybydesign/irmago/internal/servercore"
"github.com/privacybydesign/irmago/server"
"github.com/privacybydesign/irmago/server/core"
)
// Server is an irmareqestor server instance.
type Server struct {
*core.Server
*servercore.Server
handlers map[string]SessionHandler
}
......@@ -26,7 +26,7 @@ type Server struct {
type SessionHandler func(*server.SessionResult)
func New(conf *server.Configuration) (*Server, error) {
s, err := core.New(conf)
s, err := servercore.New(conf)
if err != nil {
return nil, err
}
......@@ -68,7 +68,7 @@ func (s *Server) HttpHandlerFunc() http.HandlerFunc {
}
}
token, noun, err := core.ParsePath(r.URL.Path)
token, noun, err := servercore.ParsePath(r.URL.Path)
if err == nil && noun == "statusevents" { // if err != nil we let it be handled by HandleProtocolMessage below
if err = s.SubscribeServerSentEvents(w, r, token); err != nil {
server.WriteError(w, server.ErrorUnexpectedRequest, err.Error())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment