1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-28 21:08:39 +02:00
Commit Graph

231 Commits

Author SHA1 Message Date
Vishal Rana
ac0a38d995 Fixed Context#RealIP() to fetch the first IP
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-04-20 12:05:09 -07:00
Vishal Rana
d5bff83dc3 Using *context instead of Context in Router#Find()
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-04-10 13:10:31 -07:00
Ole Bulbuk
f0e3f950cf Tested and fixed bug with reused context (path parameters). 2017-03-30 12:05:24 +02:00
Vishal Rana
22012e0e9d Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-03-26 20:15:48 -07:00
Vishal Rana
477d8dc708 Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-03-15 11:38:43 -07:00
Vishal Rana
c7c4395fbd Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-31 13:55:39 -08:00
Vishal Rana
54fb1015c1 Pretty print in debug mode
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-04 12:00:49 -08:00
Ted Kornish
eb7ebca112 Correct comment for Context.Response () 2017-01-01 22:02:14 -08:00
Vishal Rana
294601a6ba docs: add guide/response
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-13 20:26:25 -08:00
Vishal Rana
01334bc7b2 enabled validator, updated docs, fixed , fixed , fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-12 17:19:41 -08:00
Vishal Rana
20954afd66 fixed json, xml pretty print
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-09 11:13:55 -08:00
Vishal Rana
133f7acf21 fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-09 10:24:14 -08:00
Vishal Rana
1f0bae394a Gannett digital master allow html buffers ()
* Since some templating engines final result is a buffer, we've been casting them to strings, which is a bit unnecessary considering under the hood Echo supports this.

* Since some templating engines final result is a buffer, we've been casting them to strings, which is a bit unnecessary considering under the hood Echo supports this.

* Update context.go

* Update context_test.go

* Update context_test.go

* Utilize same design pattern for HTMLBlob as JSONBlob

* Streamlined a few more methods

