Commit Graph

54 Commits (2eb2fa26f6ba10e3a5e7f40530720ed786c5d881)

Author SHA1 Message Date
Kevin Wan c2ff00883a
chore: update restful/grpc servers shutdown stages (#3662) 1 year ago
Kevin Wan 42e0a6f90c
chore: refactor errors to use errors.Is (#3654) 1 year ago
Kevin Wan 13cdbdc98b
chore: avoid nested WithCodeResponseWriter (#3406) 1 year ago
cong 61e562d0c7
refactor(rest): keep rest log collector context key private (#3407) 1 year ago
Kevin Wan 14caf5c799
chore: simplify tests with logtest (#3184) 2 years ago
Kevin Wan 0d5a68869d
fix: gateway conf doesn't work (#2968) 2 years ago
Kevin Wan d9d79e930d
Merge pull request from GHSA-fgxv-gw55-r5fq
* fix: Authorization Bypass Through User-Controlled Key

* chore: add not safe domain test
2 years ago
Kevin Wan ae87114282
chore: change interface{} to any (#2818)
* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
2 years ago
Kevin Wan 696da4efee
chore: add more tests (#2815)
* chore: add more tests

* chore: add more tests

* chore: add more tests

* chore: add more tests

* chore: add more tests

* chore: add more tests
2 years ago
re-dylan ef22042f4d
feat: add dev server and health (#2665)
* feat: add dev server and health

* fix: fix ci

* fix: fix comment.

* feat: add enabled

* remove no need test

* feat: mv devServer to internal

* feat: default enable pprof

Co-authored-by: dylan.wang <dylan.wang@yijinin.com>
2 years ago
Kevin Wan 05a5de7c6d
chore: fix lint errors (#2520) 2 years ago
Kevin Wan 773b59106b
chore: remove init if possible (#2485) 2 years ago
家福 f3b8fef34f
fix: type matching supports string to int (#2038)
* fix: type matching supports string to int

* feat: type matching supports string to int

Co-authored-by: 程家福 <chengjiafu@uniontech.com>
2 years ago
Zhang.Y 7da77302f4
fix: `\u003cnil\u003e` log output when http server shutdown. (#2055) 2 years ago
Kevin Wan ed1c937998
feat: convert grpc errors to http status codes (#1997)
* feat: convert grpc errors to http status codes

* chore: circuit break include unimplemented grpc error

* chore: add reference link in comments
2 years ago
Kevin Wan ac321fc146
feat: add fields with logx methods, support using third party logging libs. (#1847)
* backup

* simplify

* chore: remove unused pool

* chore: fix lint errors

* chore: use strings.Builder instead of bytes.Buffer

* test: add more tests

* chore: fix reviewdog

* test: fix data race

* feat: make logger customizable

* chore: fix reviewdog

* test: fix fails

* chore: fix set writer twice

* chore: use context instead of golang.org context

* chore: specify uint32 for level types
3 years ago
Kevin Wan 3bbc90ec24
refactor: move json related header vars to internal (#1840)
* refactor: move json related header vars to internal

* refactor: use header.ContentType
3 years ago
Kevin Wan 5c9fae7e62
feat: support sub domain for cors (#1827) 3 years ago
Kevin Wan c1d9e6a00b
feat: add httpc.Parse (#1698) 3 years ago
Kevin Wan 3b7ca86e4f
chore: add unit tests (#1615)
* test: add more tests

* test: add more tests
3 years ago
Kevin Wan 842656aa90
feat: log 404 requests with traceid (#1554) 3 years ago
Kevin Wan a91c3907a8
feat: rename module from tal-tech to zeromicro (#1413) 3 years ago
Kevin Wan cd289465fd
chore: coding style and comments (#1361)
* chore: coding style and comments

* chore: optimize `ParseJsonBody` (#1353)

* chore: optimize `ParseJsonBody`

* chore: optimize `ParseJsonBody`

* fix: fix a test

* chore: optimize `ParseJsonBody`

* fix a test

* chore: add comment

* chore: refactor

Co-authored-by: chenquan <chenquan.dev@foxmail.com>
3 years ago
charliecen d5e493383a
chose: cancel the assignment and judge later (#1359)
Co-authored-by: charliecen <chq@abierr.com>
3 years ago
Kevin Wan 3dda557410
chore: only allow cors middleware to change headers (#1276) 3 years ago
Kevin Wan c800f6f723
chore: avoid superfluous WriteHeader call errors (#1275) 3 years ago
Kevin Wan 0395ba1816
feat: add rest.WithCustomCors to let caller customize the response (#1274) 3 years ago
Kevin Wan a6c8113419
chore: refactor, better goctl message (#1228) 3 years ago
Kevin Wan 28409791fa
feat: support CORS, better implementation (#1217)
* feat: support CORS, better implementation

* chore: refine code
3 years ago
Kevin Wan c28e01fed3
feat: support CORS by using rest.WithCors(...) (#1212)
* feat: support CORS by using rest.WithCors(...)

* chore: add comments

* refactor: lowercase unexported methods

* ci: fix lint errors
3 years ago
Kevin Wan 769d06c8ab
refactor: simplify tls config in rest (#1181) 3 years ago
Howie cd1f8da13f
[update] add plugin config (#1180)
Signed-off-by: lihaowei <haoweili35@gmail.com>
3 years ago
Kevin Wan 6476da4a18
rest log with context (#998) 3 years ago
Allen Liu 3b683fd498
feat: change logger to traceLogger for getting traceId when recovering (#374) 3 years ago
Kevin Wan fc04ad7854
export pathvar for user-defined routers (#911)
* refactor

* export pathvar for user-defined routers
3 years ago
fangjianwei b812e74d6f
Fixed http listener error. (#843) 3 years ago
Kevin Wan 1a1a6f5239
add http hijack methods (#555) 4 years ago
Kevin Wan 655ae8034c
fix golint issues in rest (#529) 4 years ago
Kevin Wan 395a1db22f
add more tests for rest (#462) 4 years ago
Kevin Wan 42883d0899
fix golint issues, redis methods (#455) 4 years ago
Kevin Wan e97e1f10db
simplify code with http.Flusher type conversion (#325)
* simplify code with http.Flusher type conversion

* simplify code with http.Flusher type conversion, better version
4 years ago
jichangyun 0bd2a0656c
The ResponseWriters defined in rest.handler add Flush interface. (#318) 4 years ago
kevin 3806e66cf1 simplify http server starter 4 years ago
kevin bd430baf52 graceful shutdown refined 4 years ago
kevin c9ec22d5f4 add https listen and serve 4 years ago
kevin 4c9315e984 add more tests 4 years ago
kevin 86d3de4c89 use package level defined contextKey as context key 4 years ago
kevin 80d55dbc02 export httpx.GetRemoteAddr 4 years ago
kevin b541403ce2 export router 4 years ago
kevin a7c02414f3 export token parser for refresh token service 4 years ago