diff options
author | Steve <nilslice@gmail.com> | 2017-01-02 11:58:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-02 11:58:56 -0800 |
commit | 6f0d53777bcc792099113c7dbd1e5f0b012be562 (patch) | |
tree | c148636f245bb1efd4ce5b1f597519038da9816c /system/item/item.go | |
parent | 806fdbe1e8839feb1bcc4e5e07aa7c144a429901 (diff) | |
parent | ae7d01f3aae28797f3b9ebc67be843763a02da6d (diff) |
Merge pull request #27 from ponzu-cms/ponzu-dev
[core] HTTP/2 Server Push for referenced items, Hideable interface
Diffstat (limited to 'system/item/item.go')
-rw-r--r-- | system/item/item.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/system/item/item.go b/system/item/item.go index a813669..761b2cf 100644 --- a/system/item/item.go +++ b/system/item/item.go @@ -55,6 +55,19 @@ type Hookable interface { AfterReject(req *http.Request) error } +// Hideable lets a user keep items hidden +type Hideable interface { + Hide(*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"` |