* more  consistent

Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-06 18:57:06 -08:00
Vishal Rana
fd9508ca39 param alias, context#param
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-17 18:42:00 -08:00
Vishal Rana
8aa0e56e50 cleaner Context#Param
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-17 08:00:30 -08:00
Vishal Rana
c5a3575d4c updated migration guide
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-14 22:54:09 -08:00
Vishal Rana
7bd314557b fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-27 07:35:41 -07:00
Vishal Rana
a739d9a0d9 - Removed Context#ServeContent
- Refactored Context#Attachment, Context#Inline,
  Context#ContentTypeByExtension

Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-25 14:53:47 -07:00
Vishal Rana
2fbaf3a363 minor refactor,
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-25 08:08:46 -07:00
Vishal Rana
51723e4c7c removed websocket api
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-20 18:25:40 -07:00
Vishal Rana
d72b8b8b64 fixed docs
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-20 09:10:10 -07:00
Vishal Rana
60ce130499 generic map Map
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-13 16:45:27 -07:00
Vishal Rana
8623669cbc removed Context#P()
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-10 18:22:13 -07:00
Vishal Rana
15eb5b0aad removed embedded context and exposed SetRequest in context
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-10-10 17:31:26 -07:00
Vishal Rana
0349e883f5 Moved logger to root
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-25 13:14:18 -07:00
Vishal Rana
7f60fcda63 WebSocket API
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-23 05:55:27 -07:00
Vishal Rana
2aec0353f5 First commit to v3,
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-22 22:56:00 -07:00
Vishal Rana
03efe4d61b Closes , closes , closes ()
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-09 15:30:46 -07:00
Vishal Rana
00699ed0db Renamed Context#Context => Context#StdContext & Context#SetContext to ContextSetStdContext, 2d772e02ca
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-09 11:47:43 -07:00
Vishal Rana
2d772e02ca Updated deps, removed Context#Context()
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-09-08 14:54:07 -07:00
Francisco Guimarães
8a85626a71 Inline feature () 2016-08-22 14:46:21 -07:00
Vishal Rana
85e2816cf3 Minor formatting/changes
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-08-22 08:30:46 -07:00
Kazuhiro Kubota
48c42e7b90 Fix Context#SetContext()/Context#Context() 2016-08-22 20:42:25 +09:00
Vishal Rana
ad8f0dd012 Closes ,
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-08-19 14:07:07 -07:00
Vishal Rana
eb48e7de60 Revert "fixed "
This reverts commit 69e8c1e717.
2016-07-27 09:11:34 -07:00
Vishal Rana
69e8c1e717 fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-07-26 09:58:21 -07:00
Vishal Rana
451b2ccc9f Exposed error handlers
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-07-05 08:43:46 -07:00
Vishal Rana
a0bc02815f Fixed 2016-06-06 16:56:09 -07:00
Vishal Rana
4e98fa9664 Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-06-06 09:47:22 -07:00
Vishal Rana
d0ed5830c4 Test coverage for cookie.go and context.go
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-06-05 22:25:34 -07:00
Vishal Rana
09a2ce60a6 About context
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-06-05 13:47:59 -07:00
Vishal Rana
a98843b6e5 Logger as interface, fixed , fixed , fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-31 18:29:11 -07:00
Vishal Rana
702e6d0967 Closes , closes
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-22 07:58:21 -07:00
Vishal Rana
682a5580b7 Deprecated Echo#GetContext() => Echo#AcquireContext(), Echo#PutContext() => Echo#ReleaseContext()
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-03 17:23:31 -07:00
Vishal Rana
f0526349ff Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-05-02 22:41:07 -07:00
Vishal Rana
190cf80d02 Fixed , Fixed .
Signed-off-by: Vishal Rana <vishal.rana@verizon.com>
2016-05-02 16:19:35 -07:00
Vishal Rana
be825e0229 Refactored variable names
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-24 10:22:15 -07:00
Anon-Penguin
ea123198e4 Add Exists() method
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-24 08:02:12 -07:00
Vishal Rana
1e04986e53 Var args for Context#SetParamNames and Context#SetParamValues.
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-17 09:41:20 -07:00
Vishal Rana
467cf05b41 Changes based on comments for
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-16 15:56:09 -07:00
Vishal Rana
fd104333f2 Fixed , Closes
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-16 09:15:37 -07:00
Vishal Rana
609587e6eb Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-11 16:49:20 -07:00
Vishal Rana
130c548826 Closes , .
- Static back as middleware

Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-10 20:56:10 -07:00
Vishal Rana
33700bfcc2 Fixed
- Dropped static middleware in favor of Echo#Static & Echo#StaticConfig.
- Enhanced middleware chaining.

Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-09 14:00:23 -07:00
Vishal Rana
8b5772cf65 Proper header and MIME constants
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-06 07:29:47 -07:00
Vishal Rana
bcbd9a0f42 Updated README.md
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-04 20:10:19 -07:00
Vishal Rana
b5d6c05101 Fixed ,
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-04-02 14:24:51 -07:00
Vishal Rana
55e3dba946 ReadSeeker instead of Reader to future usage
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-29 16:17:36 -07:00
Vishal Rana
70bf482381 Don't need http.Dir in Context#File'
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-29 15:26:25 -07:00
Vishal Rana
28ec39daaa Context#StaticContent signature changed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-27 21:03:35 -07:00
Vishal Rana
a2d757eddc Closes
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-27 16:29:41 -07:00
Vishal Rana
7741bd0125 Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-23 11:10:22 -05:00
Vishal Rana
a66162a3d2 Logging middleware fixes
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-21 17:27:14 -07:00
Vishal Rana
703174e58f Context#Form() > Context#FormValue(), Context#Query() > Context#QueryParam()
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-21 13:10:20 -07:00
Vishal Rana
c4caeb8ffb more godoc
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-19 15:47:20 -07:00
Vishal Rana
e16b929900 Middleware fix
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-16 08:24:25 -07:00
Vishal Rana
030a9a4ad1 , just fixed fasthttp response writer
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-15 15:55:46 -07:00
Vishal Rana
b10c93cd17 Fixed & Godoc
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-14 20:03:20 -07:00
Vishal Rana
0465314380 Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-14 12:21:47 -07:00
Vishal Rana
abc669bd07 Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-14 08:18:02 -07:00
Vishal Rana
7942e4a77b Engine#Multipart,#FormFile. Closes .
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-12 18:32:36 -08:00
Vishal Rana
ac25928fd0 Closes
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-12 11:49:45 -08:00
Vishal Rana
5b5df5bf44 Last-Modified header for static content
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-12 10:18:40 -08:00
Vishal Rana
a7697fe480 Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-12 09:30:05 -08:00
Vishal Rana
082814c776 Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-12 05:14:15 -08:00
Vishal Rana
25e72d623e Fixed recover and gzip middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-10 16:35:20 -08:00
Vishal Rana
8ee864ae08 Dropped Engine**#Object functions
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-10 12:05:33 -08:00
Vishal Rana
296498c942 Fixed nested groups, reset Context#handler
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-08 19:31:11 -08:00
Vishal Rana
f4a5abc8b2 Removed Context#Socket
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-08 08:14:25 -08:00
Vishal Rana
e1d789ecbb Logger as not an interface
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-06 09:52:32 -08:00
Vishal Rana
a9c88cad63 Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-03-05 20:03:11 -08:00
Vishal Rana
c19442d023 Sync pool for fasthttp
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-21 19:58:19 -08:00
Vishal Rana
c8725ae244 Context#Redirect
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-20 12:54:43 -08:00
Vishal Rana
91ae93ebfc Removed HTTP2 option
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-18 14:04:28 -08:00
Vishal Rana
51acf465fe - Moved static file serving to a new handler package
- Middleware at route level
- Group middleware is a in closure now

Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-15 08:11:29 -08:00
Vishal Rana
6bb871fe3a Dropped json and xml indent, added jsonblob.
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-10 16:51:43 -08:00
Vishal Rana
94e5936287 Fixed test cases
Signed-off-by: Vishal Rana <vishal.rana@verizon.com>
2016-02-09 19:07:04 -08:00
Vishal Rana
8444488a2b Fixed package dependencies
Signed-off-by: Vishal Rana <vishal.rana@verizon.com>
2016-02-09 13:37:38 -08:00
Vishal Rana
0731959a98 Object method to get real object
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-08 16:48:03 -08:00
Vishal Rana
f27de9a804 Fixed logging
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-04 19:29:49 -08:00
Vishal Rana
f405794a7c Now using sync.Pool
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-02-04 14:40:08 -08:00
Vishal Rana
688293b5ed v2 is compiling now
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-01-28 23:46:11 -08:00
Vishal Rana
33d8813eb5 Revert "Revert "Fixed Request.Out""
This reverts commit 72050d765b.
2015-12-21 15:20:49 -08:00
Vishal Rana
72050d765b Revert "Fixed Request.Out"
This reverts commit cced590a16.
2015-12-21 15:18:53 -08:00
Vishal Rana
cced590a16 Fixed Request.Out
Signed-off-by: Vishal Rana <vishal.rana@verizon.com>
2015-12-21 15:18:03 -08:00
Vishal Rana
0884290766 Added X() method to return context
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-12-04 08:13:26 -08:00
Vishal Rana
72459fe299 Step towards v2
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-12-03 17:23:53 -08:00
Vishal Rana
2483d2a140 Reset Echo in Response#reset()
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-12-02 08:07:22 -08:00
Vishal Rana
9650c39055 Bumped to v1.3
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-12-01 15:06:18 -08:00
Vishal Rana
f54cdd86d0 Removed prinftf from Context#String and Context#HTML,
Signed-off-by: Vishal Rana <vr@labstack.com>
2015-11-24 20:08:36 -08:00