diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-12-07 16:16:40 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-12-08 00:34:53 (GMT) |
commit | a1b290f026011276f9c16f6af390a2aceb2f9ccc (patch) | |
tree | 2f7be9167b918b16c82d3f71f057a610f6ca749e /src/helsinki.at/rhimportd/ctrlWeb.go | |
parent | 6e5d14f4a2189dbc0f0404c398d11878e356ecd7 (diff) |
moved DB into seperate module
Diffstat (limited to 'src/helsinki.at/rhimportd/ctrlWeb.go')
-rw-r--r-- | src/helsinki.at/rhimportd/ctrlWeb.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/helsinki.at/rhimportd/ctrlWeb.go b/src/helsinki.at/rhimportd/ctrlWeb.go index 5a76f15..e5f74b7 100644 --- a/src/helsinki.at/rhimportd/ctrlWeb.go +++ b/src/helsinki.at/rhimportd/ctrlWeb.go @@ -32,17 +32,18 @@ import ( type webHandler struct { *rhimport.Config + *rhimport.RDDB trusted bool - H func(*rhimport.Config, bool, http.ResponseWriter, *http.Request) + H func(*rhimport.Config, *rhimport.RDDB, bool, http.ResponseWriter, *http.Request) } func (self webHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - self.H(self.Config, self.trusted, w, r) + self.H(self.Config, self.RDDB, self.trusted, w, r) } -func StartControlWeb(addr_s string, conf *rhimport.Config) { - http.Handle("/public/simple", webHandler{conf, false, webSimpleHandler}) - http.Handle("/trusted/simple", webHandler{conf, true, webSimpleHandler}) +func StartControlWeb(addr_s string, conf *rhimport.Config, rddb *rhimport.RDDB) { + http.Handle("/public/simple", webHandler{conf, rddb, false, webSimpleHandler}) + http.Handle("/trusted/simple", webHandler{conf, rddb, true, webSimpleHandler}) rhl.Println("listening on", addr_s) http.ListenAndServe(addr_s, nil) |