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 ++++++++++++++++--------------------------- cmd/ponzu/main.go | 9 +++++++- system/addon/api.go | 43 +++++++++++++++++++++++++++++++++++ system/admin/config/config.go | 1 + system/admin/handlers.go | 5 ++++ system/db/cache.go | 35 +--------------------------- system/db/config.go | 40 ++++++++++++++++++++++++++++++++ 7 files changed, 117 insertions(+), 69 deletions(-) create mode 100644 system/addon/api.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