From 7d87d40f8d0550331d1b19dea2c374ecfbc77d48 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Sun, 18 Dec 2016 12:13:08 -0800 Subject: adding beginning of addon api (cooresponding to previous commit w/ reference addon) --- addons/reference/reference.go | 53 ++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 34 deletions(-) (limited to 'addons/reference/reference.go') diff --git a/addons/reference/reference.go b/addons/reference/reference.go index b6cede8..78e46eb 100644 --- a/addons/reference/reference.go +++ b/addons/reference/reference.go @@ -1,44 +1,49 @@ +// Package reference is a Ponzu addon to enable content editors to create +// references to other content types which are stored as query strings within +// the referencer's content DB package reference import ( "bytes" "encoding/json" "fmt" + "html/template" "log" - "net/http" - "text/template" "github.com/bosssauce/ponzu/management/editor" + "github.com/bosssauce/ponzu/system/addon" ) -// Referenceable enures there is a way to reference the implenting type from -// within another type's editor and from type-scoped API calls -type Referenceable interface { - Referenced() []byte -} - // Select returns the []byte of a