aboutsummaryrefslogtreecommitdiff
path: root/handler.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-22 15:08:47 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-22 15:08:47 +0200
commit2793442e21f19fc3f764e1f848b83d96076dcfb0 (patch)
tree8b2adfcca8c9753fe463dc4ad47224c178bbe73e /handler.go
parentec4741e374beeb085579ba896fdee2cd6f0f8848 (diff)
added parameter parsing for get-entries
Diffstat (limited to 'handler.go')
-rw-r--r--handler.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/handler.go b/handler.go
index 7b986c1..6c81d3e 100644
--- a/handler.go
+++ b/handler.go
@@ -112,9 +112,16 @@ func unpackRequest(r *http.Request, unpack interface{}) error {
return nil
}
-// getEntries provides with a list of entries from the Trillian backend
+// getEntries provides a list of entries from the Trillian backend
func getEntries(ctx context.Context, i *instance, w http.ResponseWriter, r *http.Request) (int, error) {
glog.Info("in getEntries")
+
+ var request GetEntriesRequest
+ if err := request.Unpack(r); err != nil {
+ return http.StatusBadRequest, err
+ }
+ glog.Infof("valid request: %v", request)
+
return http.StatusOK, nil // TODO
}