Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/casbin/go-json-rest-examples

Examples for go-json-rest
https://github.com/casbin/go-json-rest-examples

Add Casbin AuthZ middleware example

aa15a5a24e319aec7de0652c627d180d1dd69ac3 authored about 7 years ago by Yang Luo <[email protected]>
Gorm API has changed, make the DB field a pointer.

962d7e28325106d74970628ab0d3b39231140d2c authored over 8 years ago by antoine <[email protected]>
s/http/https/ thanks readmeCritic

c7f3463e91610b30a0b48c924c8b07e4ecf2e5f2 authored almost 9 years ago by antoine <[email protected]>
s/http/https/ thanks readmeCritic

872a5d55b8140091c91536d67dbfe2c34628ccc1 authored almost 9 years ago by antoine <[email protected]>
The graceful package has a new URL and uses gopkg.in

Update the corresponding exmaple.

64db9440ce1ad290dceed0307c371b2024bc31c3 authored almost 9 years ago by antoine <[email protected]>
Happy New Year!

ec53e6fb17b0d290b0123090a0d9a2560578f46d authored almost 9 years ago by antoine <[email protected]>
Merge pull request #17 from jadengore/add-force-ssl-middleware

Add forceSSL middleware README/example

2fb03a72c7d0690d1c9f8d79d7b2d336a4cbd15a authored almost 9 years ago by Antoine Imbert <[email protected]>
Add forceSSL middleware README/example

786736e0cdf50605f76e99cc1a3b71ce7444dc1b authored almost 9 years ago by Edward Bramanti <[email protected]>
Remove unless struct

00f50dd40072bb7734d4fb98af730bf1356e53f5 authored almost 9 years ago by antoine <[email protected]>
Fix broken convertion to v3 API

Fixes #142

b19b09ad90be5c8697f3eb7b460a9421d5d9a3b3 authored over 9 years ago by antoine <[email protected]>
Merge pull request #12 from wingyplus/websocket

Websocket example

9b0fc5b94f91667ec2bdd9f149d61190d6c58786 authored over 9 years ago by Antoine Imbert <[email protected]>
Add websocket example

0474bb7d655974b98872e14d255717a88bbbccc2 authored over 9 years ago by Thanabodee Charoenpiriyakij <[email protected]>
Merge pull request #11 from ant0ine/routeShortcuts

Use the new route shortcut methods.

f6b522ab15a1831603a52406fe0ee8332c22815c authored over 9 years ago by Antoine Imbert <[email protected]>
Use the new route shortcut methods.

b55c20817849863c5dba1c68a4baeffcb54d4c3d authored over 9 years ago by antoine <[email protected]>
Merge pull request #10 from StephanDollberg/jwt

updated jwt example to use IfMiddleware

1d8eeee82468a12837b56b649da47116b434fd0a authored over 9 years ago by Antoine Imbert <[email protected]>
updated jwt example to use IfMiddleware

2a391fa3d3b6d2c6dc6356b5425e869d523918be authored over 9 years ago by Stephan Dollberg <[email protected]>
Merge pull request #8 from amosshapira/patch-1

Fix typo in refresh_token URI

af22abb60ffff22d7f75988e7304c15faa270b3f authored over 9 years ago by Antoine Imbert <[email protected]>
Fix typo in refresh_token URI

8ebf777215a5c57e4cb8ac75e8f62e29d7947c5c authored over 9 years ago by Amos Shapira <[email protected]>
Merge pull request #7 from StephanDollberg/jwt

added jwt middleware example

90964e9dafb57e25a68616226a52ec616daa8a0e authored over 9 years ago by Antoine Imbert <[email protected]>
added jwt middleware example

1f972233e13e9025e43ec51c90bde410a70e3a01 authored over 9 years ago by Stephan Dollberg <[email protected]>
Update the statsd example to use the new statsd middleware.

67567d5f4cb8aac0590dc052db7e3de0c9f47fcb authored over 9 years ago by antoine <[email protected]>
Merge pull request #6 from ant0ine/v3-alpha

markdown tweak

a36239a77805c1d2bb419a4a27cb25f4d413ac3b authored over 9 years ago by Antoine Imbert <[email protected]>
markdown tweak

