Add documentation
This commit is contained in:
1 parent
69d0bdabf4
commit
6dab89a1d4
144 files changed
+1107
-549
No files matched your search
@@ -4,10 +4,12 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Function to add a new public handler.
|
||||
func AddPublicHandler(pattern string, handler func(http.ResponseWriter, *http.Request)) {
|
||||
muxPublic.HandleFunc(pattern, handler)
|
||||
}
|
||||
|
||||
// Function to add a new private handler.
|
||||
func AddAdminHandler(pattern string, handler func(http.ResponseWriter, *http.Request)) {
|
||||
muxAdmin.HandleFunc(pattern, handler)
|
||||
}
|
||||
@@ -4,11 +4,13 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Returns the muxer for the public web server.
|
||||
func GetPublicMux() (mux *http.ServeMux) {
|
||||
mux = muxPublic
|
||||
return
|
||||
}
|
||||
|
||||
// Returns the muxer for the private web server.
|
||||
func GetAdminMux() (mux *http.ServeMux) {
|
||||
mux = muxAdmin
|
||||
return
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package Handlers
|
||||
|
||||
// The init function for this package.
|
||||
func init() {
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
senderName LM.Sender = `System::Handlers`
|
||||
muxPublic *http.ServeMux = http.NewServeMux()
|
||||
muxAdmin *http.ServeMux = http.NewServeMux()
|
||||
senderName LM.Sender = `System::Handlers` // This is the name for logging event from this package
|
||||
muxPublic *http.ServeMux = http.NewServeMux() // The muxer for the public web server
|
||||
muxAdmin *http.ServeMux = http.NewServeMux() // The muxer for the private web server
|
||||
)
|
||||
Reference in new issue
Block a user