Commit Graph

22 Commits

Author SHA1 Message Date
Adrien Marquès 00e2a96c79
fix: ErrNoMatchFound error 2020-03-29 16:22:32 +02:00
Adrien Marquès e7dd1e7a56
migrate handler from api to aicra; check for service when setting handler 2020-03-29 15:04:12 +02:00
Adrien Marquès af09466013
migrate api.response to const errors; make HandlerFn return an api.Error; rename http HandlFunc to Handle;
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2020-03-28 14:57:28 +01:00
Adrien Marquès 5504e4b3ec
make api errors int; allow for const defaults 2020-03-28 14:51:49 +01:00
Adrien Marquès 3a258400c0
remove api useless errors : UnkonwnMethod and UncallableMethod 2020-03-21 14:19:35 +01:00
Adrien Marquès 9475fe4526
use private errors do avoid overlapping types among packages 2020-03-21 14:19:14 +01:00
Adrien Marquès 8c539370aa
remove cerr 2020-03-16 12:53:48 +01:00
Adrien Marquès acdba4121b
rename ambiguous variable
continuous-integration/drone/push Build is passing Details
2020-03-09 19:12:26 +01:00
Adrien Marquès bafaad97e6 clean: request param now uses internal const error 'cerr' 2019-05-05 19:01:54 +02:00
Adrien Marquès a83d077569 feat: add builtin types [int, uint] | fix request param getters | add request param getters [GetFloat, GetInt, GetUint, GetStrings] with permissive possible types and 'automatic' conversion 2019-05-05 19:01:54 +02:00
Adrien Marquès 189d3b40a6 fix: semantic (comments) renaming : 'controller' to 'service', more explicit names 2019-05-05 19:01:54 +02:00
Adrien Marquès 6afedf190f ref 1: clean server.go code + response implements http.Handler + add generic getter on request params Get() (interface{},error) 2019-05-05 19:01:54 +02:00
Adrien Marquès 0912e07f4f fix: pass error arguments as values not array + set header after
WriteHeader()
2019-05-05 19:01:54 +02:00
Adrien Marquès 7a87288876 fix: rename 'WrapError' to 'SetError' + shadow response error + response implements Error() 2019-05-05 19:01:54 +02:00
Adrien Marquès 1e4476ced5 feat: rename 'Error.Put' to 'SetArguments' with n >= 1 arguments + move 'WrapError' to response 2019-05-05 19:01:54 +02:00
Adrien Marquès b9ca1801bd fix: rename 'NewError' to 'WrapError' 2019-05-05 19:01:54 +02:00
Adrien Marquès b9f240b86b feat: fix error creation to bind arguments directly + add optional error argument in NewResponse() 2019-05-05 19:01:54 +02:00
Adrien Marquès 4e25c647b2 feat: add status code in response 2019-05-01 16:40:26 +02:00
Adrien Marquès 98ae854251 feat: add scope to request 2019-05-01 15:56:18 +02:00
Adrien Marquès cd2bcdd8bc ref 0: first working version ; totest 2019-05-01 15:14:49 +02:00
Adrien Marquès 7e66b6ddd5 ref 0: big refactor of concerns between api request, server, etc 2019-05-01 13:44:45 +02:00
Adrien Marquès 049400e2be rename 'response' to 'api' 2018-10-07 11:23:00 +02:00