xdrm-brackets
4f55302e8a
feat: add WithAuth() to builder using api.AuthAdapter interface
2021-05-18 09:36:33 +02:00
xdrm-brackets
18d809c4ca
feat: create api.Auth wrapping authorization management
2021-05-18 09:34:01 +02:00
Adrien Marquès
e3d24ae1ef
Merge pull request 'feature: add optional context to handlers' ( #19 ) from feature/context into 0.3.0
...
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
An optional first input argument of type api.Ctx to handlers to access standard request/response
2021-05-10 14:42:57 +00:00
Adrien Marquès
af106acd3f
refactor: test: dynamic function handler
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2021-04-19 23:34:31 +02:00
Adrien Marquès
b88a4439c8
fixup: update comment for optional api.Ctx
2021-04-19 22:15:34 +02:00
Adrien Marquès
e44dab4bc9
fixup: remove HasContext from spec
2021-04-19 19:55:00 +02:00
Adrien Marquès
1245861be7
test: builder
continuous-integration/drone/push Build is passing
Details
2021-04-19 18:46:18 +02:00
Adrien Marquès
d6f8457274
feat: pass optional context argument to handlers
continuous-integration/drone/push Build is passing
Details
2021-04-18 19:31:54 +02:00
Adrien Marquès
939ab2e57d
fixup: expose api context fields
2021-04-18 19:31:40 +02:00
Adrien Marquès
0a55c2ee13
feat: add optional api.Ctx first argument to handler checker
2021-04-18 19:25:31 +02:00
Adrien Marquès
24be7c294e
test: dynamic func input
2021-04-18 18:26:37 +02:00
Adrien Marquès
f334d19ef4
feat: add api context type
2021-04-18 18:14:30 +02:00
Adrien Marquès
08b825b38f
Merge pull request 'feature: add http middleware capability' ( #18 ) from feature/middleware into 0.3.0
continuous-integration/drone/push Build is passing
Details
2021-04-18 16:08:10 +00:00
Adrien Marquès
a693bbbf9b
fix: reflect assign value to pointer of value in call argument
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2021-04-18 17:55:48 +02:00
Adrien Marquès
3986f7a022
fix: remove recoverer and body closer; must be users' responsability
2021-04-18 17:53:53 +02:00
Adrien Marquès
14ae59561c
feat: encapsulate request handling into adapters
2021-04-18 16:50:02 +02:00
Adrien Marquès
96164127e1
feat: add Use() method to add adapters to the aicra builder
2021-04-18 16:49:46 +02:00
Adrien Marquès
87c15b91e5
feat: add middleware (Adapter) type
2021-04-18 16:49:24 +02:00
Adrien Marquès
f3127edde1
Merge pull request 'improvements, fixes, update to go 1.16' ( #16 ) from refactor/go1.16 into 0.3.0
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
2021-03-28 17:44:58 +00:00
Adrien Marquès
546130cfd0
update: readme
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2021-03-28 19:41:25 +02:00
Adrien Marquès
11aa9f0a0f
fix: global handler recoverer
2021-03-28 19:05:43 +02:00
Adrien Marquès
468a09be8d
update: rename 'Server' into 'Handler'
2021-03-28 19:03:16 +02:00
Adrien Marquès
10e59acdae
fix: test string-int concatenation warnings
2021-03-28 18:50:25 +02:00
Adrien Marquès
334f1fba21
feat: add builder helpers Get(), Post(), Put(), Delete() that proxies to Bind()
2021-03-28 18:50:04 +02:00
Adrien Marquès
6039fbb41f
update: api.Err system
...
- rename 'Error' to 'Err'
- use struct instead of int as underlying type ; remove dependency on 2 maps for reason and HTTP status codes
- remove useless json implementation
2021-03-28 18:49:23 +02:00
Adrien Marquès
a9acfca089
update go.mod to go 1.16
2021-03-28 18:06:09 +02:00
Adrien Marquès
fb69dbb903
Merge branch 'refactor-test' of go/aicra into 0.3.0
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/push Build is passing
Details
2020-04-04 15:33:43 +00:00
Adrien Marquès
658c66d2db
update readme
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2020-04-04 17:33:08 +02:00
Adrien Marquès
3c453e7f89
remove api useless request, update default errors and bind status codes to errors
continuous-integration/drone/push Build is passing
Details
2020-04-04 16:03:50 +02:00
Adrien Marquès
d198086dd4
fix http error handlers
2020-04-04 16:03:12 +02:00
Adrien Marquès
30862195a1
config: refactor, simplify, test, remove redundant comments
2020-04-04 15:39:00 +02:00
Adrien Marquès
990bb86919
rework reqdata api and remove redundant comments
2020-04-04 14:56:15 +02:00
Adrien Marquès
35ede5e266
unexport config errors
2020-04-04 14:34:20 +02:00
Adrien Marquès
90472b8bf7
unexport dynfunc errors
2020-04-04 12:46:43 +02:00
Adrien Marquès
df56496a16
dynfunc: normalize file names
2020-04-04 12:45:36 +02:00
Adrien Marquès
caa57889b4
multipart: rename files and unexport errors
2020-04-04 12:43:55 +02:00
Adrien Marquès
4ba62e19c7
remove func.go and standardize main file name
2020-04-04 12:42:18 +02:00
Adrien Marquès
5cadfcf78b
unexport aicra errors
2020-04-04 12:40:21 +02:00
Adrien Marquès
e0ea0c97c5
clarify datatype comments and standardize file name
2020-04-04 12:40:01 +02:00
Adrien Marquès
6319761731
Merge branch 'test/dynamic' of go/aicra into 0.3.0
...
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
test dynfunc package; standardize and refactor api
2020-04-04 10:09:19 +00:00
Adrien Marquès
92da498d49
remove server logs and util file
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2020-04-04 12:06:31 +02:00
Adrien Marquès
60ef4717a8
clarity: aicra server request management
2020-04-04 12:05:17 +02:00
Adrien Marquès
5cc3d2d455
use http.Request instead of pointer
2020-04-04 12:03:29 +02:00
Adrien Marquès
c5cdba8007
move aicra builder and server into their own files
2020-04-04 11:50:01 +02:00
Adrien Marquès
09362aad83
make 'dynfunc' internal
2020-04-04 11:49:33 +02:00
Adrien Marquès
d69dd2508c
refactor aicra: meaningful defaults, stage renaming Builder.Build() -> Server
2020-04-04 11:46:37 +02:00
Adrien Marquès
1e0fb77d61
standardize and simplify the config package
2020-04-04 11:45:49 +02:00
Adrien Marquès
b0e25b431c
ToHTTPServer now returns the exported field http.Handler instead of an unexported type
2020-04-04 10:39:02 +02:00
Adrien Marquès
b1498e59c1
clarity rename: dynamic package to dynfunc
2020-04-04 10:36:52 +02:00
Adrien Marquès
eb690cf862
add api errors for storage
2020-04-04 10:10:24 +02:00