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:
1 parent
f33f7b5c29
commit
c1e8ca4b07
10 files changed
+126
-23
No files matched your search
@@ -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)
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package Handlers
|
||||
|
||||
func init() {
|
||||
|
||||
}
|
||||
@@ -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()
|
||||
)
|
||||
Reference in new issue
Block a user