api: reorder constants and add comments

This commit is contained in:
Jimmy Zelinskie 2016-02-09 13:33:40 -05:00
parent 98ed041956
commit c7aa7c4db4

View File

@ -29,10 +29,8 @@ import (
"github.com/coreos/clair/worker"
)
// maxBodySize restricts client requests to 1MiB.
const (
maxBodySize int64 = 1048576
// These are the route identifiers for prometheus.
postLayerRoute = "v1/postLayer"
getLayerRoute = "v1/getLayer"
deleteLayerRoute = "v1/deleteLayer"
@ -47,6 +45,9 @@ const (
getNotificationRoute = "v1/getNotification"
deleteNotificationRoute = "v1/deleteNotification"
getMetricsRoute = "v1/getMetrics"
// maxBodySize restricts client request bodies to 1MiB.
maxBodySize int64 = 1048576
)
func decodeJSON(r *http.Request, v interface{}) error {