aboutsummaryrefslogtreecommitdiffstats
path: root/lib/webserver/server.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-10 12:19:34 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-16 14:27:28 +0200
commitdd6f08b10b1597f44e3dc25509ac9a45336b0914 (patch)
tree3dcb835306bc3adbae7c27d94fc8a51de8d6f09a /lib/webserver/server.go
parent0262f5bef6ff67e77b844a04733c57740fba9f00 (diff)
Add folder interface and support native pathmap folder type.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/webserver/server.go')
-rw-r--r--lib/webserver/server.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/webserver/server.go b/lib/webserver/server.go
index 7649cce..5183208 100644
--- a/lib/webserver/server.go
+++ b/lib/webserver/server.go
@@ -27,7 +27,7 @@ type Server struct {
webApp *gin.RouterGroup
cfg *xdsconfig.Config
sessions *session.Sessions
- mfolder *model.Folder
+ mfolders *model.Folders
sdks *crosssdk.SDKs
log *logrus.Logger
stop chan struct{} // signals intentional stop
@@ -37,7 +37,7 @@ const indexFilename = "index.html"
const cookieMaxAge = "3600"
// New creates an instance of Server
-func New(cfg *xdsconfig.Config, mfolder *model.Folder, sdks *crosssdk.SDKs, logr *logrus.Logger) *Server {
+func New(cfg *xdsconfig.Config, mfolders *model.Folders, sdks *crosssdk.SDKs, logr *logrus.Logger) *Server {
// Setup logging for gin router
if logr.Level == logrus.DebugLevel {
@@ -63,7 +63,7 @@ func New(cfg *xdsconfig.Config, mfolder *model.Folder, sdks *crosssdk.SDKs, logr
webApp: nil,
cfg: cfg,
sessions: nil,
- mfolder: mfolder,
+ mfolders: mfolders,
sdks: sdks,
log: logr,
stop: make(chan struct{}),
@@ -86,7 +86,7 @@ func (s *Server) Serve() error {
s.sessions = session.NewClientSessions(s.router, s.log, cookieMaxAge)
// Create REST API
- s.api = apiv1.New(s.router, s.sessions, s.cfg, s.mfolder, s.sdks)
+ s.api = apiv1.New(s.router, s.sessions, s.cfg, s.mfolders, s.sdks)
// Websocket routes
s.sIOServer, err = socketio.NewServer(nil)