Admin Interface & Handlers

* In Progress, Not Done Yet
+ Added Handlers to cover public and admin handlers
+ Added WebServer
+ InitHandlers used the new class
This commit is contained in:
Thorsten committed 2014-11-06 17:49:04 +01:00
1 parent f33f7b5c29
commit c1e8ca4b07
10 files changed
+126 -23

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
package Handlers
import (
"net/http"
)
func AddPublicHandler(pattern string, handler func(http.ResponseWriter, *http.Request)) {
muxPublic.HandleFunc(pattern, handler)
}
func AddAdminHandler(pattern string, handler func(http.ResponseWriter, *http.Request)) {
muxAdmin.HandleFunc(pattern, handler)
}
+15
View File
@@ -0,0 +1,15 @@
package Handlers
import (
"net/http"
)
func GetPublicMux() (mux *http.ServeMux) {
mux = muxPublic
return
}
func GetAdminMux() (mux *http.ServeMux) {
mux = muxAdmin
return
}
+5
View File
@@ -0,0 +1,5 @@
package Handlers
func init() {
}
+12
View File
@@ -0,0 +1,12 @@
package Handlers
import (
LM "github.com/SommerEngineering/Ocean/Log/Meta"
"net/http"
)
var (
senderName LM.Sender = `System::Handlers`
muxPublic *http.ServeMux = http.NewServeMux()
muxAdmin *http.ServeMux = http.NewServeMux()
)