0921293f58590150af54080d8799c10d2b074172 authored over 9 years ago by antoine <[email protected]>
Merge pull request #5 from ant0ine/v3-alpha

convert the examples to the v3 API

3b08057ee7b2e2e8b0c3cc2fde033fbf47b1eb8d authored over 9 years ago by Antoine Imbert <[email protected]>
this deprecated method has been removed in v3

9f41c2183d59307cc92be755b3ccdf6dd80be831 authored over 9 years ago by antoine <[email protected]>
README edits

c13dd96de2c966cb88d43d6b3a067f4dd8488c91 authored over 9 years ago by antoine <[email protected]>
rewrite the example with the last Api object change.

a0c55c97eed10605c0e9d43a9f64f447c3327d85 authored over 9 years ago by antoine <[email protected]>
Make Hello World! even simpler

60b0c2d93de4d5f5702e4005184cb02020c55aa4 authored over 9 years ago by antoine <[email protected]>
command formatting

49c924aa65c815e99e67f547608c47650e7325eb authored over 9 years ago by antoine <[email protected]>
convert more examples to v3

and delete two examples that are outdated.

efa523507c631f214f288245dfa4364cc5b70f93 authored over 9 years ago by antoine <[email protected]>
Make some examples shorter by not using a router

These examples don't require a router, instead use AppSimple

c6db771f24340a23d9a23f8c1e697e0c69b683fa authored over 9 years ago by antoine <[email protected]>
Specify the content type in the curl command line ...

... rather than removing CheckContentTypeMiddleware.
This is a better habit to make the right qu...

b2c0620a9e7c318c0492390943c1d78e42abc5d8 authored over 9 years ago by antoine <[email protected]>
Make use of the common stack

4a9e5b8400456fdb397ec1e737c47ca3d861d804 authored over 9 years ago by antoine <[email protected]>
more example convertion to v3

666f514898ab34a2efdf9227768ff35621417235 authored over 9 years ago by antoine <[email protected]>
more v3 convertion

15cd080cb02d0d9f72da70a15bbf4c34f7c1ed3a authored over 9 years ago by antoine <[email protected]>
three more examples converted to v3

dc9d3093cde9e6260151835377c98f46e0f627fa authored over 9 years ago by antoine <[email protected]>
Get all the "Basics" converted to v3

843e47ceb64d714b1e397ca6faa650e2bb73f6be authored over 9 years ago by antoine <[email protected]>
convert helloworld to the v3 api

28db180ba7c353341ec04d0beebff8a84bb1e30f authored over 9 years ago by antoine <[email protected]>
Revert "convert helloworld to the v3 api"

This reverts commit e113f6459a6e6b88fdc6b1844f0883eb8887d1a8.

b1b38a2dcfe845dafeb536db608a5907572d8520 authored over 9 years ago by antoine <[email protected]>
convert helloworld to the v3 api

e113f6459a6e6b88fdc6b1844f0883eb8887d1a8 authored over 9 years ago by antoine <[email protected]>
Happy new year!

0ed6cd441cdb1e203653421675208ac1a240fdc0 authored almost 10 years ago by antoine <[email protected]>
Try to make the examples a little be shorter

64571313152e050220dd393bf91d126c85941f89 authored almost 10 years ago by antoine <[email protected]>
Fix the GORM example

This seems to be a change in the GORM api

dbc0889146684334a5b17f8eb668630ea397158d authored almost 10 years ago by antoine <[email protected]>
Fix link for stretchr/graceful

72c1ceae397e5ea6ac7aebba54364441aa0a98ae authored almost 10 years ago by antoine <[email protected]>
New example: Graceful Shutdown

9d6e2896d9c0db5526ee7e3075aed9ce99d65fdd authored almost 10 years ago by antoine <[email protected]>
New example showing a NewRelic middleware.

c546a6981e86f2b874224f01fac926135c1c8b74 authored almost 10 years ago by antoine <[email protected]>
test

97d35a2d4092b5fc86a36b5c637004dcf9ab880a authored almost 10 years ago by antoine <[email protected]>
Add a new example for the JSONP middleware

a52299a4a2e1c132bffea14595cc1c8ac0592858 authored almost 10 years ago by antoine <[email protected]>
Replace RouteObjectMethod by method values.

