Commit Graph

10 Commits

Author SHA1 Message Date
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
xdrm-brackets 4f55302e8a
feat: add WithAuth() to builder using api.AuthAdapter interface 2021-05-18 09:36:33 +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 96164127e1 feat: add Use() method to add adapters to the aicra builder 2021-04-18 16:49:46 +02:00
Adrien Marquès 468a09be8d
update: rename 'Server' into 'Handler' 2021-03-28 19:03:16 +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 5cadfcf78b
unexport aicra errors 2020-04-04 12:40:21 +02:00
Adrien Marquès c5cdba8007
move aicra builder and server into their own files 2020-04-04 11:50:01 +02:00