summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/build/References/Overview/index.html6
-rw-r--r--docs/build/mkdocs/search_index.json4
-rw-r--r--docs/build/sitemap.xml44
-rw-r--r--docs/src/References/Overview.md6
4 files changed, 30 insertions, 30 deletions
diff --git a/docs/build/References/Overview/index.html b/docs/build/References/Overview/index.html
index 6766130..444b7d8 100644
--- a/docs/build/References/Overview/index.html
+++ b/docs/build/References/Overview/index.html
@@ -1038,13 +1038,13 @@ struct, which has a reference to an <code>Author</code>.</p>
<span class="p">}</span>
-<span class="kd">func</span> <span class="p">(</span><span class="nx">b</span> <span class="o">*</span><span class="nx">Book</span><span class="p">)</span> <span class="nx">Push</span><span class="p">()</span> <span class="p">[]</span><span class="kt">string</span> <span class="p">{</span>
+<span class="kd">func</span> <span class="p">(</span><span class="nx">b</span> <span class="o">*</span><span class="nx">Book</span><span class="p">)</span> <span class="nx">Push</span><span class="p">(</span><span class="nx">res</span> <span class="nx">http</span><span class="p">.</span><span class="nx">ResponseWriter</span><span class="p">,</span> <span class="nx">req</span> <span class="o">*</span><span class="nx">http</span><span class="p">.</span><span class="nx">Request</span><span class="p">)</span> <span class="p">([]</span><span class="kt">string</span><span class="p">,</span> <span class="kt">error</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">[]</span><span class="kt">string</span><span class="p">{</span>
<span class="c1">// the json struct tag is used to tell the server which</span>
<span class="c1">// field(s) it should push - only URL paths originating</span>
<span class="c1">// from your server can be pushed!</span>
<span class="s">&quot;author&quot;</span><span class="p">,</span>
- <span class="p">}</span>
+ <span class="p">},</span> <span class="kc">nil</span>
<span class="p">}</span>
<span class="o">...</span>
</pre></div>
@@ -1058,7 +1058,7 @@ has been made.</p>
<p class="admonition-title">What else can I Push?</p>
<p>Only fields that are URL paths originating from your server can be pushed.
This means that you could also implement <code>item.Pushable</code> on the <code>Author</code>
-type, and return <code>[]string{"photo"}</code> to push the Author's image!</p>
+type, and return <code>[]string{"photo"}, nil</code> to push the Author's image!</p>
</div>
<hr />
<h3 id="other-considerations">Other Considerations<a class="headerlink" href="#other-considerations" title="Permanent link">&para;</a></h3>
diff --git a/docs/build/mkdocs/search_index.json b/docs/build/mkdocs/search_index.json
index d9c1352..66eec53 100644
--- a/docs/build/mkdocs/search_index.json
+++ b/docs/build/mkdocs/search_index.json
@@ -962,7 +962,7 @@
},
{
"location": "/References/Overview/",
- "text": "References in Ponzu allow you to create relationships between your Content types.\nPonzu uses an embedded database, rather than a more traditional relational database \nwith SQL support. This may seem unnatural since there is no native concept of\n\"foreign keys\" or \"joins\" like you may be used to. Instead, Ponzu wires up your\ndata using references, which are simply URL paths, like \n/api/content?type=Post\nid=1\n\n\nA foreign key as a URL path?! Am I crazy? No! For the purpose Ponzu serves, \nthis structure works quite well, especially given its creation was specifically \ntuned for HTTP/2 features such as \"Request/Response Multiplexing\" and \"Server Push.\" \n\n\nThere is a deeper dive into the HTTP/2 concepts \nbelow\n, but first we'll walk through\na quick tutorial on Ponzu's references. \n\n\nTo generate references from the CLI, please \nread through the documentation\n. \nThe example below assumes you understand the syntax. \n\n\n\n\nCreate Your Content Types\n\n\nHere we are creating two Content types, \nAuthor\n and \nBook\n. A \nBook\n will keep\na reference to an \nAuthor\n in the sense that an author wrote the book.\n\n\n$ ponzu gen c author name:string photo:string:file bio:string:textarea\n$ ponzu gen c book title:string author:@author,name pages:int year:int\n\n\n\n\n\nThe structs generated for each look like:\n\n\ncontent/author.go\n\n\ntype\n \nAuthor\n \nstruct\n \n{\n\n \nitem\n.\nItem\n\n\n \nName\n \nstring\n \n`json:\nname\n`\n\n \nPhoto\n \nstring\n \n`json:\nphoto\n`\n\n \nBio\n \nstring\n \n`json:\nbio\n`\n\n\n}\n\n\n\n\n\n\ncontent/book.go\n\n\ntype\n \nBook\n \nstruct\n \n{\n\n \nitem\n.\nItem\n\n\n \nTitle\n \nstring\n \n`json:\ntitle\n`\n\n \nAuthor\n \nstring\n \n`json:\nauthor\n`\n\n \nPages\n \nint\n \n`json:\npages\n`\n\n \nYear\n \nint\n \n`json:\nyear\n`\n\n\n}\n\n\n\n\n\n\nNotice how the \nAuthor\n field within the \nBook\n struct is a \nstring\n type, not\nan \nAuthor\n type. This is because the \nAuthor\n is stored as a \nstring\n in our\ndatabase, as a reference to the \nAuthor\n, instead of embedding the \nAuthor\n data \ninside the \nBook\n. \n\n\nSome example JSON data for the two structs looks like:\n\n\nGET\n \n/api/content?type=Author\nid=1\n (\nAuthor\n)\n\n\n{\n\n \ndata\n:\n \n[\n\n \n{\n\n \nuuid\n:\n \n024a5797-e064-4ee0-abe3-415cb6d3ed18\n,\n\n \nid\n:\n \n1\n,\n\n \nslug\n:\n \nitem-id-024a5797-e064-4ee0-abe3-415cb6d3ed18\n,\n\n \ntimestamp\n:\n \n1493926453826\n,\n\n \nupdated\n:\n \n1493926453826\n,\n\n \nname\n:\n \nShel Silverstein\n,\n\n \nphoto\n:\n \n/api/uploads/2017/05/shel-silverstein.jpg\n,\n\n \nbio\n:\n \nSheldon Allan Silverstein was an American poet...\n\n \n}\n\n \n]\n\n\n}\n\n\n\n\n\n\nGET\n \n/api/content?type=Book\nid=1\n (\nBook\n)\n\n\n{\n\n \ndata\n:\n \n[\n\n \n{\n\n \nuuid\n:\n \n024a5797-e064-4ee0-abe3-415cb6d3ed18\n,\n\n \nid\n:\n \n1\n,\n\n \nslug\n:\n \nitem-id-024a5797-e064-4ee0-abe3-415cb6d3ed18\n,\n\n \ntimestamp\n:\n \n1493926453826\n,\n\n \nupdated\n:\n \n1493926453826\n,\n\n \ntitle\n:\n \nThe Giving Tree\n,\n\n \nauthor\n:\n \n/api/content?type=Author\nid=1\n,\n\n \npages\n:\n \n57\n,\n\n \nyear\n:\n \n1964\n\n \n}\n\n \n]\n\n\n}\n\n\n\n\n\n\nAs you can see, the \nAuthor\n is a reference as the \nauthor\n field in the JSON\nresponse for a \nBook\n. When you're building your client, you need to make a second\nrequest for the \nAuthor\n, to the URL path found in the \nauthor\n field of the \nBook\n\nresponse. \n\n\nFor example, in pseudo-code: \n\n\n# Request 1: \n\n\n$book\n \n=\n GET /api/content?type\n=\nBook\nid\n=\n1\n\n\n\n# Request 2: \n\n\n$author\n \n=\n GET \n$book\n.author \n# where author = /api/content?type=Author\nid=1\n\n\n\n\n\n\nUntil recently, this would be considered bad practice and would be costly to do\nover HTTP. However, with the wide availability of HTTP/2 clients, including all\nmodern web browsers, mobile devices, and HTTP/2 libraries in practically every \nprogramming language, this pattern is fast and scalable. \n\n\n\n\nDesigned For HTTP/2\n\n\nAt this point, you've likely noticed that you're still making two independent \nHTTP requests to your Ponzu server. Further, if there are multiple references or more\nthan one item, you'll be making many requests -- \nhow can that be efficient?\n \n\n\nThere are two main concepts at play: Request/Response Multiplexing and Server Push.\n\n\nRequest/Response Multiplexing\n\n\nWith HTTP/2, a client and server (peers) transfer data over a single TCP connection, \nand can send data back and forth at the same time. No longer does a request need\nto wait to be sent until after an expected response is read. This means that HTTP \nrequests can be sent much faster and at the \nsame time\n on a single connection. \nWhere previously, a client would open up several TCP connections, the re-use of a \nsingle connection reduces CPU overhead and makes the server more efficient.\n\n\nThis feature is automatically provided to you when using HTTP/2 - the only \nrequirement is that you connect via HTTPS and have active TLS certificates, which \nyou can get for free by running Ponzu with the \n--https\n flag and configuring it \nwith a properly set, active domain name of your own. \n\n\nServer Push\n\n\nAnother impactful feature of HTTP/2 is \"Server Push\": the ability to preemptively\nsend a response from the server to a client without waiting for a request. This\nis where Ponzu's reference design really shows it's power. Let's revisit the\nexample from above:\n\n\n# Request 1: \n\n\n$book\n \n=\n GET /api/content?type\n=\nBook\nid\n=\n1\n\n\n\n# Request 2: \n\n\n$author\n \n=\n GET \n$book\n.author \n# where author = /api/content?type=Author\nid=1\n\n\n\n\n\n\nInstead of waiting for the server to respond with the data for \n$book.author\n, \nthe response data is already in the client's cache before we even make the request!\nNow there is no round-trip made to the server and back, and the client reads the \npushed response from cache in fractions of a millisecond. \n\n\nBut, how does the server know which response to push and when? You'll need to \nspecify which fields of the type you've requested should be pushed. This is done\nby implementing the \nitem.Pushable\n interface\n. \nSee the example below which demonstrates a complete implementation on the \nBook\n\nstruct, which has a reference to an \nAuthor\n.\n\n\nExample\n\n\ncontent/book.go\n\n\n...\n\n\ntype\n \nBook\n \nstruct\n \n{\n\n \nitem\n.\nItem\n\n\n \nTitle\n \nstring\n \n`json:\ntitle\n`\n\n \nAuthor\n \nstring\n \n`json:\nauthor\n`\n\n \nPages\n \nint\n \n`json:\npages\n`\n\n \nYear\n \nint\n \n`json:\nyear\n`\n\n\n}\n\n\n\n\nfunc\n \n(\nb\n \n*\nBook\n)\n \nPush\n()\n \n[]\nstring\n \n{\n\n \nreturn\n \n[]\nstring\n{\n\n \n// the json struct tag is used to tell the server which\n\n \n// field(s) it should push - only URL paths originating\n\n \n// from your server can be pushed!\n\n \nauthor\n,\n \n \n}\n\n\n}\n\n\n...\n\n\n\n\n\n\nNow, whenever a single \nBook\n is requested, the server will preemptively push the\n\nAuthor\n referenced by the book. The response for the \nAuthor\n will \nalready be\non the client\n and will remain there until a request for the referenced \nAuthor\n \nhas been made.\n\n\n\n\nWhat else can I Push?\n\n\nOnly fields that are URL paths originating from your server can be pushed. \nThis means that you could also implement \nitem.Pushable\n on the \nAuthor\n\ntype, and return \n[]string{\"photo\"}\n to push the Author's image!\n\n\n\n\n\n\nOther Considerations\n\n\nHTTP/2 Server Push is a powerful feature, but it can be abused just like anything\nelse. To try and help mitigate potential issues, Ponzu has put some \"stop-gaps\"\nin place. Server Push is only activated on \nsingle item\n API responses, so you\nshouldn't expect to see references or files pushed from the \n/api/contents\n endpoint.\nAn exception to this is the \n/api/search\n endpoint, which only the \nfirst\n \nresult is pushed (if applicable) no matter how many items are in the response. \n\n\nYou should take advantage of HTTP/2 in Ponzu and get the most out of the system. \nWith the automatic HTTPS feature, there is no reason not to and you gain the \nadditional benefit of encrypting your traffic - which your users will appreciate!",
+ "text": "References in Ponzu allow you to create relationships between your Content types.\nPonzu uses an embedded database, rather than a more traditional relational database \nwith SQL support. This may seem unnatural since there is no native concept of\n\"foreign keys\" or \"joins\" like you may be used to. Instead, Ponzu wires up your\ndata using references, which are simply URL paths, like \n/api/content?type=Post\nid=1\n\n\nA foreign key as a URL path?! Am I crazy? No! For the purpose Ponzu serves, \nthis structure works quite well, especially given its creation was specifically \ntuned for HTTP/2 features such as \"Request/Response Multiplexing\" and \"Server Push.\" \n\n\nThere is a deeper dive into the HTTP/2 concepts \nbelow\n, but first we'll walk through\na quick tutorial on Ponzu's references. \n\n\nTo generate references from the CLI, please \nread through the documentation\n. \nThe example below assumes you understand the syntax. \n\n\n\n\nCreate Your Content Types\n\n\nHere we are creating two Content types, \nAuthor\n and \nBook\n. A \nBook\n will keep\na reference to an \nAuthor\n in the sense that an author wrote the book.\n\n\n$ ponzu gen c author name:string photo:string:file bio:string:textarea\n$ ponzu gen c book title:string author:@author,name pages:int year:int\n\n\n\n\n\nThe structs generated for each look like:\n\n\ncontent/author.go\n\n\ntype\n \nAuthor\n \nstruct\n \n{\n\n \nitem\n.\nItem\n\n\n \nName\n \nstring\n \n`json:\nname\n`\n\n \nPhoto\n \nstring\n \n`json:\nphoto\n`\n\n \nBio\n \nstring\n \n`json:\nbio\n`\n\n\n}\n\n\n\n\n\n\ncontent/book.go\n\n\ntype\n \nBook\n \nstruct\n \n{\n\n \nitem\n.\nItem\n\n\n \nTitle\n \nstring\n \n`json:\ntitle\n`\n\n \nAuthor\n \nstring\n \n`json:\nauthor\n`\n\n \nPages\n \nint\n \n`json:\npages\n`\n\n \nYear\n \nint\n \n`json:\nyear\n`\n\n\n}\n\n\n\n\n\n\nNotice how the \nAuthor\n field within the \nBook\n struct is a \nstring\n type, not\nan \nAuthor\n type. This is because the \nAuthor\n is stored as a \nstring\n in our\ndatabase, as a reference to the \nAuthor\n, instead of embedding the \nAuthor\n data \ninside the \nBook\n. \n\n\nSome example JSON data for the two structs looks like:\n\n\nGET\n \n/api/content?type=Author\nid=1\n (\nAuthor\n)\n\n\n{\n\n \ndata\n:\n \n[\n\n \n{\n\n \nuuid\n:\n \n024a5797-e064-4ee0-abe3-415cb6d3ed18\n,\n\n \nid\n:\n \n1\n,\n\n \nslug\n:\n \nitem-id-024a5797-e064-4ee0-abe3-415cb6d3ed18\n,\n\n \ntimestamp\n:\n \n1493926453826\n,\n\n \nupdated\n:\n \n1493926453826\n,\n\n \nname\n:\n \nShel Silverstein\n,\n\n \nphoto\n:\n \n/api/uploads/2017/05/shel-silverstein.jpg\n,\n\n \nbio\n:\n \nSheldon Allan Silverstein was an American poet...\n\n \n}\n\n \n]\n\n\n}\n\n\n\n\n\n\nGET\n \n/api/content?type=Book\nid=1\n (\nBook\n)\n\n\n{\n\n \ndata\n:\n \n[\n\n \n{\n\n \nuuid\n:\n \n024a5797-e064-4ee0-abe3-415cb6d3ed18\n,\n\n \nid\n:\n \n1\n,\n\n \nslug\n:\n \nitem-id-024a5797-e064-4ee0-abe3-415cb6d3ed18\n,\n\n \ntimestamp\n:\n \n1493926453826\n,\n\n \nupdated\n:\n \n1493926453826\n,\n\n \ntitle\n:\n \nThe Giving Tree\n,\n\n \nauthor\n:\n \n/api/content?type=Author\nid=1\n,\n\n \npages\n:\n \n57\n,\n\n \nyear\n:\n \n1964\n\n \n}\n\n \n]\n\n\n}\n\n\n\n\n\n\nAs you can see, the \nAuthor\n is a reference as the \nauthor\n field in the JSON\nresponse for a \nBook\n. When you're building your client, you need to make a second\nrequest for the \nAuthor\n, to the URL path found in the \nauthor\n field of the \nBook\n\nresponse. \n\n\nFor example, in pseudo-code: \n\n\n# Request 1: \n\n\n$book\n \n=\n GET /api/content?type\n=\nBook\nid\n=\n1\n\n\n\n# Request 2: \n\n\n$author\n \n=\n GET \n$book\n.author \n# where author = /api/content?type=Author\nid=1\n\n\n\n\n\n\nUntil recently, this would be considered bad practice and would be costly to do\nover HTTP. However, with the wide availability of HTTP/2 clients, including all\nmodern web browsers, mobile devices, and HTTP/2 libraries in practically every \nprogramming language, this pattern is fast and scalable. \n\n\n\n\nDesigned For HTTP/2\n\n\nAt this point, you've likely noticed that you're still making two independent \nHTTP requests to your Ponzu server. Further, if there are multiple references or more\nthan one item, you'll be making many requests -- \nhow can that be efficient?\n \n\n\nThere are two main concepts at play: Request/Response Multiplexing and Server Push.\n\n\nRequest/Response Multiplexing\n\n\nWith HTTP/2, a client and server (peers) transfer data over a single TCP connection, \nand can send data back and forth at the same time. No longer does a request need\nto wait to be sent until after an expected response is read. This means that HTTP \nrequests can be sent much faster and at the \nsame time\n on a single connection. \nWhere previously, a client would open up several TCP connections, the re-use of a \nsingle connection reduces CPU overhead and makes the server more efficient.\n\n\nThis feature is automatically provided to you when using HTTP/2 - the only \nrequirement is that you connect via HTTPS and have active TLS certificates, which \nyou can get for free by running Ponzu with the \n--https\n flag and configuring it \nwith a properly set, active domain name of your own. \n\n\nServer Push\n\n\nAnother impactful feature of HTTP/2 is \"Server Push\": the ability to preemptively\nsend a response from the server to a client without waiting for a request. This\nis where Ponzu's reference design really shows it's power. Let's revisit the\nexample from above:\n\n\n# Request 1: \n\n\n$book\n \n=\n GET /api/content?type\n=\nBook\nid\n=\n1\n\n\n\n# Request 2: \n\n\n$author\n \n=\n GET \n$book\n.author \n# where author = /api/content?type=Author\nid=1\n\n\n\n\n\n\nInstead of waiting for the server to respond with the data for \n$book.author\n, \nthe response data is already in the client's cache before we even make the request!\nNow there is no round-trip made to the server and back, and the client reads the \npushed response from cache in fractions of a millisecond. \n\n\nBut, how does the server know which response to push and when? You'll need to \nspecify which fields of the type you've requested should be pushed. This is done\nby implementing the \nitem.Pushable\n interface\n. \nSee the example below which demonstrates a complete implementation on the \nBook\n\nstruct, which has a reference to an \nAuthor\n.\n\n\nExample\n\n\ncontent/book.go\n\n\n...\n\n\ntype\n \nBook\n \nstruct\n \n{\n\n \nitem\n.\nItem\n\n\n \nTitle\n \nstring\n \n`json:\ntitle\n`\n\n \nAuthor\n \nstring\n \n`json:\nauthor\n`\n\n \nPages\n \nint\n \n`json:\npages\n`\n\n \nYear\n \nint\n \n`json:\nyear\n`\n\n\n}\n\n\n\n\nfunc\n \n(\nb\n \n*\nBook\n)\n \nPush\n(\nres\n \nhttp\n.\nResponseWriter\n,\n \nreq\n \n*\nhttp\n.\nRequest\n)\n \n([]\nstring\n,\n \nerror\n)\n \n{\n\n \nreturn\n \n[]\nstring\n{\n\n \n// the json struct tag is used to tell the server which\n\n \n// field(s) it should push - only URL paths originating\n\n \n// from your server can be pushed!\n\n \nauthor\n,\n \n \n},\n \nnil\n\n\n}\n\n\n...\n\n\n\n\n\n\nNow, whenever a single \nBook\n is requested, the server will preemptively push the\n\nAuthor\n referenced by the book. The response for the \nAuthor\n will \nalready be\non the client\n and will remain there until a request for the referenced \nAuthor\n \nhas been made.\n\n\n\n\nWhat else can I Push?\n\n\nOnly fields that are URL paths originating from your server can be pushed. \nThis means that you could also implement \nitem.Pushable\n on the \nAuthor\n\ntype, and return \n[]string{\"photo\"}, nil\n to push the Author's image!\n\n\n\n\n\n\nOther Considerations\n\n\nHTTP/2 Server Push is a powerful feature, but it can be abused just like anything\nelse. To try and help mitigate potential issues, Ponzu has put some \"stop-gaps\"\nin place. Server Push is only activated on \nsingle item\n API responses, so you\nshouldn't expect to see references or files pushed from the \n/api/contents\n endpoint.\nAn exception to this is the \n/api/search\n endpoint, which only the \nfirst\n \nresult is pushed (if applicable) no matter how many items are in the response. \n\n\nYou should take advantage of HTTP/2 in Ponzu and get the most out of the system. \nWith the automatic HTTPS feature, there is no reason not to and you gain the \nadditional benefit of encrypting your traffic - which your users will appreciate!",
"title": "Overview"
},
{
@@ -987,7 +987,7 @@
},
{
"location": "/References/Overview/#example",
- "text": "content/book.go ... type Book struct { \n item . Item \n\n Title string `json: title ` \n Author string `json: author ` \n Pages int `json: pages ` \n Year int `json: year ` } func ( b * Book ) Push () [] string { \n return [] string { \n // the json struct tag is used to tell the server which \n // field(s) it should push - only URL paths originating \n // from your server can be pushed! \n author , \n } } ... Now, whenever a single Book is requested, the server will preemptively push the Author referenced by the book. The response for the Author will already be\non the client and will remain there until a request for the referenced Author \nhas been made. What else can I Push? Only fields that are URL paths originating from your server can be pushed. \nThis means that you could also implement item.Pushable on the Author \ntype, and return []string{\"photo\"} to push the Author's image!",
+ "text": "content/book.go ... type Book struct { \n item . Item \n\n Title string `json: title ` \n Author string `json: author ` \n Pages int `json: pages ` \n Year int `json: year ` } func ( b * Book ) Push ( res http . ResponseWriter , req * http . Request ) ([] string , error ) { \n return [] string { \n // the json struct tag is used to tell the server which \n // field(s) it should push - only URL paths originating \n // from your server can be pushed! \n author , \n }, nil } ... Now, whenever a single Book is requested, the server will preemptively push the Author referenced by the book. The response for the Author will already be\non the client and will remain there until a request for the referenced Author \nhas been made. What else can I Push? Only fields that are URL paths originating from your server can be pushed. \nThis means that you could also implement item.Pushable on the Author \ntype, and return []string{\"photo\"}, nil to push the Author's image!",
"title": "Example"
},
{
diff --git a/docs/build/sitemap.xml b/docs/build/sitemap.xml
index a7ca32c..fe5a0a7 100644
--- a/docs/build/sitemap.xml
+++ b/docs/build/sitemap.xml
@@ -4,7 +4,7 @@
<url>
<loc>/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -13,13 +13,13 @@
<url>
<loc>/CLI/General-Usage/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/CLI/Generating-References/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -29,13 +29,13 @@
<url>
<loc>/Content/An-Overview/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/Content/Extending-Content/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -45,7 +45,7 @@
<url>
<loc>/Form-Fields/HTML-Inputs/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -55,19 +55,19 @@
<url>
<loc>/HTTP-APIs/Content/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/HTTP-APIs/File-Metadata/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/HTTP-APIs/Search/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -77,31 +77,31 @@
<url>
<loc>/Interfaces/API/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/Interfaces/Editor/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/Interfaces/Format/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/Interfaces/Item/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/Interfaces/Search/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -111,13 +111,13 @@
<url>
<loc>/Ponzu-Addons/Creating-Addons/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/Ponzu-Addons/Using-Addons/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -127,7 +127,7 @@
<url>
<loc>/Quickstart/Overview/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -137,7 +137,7 @@
<url>
<loc>/References/Overview/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -147,7 +147,7 @@
<url>
<loc>/Running-Backups/Backups/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -157,7 +157,7 @@
<url>
<loc>/System-Configuration/Settings/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -167,13 +167,13 @@
<url>
<loc>/System-Deployment/Docker/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/System-Deployment/SysV-Style/</loc>
- <lastmod>2017-08-15</lastmod>
+ <lastmod>2017-09-01</lastmod>
<changefreq>daily</changefreq>
</url>
diff --git a/docs/src/References/Overview.md b/docs/src/References/Overview.md
index 8f5e40e..cdbc541 100644
--- a/docs/src/References/Overview.md
+++ b/docs/src/References/Overview.md
@@ -181,13 +181,13 @@ type Book struct {
}
-func (b *Book) Push() []string {
+func (b *Book) Push(res http.ResponseWriter, req *http.Request) ([]string, error) {
return []string{
// the json struct tag is used to tell the server which
// field(s) it should push - only URL paths originating
// from your server can be pushed!
"author",
- }
+ }, nil
}
...
```
@@ -200,7 +200,7 @@ has been made.
!!! note "What else can I Push?"
Only fields that are URL paths originating from your server can be pushed.
This means that you could also implement `item.Pushable` on the `Author`
- type, and return `[]string{"photo"}` to push the Author's image!
+ type, and return `[]string{"photo"}, nil` to push the Author's image!
---