summaryrefslogtreecommitdiff
path: root/system/item
diff options
context:
space:
mode:
authorSteve <nilslice@gmail.com>2017-02-13 11:06:14 -0800
committerGitHub <noreply@github.com>2017-02-13 11:06:14 -0800
commit4222b04d45b2932022c71eecf909e0e43f5f9d9d (patch)
treedf0a0cc191834d9220fe5a9f952ad61c9527a43e /system/item
parent7a85b284dec2bbb462969fb7e9e949b1a2ae720a (diff)
parent46d7c021d8de124be803b5c10f157c132343ab4e (diff)
Merge pull request #73 from ponzu-cms/ponzu-dev
[core] Adding support to omit fields from json response, minor code reorganization
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 f35d7f6..4a219c8 100644
--- a/system/item/item.go
+++ b/system/item/item.go
@@ -71,6 +71,14 @@ type Pushable interface {
Push() []string
}
+// Omittable lets a user define certin fields within a content struct to remove
+// from an API response. Helpful when you want data in the CMS, but not entirely
+// shown or available from the content API. All items in the slice should be the
+// json tag names of the struct fields to which they coorespond.
+type Omittable interface {
+ Omit() []string
+}
+
// Item should only be embedded into content type structs.
type Item struct {
UUID uuid.UUID `json:"uuid"`