Commit Graph

690 Commits

Author SHA1 Message Date
Héctor Hurtado
120028f273 Installation section redone 2019-11-22 12:47:25 +01:00
cr0hn
105220b864 fix table 2019-11-22 12:34:39 +01:00
cr0hn
90938006a9 fixed filename: rst -> md 2019-11-22 12:31:57 +01:00
cr0hn
1bc8a88ea5 Merge remote-tracking branch 'origin/master' 2019-11-22 12:31:23 +01:00
cr0hn
5ded78988f checking if markdown with images works 2019-11-22 12:31:15 +01:00
Roberto Abdelkader Martínez Pérez
27dc56344f Missing phrase in resource_three.rst 2019-11-22 12:21:52 +01:00
cr0hn
b30886221c Merge remote-tracking branch 'origin/master' 2019-11-22 12:15:45 +01:00
cr0hn
cfbb2ef6cb Merged greet-json & upload examples 2019-11-22 12:15:33 +01:00
pancho horrillo
26145cba79 doc: updates to route_matching section
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2019-11-22 12:13:25 +01:00
Roberto Abdelkader Martínez Pérez
b522d9d847 Add additional information to title to better distinguish verbatim text. 2019-11-22 12:05:16 +01:00
pancho horrillo
f9867fb269 doc: add sections on theory/{routes,route_matching}
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2019-11-22 12:04:49 +01:00
cr0hn
4c2ff45a84 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	docs/source/examples/index.rst
2019-11-22 12:00:02 +01:00
cr0hn
d52137bce8 typos & new examples 2019-11-22 11:59:21 +01:00
Roberto Abdelkader Martínez Pérez
9aad5aa70f Fix style in Request Life Cycle section.
Co-authored-by: pancho horrillo <pedrofelipe.horrillo@bbva.com>
2019-11-22 09:32:26 +01:00
pancho horrillo
8474f31747 doc: update request_life_cycle.rst 2019-11-22 09:20:29 +01:00
pancho horrillo
24cc530a0e doc: add missing quotes in example
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2019-11-21 13:12:19 +01:00
pancho horrillo
8f876ba7db doc: fix a couple of typos and drop spurious whitespace 2019-11-21 10:36:46 +01:00
Roberto Abdelkader Martínez Pérez
f96c4a1eb2 Remove white background 2019-11-21 09:28:10 +01:00
Roberto Abdelkader Martínez Pérez
2f72dca771 Trying to convince readthedocs to use index.rst as the main page 2019-11-21 09:21:56 +01:00
Roberto Abdelkader Martínez Pérez
7e7c536e78 Testing documentation redering 2019-11-21 08:53:28 +01:00
Roberto Abdelkader Martínez Pérez
d7e4e5b7b7 Update request_life_cycle.rst 2019-11-20 18:34:06 +01:00
Roberto Abdelkader Martínez Pérez
46db89f2ae Remove unnecessary information from the diagram
Co-authored-by: pancho horrillo <pedrofelipe.horrillo@bbva.com>
2019-11-20 18:33:37 +01:00
Roberto Abdelkader Martínez Pérez
342d9f4a92 Update request_life_cycle.rst 2019-11-20 18:27:17 +01:00
Roberto Abdelkader Martínez Pérez
7ba66b2667 Request life cycle diagram
Co-authored-by: pancho horrillo <pedrofelipe.horrillo@bbva.com>
2019-11-20 18:22:24 +01:00
pancho horrillo
ae0c8b58a1 Misc doc updates
Co-Authored-By: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2019-11-20 16:37:00 +01:00
Héctor Hurtado
a65eb102b2 Fix variable name in spawn function. Added working with json, upload examples and install&configuration documentation 2019-11-20 16:33:18 +01:00
pancho horrillo
25d9f1c1ef Delete placeholder 2019-11-20 16:16:32 +01:00
cr0hn
bd7cf16f0c Merge remote-tracking branch 'origin/master' 2019-11-20 15:18:09 +01:00
cr0hn
c6c0dd7c48 add 2 more examples 2019-11-20 15:18:00 +01:00
pancho horrillo
e5e8da551e docs/philosophy.rst: style fixes 2019-11-20 14:30:28 +01:00
Roberto Abdelkader Martínez Pérez
2da8f7abd1 Philosophy WIP 2019-11-20 14:18:21 +01:00
Roberto Abdelkader Martínez Pérez
63639eeaa9 More details about the request life cycle 2019-11-20 13:52:45 +01:00
Roberto Abdelkader Martínez Pérez
ad1d0e8b07 Denoting the samples more clearly 2019-11-20 13:45:42 +01:00
Roberto Abdelkader Martínez Pérez
664ddbc641 Resource tree documentation cleanup 2019-11-20 13:43:21 +01:00
Roberto Abdelkader Martínez Pérez
b7efb3f109 Documentation typos and improvements. Thanks Noel! 2019-11-20 13:37:20 +01:00
Roberto Abdelkader Martínez Pérez
c2a62814b5 Resource tree documentation. 2019-11-20 13:25:15 +01:00
cr0hn
f11eea0177 Merge remote-tracking branch 'origin/master' 2019-11-20 12:56:51 +01:00
cr0hn
0de07c1132 new examples 2019-11-20 12:56:41 +01:00
pancho horrillo
5ee8353cba WIP on docs/theory
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2019-11-20 12:54:29 +01:00
Roberto Abdelkader Martínez Pérez
850baf95f7 Fix example redirecting_a_url. PEBKAC 2019-11-20 11:33:56 +01:00
Roberto Abdelkader Martínez Pérez
4c3fe37616 Theory documentation scaffolding 2019-11-20 11:22:42 +01:00
pancho horrillo
206aac5747 Rename package srverrors to httperror
- Package names are preferred to be in singular form¹.
- Since errors are just for HTTP and not generic, I changed the base name to
'http'.
- I didn't name it simply 'error', because it would then conflict with the
- standard 'error' interface.

¹: https://rakyll.org/style-packages/
2019-11-20 07:54:45 +01:00
pancho horrillo
0d66fe9963 Rename WriteErrorResponse() to simply ErrorJSON() and reorder arguments
This way we better mimic net/http.Error()

https://pkg.go.dev/net/http?tab=doc#Error
2019-11-20 07:37:35 +01:00
pancho horrillo
7ea43048bc Add missing comments 2019-11-20 07:14:00 +01:00
pancho horrillo
d81ef278da Update Makefile to make use of -trimpath build option
This option makes go build/install removes the absolute paths
within the produced executable, enabling more reproducible builds.

See ¹ for more details.

¹: https://golang.org/doc/go1.13?ref=hvper.com#go-command
2019-11-20 06:43:40 +01:00
pancho horrillo
75b0908b16 Rename GetReasonFromBody() to simply Reason()
See ¹ for the customary idiomatic way of naming getters in Go.

¹: https://golang.org/doc/effective_go.html#Getters
2019-11-20 05:04:10 +01:00
pancho horrillo
3a47b34bc1 Drop stale GetReason() and associated tests 2019-11-20 04:54:07 +01:00
pancho horrillo
b40f73115f Add missing comment to GetReasonFromBody() 2019-11-20 04:51:29 +01:00
pancho horrillo
b130cfdec7 Add some examples
Note that the example on redirecting a URL is BROKEN.  Possibly a bug in Kapow!
2019-11-19 21:52:10 +01:00
pancho horrillo
81c677c3be internal/http/request.go: replace GetReason() with GetReasonFromBody()
Update tests to inject the required JSON error body with reason.
2019-11-19 21:17:49 +01:00