Commit Graph

19 Commits

Author SHA1 Message Date
Adrien Marquès ad178781ac
test: cover dynfunc signature to 100% 2021-06-21 22:46:04 +02:00
Adrien Marquès 8b92abd1c2 fix: remove debug/typo 2021-06-21 21:38:06 +02:00
Adrien Marquès 8c122e9ddf feat: export dynfunc errors 2021-06-21 21:34:52 +02:00
Adrien Marquès defa2c3645
refactor: rename semantics of datatype to validator.Type 2021-06-21 21:08:22 +02:00
Adrien Marquès 822ef823e9
migrate: symbols import paths to github 2021-06-20 21:29:46 +02:00
Adrien Marquès af63c4514b
refactor: idiomatic remove of api.Context for context.Context, custom middlewares for standard http middlewares
continuous-integration/drone/push Build is passing Details
- remove api.Context as using context.Context is more idiomatic
 - remove api.Adapter as it is redundant with func(http.Handler) http.Handler
 - remove authentication middlewares as they be achieved as normal middlewares but launched around the handler (after the service has been found and validated)
 - builder.With() adds an standard Middleware that runs before any aicra code
 - builder.WithContext() adds an http middleware that runs just before the service handler is called. The http.Request provided contains a context with useful values such as the required permissions (from the service configuration).
 - handlers take a context.Context variable as first argument instead of api.Context
2021-06-20 02:14:31 +02:00
Adrien Marquès 53dfc8f679
feat: *api.Context is required as first handler argument
continuous-integration/drone/push Build is passing Details
2021-06-20 00:47:04 +02:00
Adrien Marquès fa1ecfd97f
feat: create internal context.Context custom keys 2021-06-20 00:46:04 +02: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 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 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 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 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 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 09362aad83
make 'dynfunc' internal 2020-04-04 11:49:33 +02:00