News for hackers. Stuff that matters.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Sunday April 09, 2017 @08:45PM (#14075179)
Hi - you can make a relationship using the built in addon package, github.com/bosssauce/reference

The reference is stored as a string (or []string if you opt for a reference.SelectRepeater input func), but the value stored as a reference is actually a URL path to the content as it would be accessed via the Content API. This becomes very powerful when you enable HTTP/2 Server Push, and declare the referenced content to be pushed when it's parent content is requested.

The underlying data looks like this:

Song

id: 1

title: "Take Me Home, Country Roads"

artist: "/api/content?type=Artist&id=2"

If you enable H2 Server Push by implementing the Pushable interface (add a Push method that returns a []string of the JSON field names to push), the server will know to make a response for the referenced Artist field and push it down to the client when the parent Song is requested.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by tyingq on Sunday April 09, 2017 @08:50PM (#14075205)
Ahh, okay. That seems straightforward. Might be good to reference that in the main documentation.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Sunday April 09, 2017 @08:59PM (#14075249)
Definitely will -- thank you for taking the time to read through.. it's hard for me to know where the docs are too light sometimes. (besides generally everywhere)