737201c17d1b7e3f63d01b4061dd1e1a4c15b992 authored almost 10 years ago by antoine <[email protected]>
Remove extra logging line

56cc8ce215178f8b962fc00781230e364cc01a94 authored about 10 years ago by antoine <[email protected]>
New example to demo OuterMiddlewares

aa44ef0ac92f46353a3fff5943124df0c761c59e authored about 10 years ago by antoine <[email protected]>
New example to demo API versioning

8f2be8aa37d895737ada1bb856ead86760531531 authored about 10 years ago by antoine <[email protected]>
Fix missing Unlock in case of JSON encoding error

19679fe6f1ba596e42ada1323e0266fd37518c01 authored about 10 years ago by antoine <[email protected]>
Merge pull request #3 from siavashg/master

Release lock of users on invalid PUT

68dd30742dfc8d4c87babfb13056b45185f0360f authored about 10 years ago by Antoine Imbert <[email protected]>
Release lock of users on invalid PUT

b46ebaced8f251c50147b66b1c7fe7b2e706228e authored about 10 years ago by Siavash Ghorbani <[email protected]>
New example to demo the #paramName placeholder

c123f1005ee3a0a9bc85096be40ab9eec62d5929 authored over 10 years ago by antoine <[email protected]>
Add proper error handling on SetRoutes and Listen.

Some examples had this, but not all. Fixed.

c44f5729ea40d80f049b9600c3be056a6ab87250 authored over 10 years ago by antoine <[email protected]>
For to apply this version 2 change. #fix

6d5b0a0bb53518d199521a27143d2b964f6d7cc5 authored over 10 years ago by antoine <[email protected]>
markdown tweaks

ebfcc752fb6141df5dfd73b7d4e4c17bf9db373f authored over 10 years ago by antoine <[email protected]>
markdown tweak

a0b934f2ae761736d80e1f8abcde2d3b8a90d85c authored over 10 years ago by antoine <[email protected]>
Move the remaining examples to the new format

d04b51638f813f2984a666cdaee214a6c49be356 authored over 10 years ago by antoine <[email protected]>
Convert the examples to the new format

ed6e7eaf695594b17b3838281f0b8a3a24f3f81d authored over 10 years ago by antoine <[email protected]>
convert more examples to the new doc format

c63c80ebf9887044ad098c2be22f3363653786ff authored over 10 years ago by antoine <[email protected]>
Convert Contries to the new doc format

93ca620807985771c86047c53b5e1c707944f4b6 authored over 10 years ago by antoine <[email protected]>
Use w.WriteHeader(200) for DELETE implementations.

We want an empty payload but we all the standard headers

3b86c7bb453f75401bc86bec61f366398235030a authored over 10 years ago by antoine <[email protected]>
Copy the data while we have the read lock. (users example)

Instead of copying a pointer to it.

81ea5fc2b6521e2a93084387c73427004aabab5e authored over 10 years ago by antoine <[email protected]>
Copy the data while we have the read lock.

Instead of copying a pointer to it.

47e2f2d73f3f35879634a4a47e4d760b856960cb authored over 10 years ago by antoine <[email protected]>
Convert the users example to the new documentation format

fa9fdec795e5d32fdfacdb7173fcf677525d42f3 authored over 10 years ago by antoine <[email protected]>
Replace the docstring by the README.md

A new tool will assemble all that in the go-json-rest/README.md

cd94f31602bb6a3167aa9f89073bc35bc95c0f98 authored over 10 years ago by antoine <[email protected]>
Try to have README files for examples

382e4325a395079681cd8d8e5f6c25f698f025de authored over 10 years ago by antoine <[email protected]>
New example to demo non-JSON payloads

88f90b27d06ceba07bd12bf03fcbafe99fcc04f5 authored over 10 years ago by antoine <[email protected]>
Don't use "self" as a receiver (golint)

821744e1f7be133b2a47fe0d12418e5338e919cd authored over 10 years ago by antoine <[email protected]>
Fix name in the GAE example

763a34249a85827668b23d6b62e9cd63fec3796f authored over 10 years ago by antoine <[email protected]>
Add a sync.RWMutex around the store map.

Map are not safe for concurrent use without locking.

50f81980dd2a607bf9cf9f2e23bd565d922203bc authored over 10 years ago by antoine <[email protected]>
go fmt

