diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-08 19:49:08 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-08 19:49:08 -0800 |
commit | f0eeb90641a85f30ea364a506fa548ac3b24fd09 (patch) | |
tree | 6b7173fe859e70ed89374cc2a58b1207c3791a21 /content | |
parent | c8c4ae95a14e9b976a8bf0aa796e9c995ef071e7 (diff) |
moving Mergable interface to content package. Still hit cyclical import issue, still makes sense to have in content
Diffstat (limited to 'content')
-rw-r--r-- | content/types.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/types.go b/content/types.go index ede2b58..f3b8bb3 100644 --- a/content/types.go +++ b/content/types.go @@ -1,5 +1,7 @@ package content +import "net/http" + const ( // ErrTypeNotRegistered means content type isn't registered (not found in Types map) ErrTypeNotRegistered = `Error: @@ -16,6 +18,14 @@ func init() { ` ) +// Mergeable allows external post content to be approved and published through +// the public-facing API +type Mergeable interface { + // Approve copies an external post to the internal collection and triggers + // a re-sort of its content type posts + Approve(req *http.Request) error +} + // Types is a map used to reference a type name to its actual Editable type // mainly for lookups in /admin route based utilities var Types = make(map[string]func() interface{}) |