diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-12-07 16:22:51 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-12-08 00:34:58 (GMT) |
commit | abff4760fe4aede34b60fbefc8f398ad2370304e (patch) | |
tree | 5bc6c555d7269e4fce0f365478a9348b2a4fb7e6 /src/helsinki.at/rhimportd | |
parent | a1b290f026011276f9c16f6af390a2aceb2f9ccc (diff) |
renamed RDDB to RdDb and added code to fetch show infos based on ID
Diffstat (limited to 'src/helsinki.at/rhimportd')
-rw-r--r-- | src/helsinki.at/rhimportd/ctrlWeb.go | 8 | ||||
-rw-r--r-- | src/helsinki.at/rhimportd/ctrlWebSimple.go | 4 | ||||
-rw-r--r-- | src/helsinki.at/rhimportd/rhimportd.go | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/helsinki.at/rhimportd/ctrlWeb.go b/src/helsinki.at/rhimportd/ctrlWeb.go index e5f74b7..6475a96 100644 --- a/src/helsinki.at/rhimportd/ctrlWeb.go +++ b/src/helsinki.at/rhimportd/ctrlWeb.go @@ -32,16 +32,16 @@ import ( type webHandler struct { *rhimport.Config - *rhimport.RDDB + *rhimport.RdDb trusted bool - H func(*rhimport.Config, *rhimport.RDDB, 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.RDDB, self.trusted, w, r) + self.H(self.Config, self.RdDb, self.trusted, w, r) } -func StartControlWeb(addr_s string, conf *rhimport.Config, rddb *rhimport.RDDB) { +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}) diff --git a/src/helsinki.at/rhimportd/ctrlWebSimple.go b/src/helsinki.at/rhimportd/ctrlWebSimple.go index f4c64ee..7b7c70d 100644 --- a/src/helsinki.at/rhimportd/ctrlWebSimple.go +++ b/src/helsinki.at/rhimportd/ctrlWebSimple.go @@ -67,7 +67,7 @@ func webSimpleResponse(w http.ResponseWriter) { encoder.Encode(respdata) } -func webSimpleParseRequest(conf *rhimport.Config, rddb *rhimport.RDDB, trusted bool, r *http.Request) (ctx *rhimport.ImportContext, err error) { +func webSimpleParseRequest(conf *rhimport.Config, rddb *rhimport.RdDb, trusted bool, r *http.Request) (ctx *rhimport.ImportContext, err error) { decoder := json.NewDecoder(r.Body) var reqdata webSimpleRequestData @@ -93,7 +93,7 @@ func webSimpleParseRequest(conf *rhimport.Config, rddb *rhimport.RDDB, trusted b return } -func webSimpleHandler(conf *rhimport.Config, rddb *rhimport.RDDB, trusted bool, w http.ResponseWriter, r *http.Request) { +func webSimpleHandler(conf *rhimport.Config, rddb *rhimport.RdDb, trusted bool, w http.ResponseWriter, r *http.Request) { rhdl.Printf("SimpleHandler: request for '%s'", html.EscapeString(r.URL.Path)) var ctx *rhimport.ImportContext diff --git a/src/helsinki.at/rhimportd/rhimportd.go b/src/helsinki.at/rhimportd/rhimportd.go index 7cdc67b..b8c5e3b 100644 --- a/src/helsinki.at/rhimportd/rhimportd.go +++ b/src/helsinki.at/rhimportd/rhimportd.go @@ -51,7 +51,7 @@ func main() { return } - rddb, err := rhimport.NewRDDB(conf) + rddb, err := rhimport.NewRdDb(conf) if err != nil { rhl.Println("Error initializing Rivdenll DB:", err) return |