8c33f62c7b958196615f0fe409cb3ab290dc39dd authored over 10 years ago by antoine <[email protected]>
Add a sync.RWMutex around the store map.

Map are not safe for concurrent use without locking.

6983fcd536a4f20afb06b6c9faa11385a43c185f authored over 10 years ago by antoine <[email protected]>
Use a simpler example to demo GAE

50c9c30e95b987c5151e13e0b823967d320d45c0 authored over 10 years ago by antoine <[email protected]>
Allowing the Origin header is necessary for Safari.

Safari by default sets:
Access-Control-Request-Headers: accept, origin

While Chrome and Firefox...

4c6c9ce9c0b987e759244400efb5d31918f73501 authored over 10 years ago by antoine <[email protected]>
New example to show how to combine the ResourceHandler ...

... with other http.Handlers

a54d9d4c166a1aa71a2bd7be3a5de6c195f8b5c9 authored over 10 years ago by antoine <[email protected]>
Fix the branch name in the GA url

a574a38322bf17ca159ccb87c5c7d3ba1f3be365 authored over 10 years ago by antoine <[email protected]>
Merge branch 'v2-alpha'

0cda546d0bbeb725d08f3b98352714f202782c25 authored over 10 years ago by antoine <[email protected]>
Remove the v2 teaser

d9638a209a5bd4ea9c459000564ef874fd0ed202 authored over 10 years ago by antoine <[email protected]>
Try to fix the pygment indentation

91bb3ed664d9005964aa977c2b7e67df33d593b6 authored over 10 years ago by antoine <[email protected]>
using pointers to Route

15a41b438ec121fea207c07eaad4cd7203220f45 authored over 10 years ago by antoine <[email protected]>
docstring tweaks

740c09dae078b14cee35513ae924c00f47142f37 authored over 10 years ago by antoine <[email protected]>
Second pass on the docstring rewrite

dd7d4827996d024963856f8e3f193fa8512b5e74 authored over 10 years ago by antoine <[email protected]>
First pass on the docstring rewrite

(see the example auto-embed in the README)

b0fbac084c1006695ac19b3ea7ed5a2ed850cdfa authored over 10 years ago by antoine <[email protected]>
Remove the confusing 'simple' example

5bf5233d54a83b4958123d610121085d8da21e6a authored over 10 years ago by antoine <[email protected]>
Add the Hello World! example for the documentation

04556dbdfebcf042c2502aa7f1fa928a8c58b38a authored over 10 years ago by antoine <[email protected]>
Promote the v2

fb6319569f2401ca72d00e4c1ddc929e32ada320 authored over 10 years ago by antoine <[email protected]>
Add a simple CORS example

e566a0d861dd3c5e7b5b4a79e9a86f583545d590 authored over 10 years ago by antoine <[email protected]>
Make room for the new CORS example

f6e59dd8d655148031359f785eb3a61ae45a101e authored over 10 years ago by antoine <[email protected]>
New import path

8618823a65a1cfda911a8e6048cd9c88ad75fe5d authored over 10 years ago by antoine <[email protected]>
New example. Demonstrate how to protect the status endpoint with basic authentication

acf022cd1f86683c2dca12dcf05eaa7ba6dd8f50 authored over 10 years ago by antoine <[email protected]>
curl example of an authenticated request

071cbfcd90d584eeb49850e699a3030f0a0ad057 authored over 10 years ago by antoine <[email protected]>
Add an example that uses rest.AuthBasicMiddleware

6ab2ef9d714cd2bcdb94bc310aa03b2e9e4b201f authored over 10 years ago by antoine <[email protected]>
rename this example to make room for the simpler auth basic example

9ca23fbb9b87a3452ad263ea4dd5c16fe995429b authored over 10 years ago by antoine <[email protected]>
Update example to use the new Middleware mechanism.

a11b1da565578aef94dbfa1a66926bd0092feec7 authored over 10 years ago by antoine <[email protected]>
README

dbf87e5b6b0b6a2c5ca34b5c7740301f9b22a4b7 authored over 10 years ago by antoine <[email protected]>
Update example to use the new Middleware mechanism.

7b1ff262a1b33f03b4a30861e21c3f97deadf073 authored over 10 years ago by antoine <[email protected]>