summaryrefslogtreecommitdiff
path: root/system/item
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-29 23:01:14 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-29 23:01:14 -0800
commit7418572026f7ec9a35a85baf2cbf24c205740e4c (patch)
treeb445b4767e8c8b57bc3be5dcaed6dbedce8344bf /system/item
parent5c340ca57e876a556a5b57e5a7dd32b0ae288440 (diff)
adding initial implementation of HTTP/2 server push to single content api reponses
Diffstat (limited to 'system/item')
-rw-r--r--system/item/item.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/system/item/item.go b/system/item/item.go
index a813669..85ec5f9 100644
--- a/system/item/item.go
+++ b/system/item/item.go
@@ -55,6 +55,14 @@ type Hookable interface {
AfterReject(req *http.Request) error
}
+// Pushable lets a user define which values of certain struct fields are
+// 'pushed' down to a client via HTTP/2 Server Push. All items in the slice
+// should be the json tag names of the struct fields to which they coorespond
+type Pushable interface {
+ // the values contained by fields returned by Push must strictly be URL paths
+ Push() []string
+}
+
// Item should only be embedded into content type structs.
type Item struct {
UUID uuid.UUID `json:"uuid"`