Adrien Marquès
939ab2e57d
fixup: expose api context fields
2021-04-18 19:31:40 +02:00
Adrien Marquès
f334d19ef4
feat: add api context type
2021-04-18 18:14:30 +02:00
Adrien Marquès
87c15b91e5
feat: add middleware (Adapter) type
2021-04-18 16:49:24 +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
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
60ef4717a8
clarity: aicra server request management
2020-04-04 12:05:17 +02:00
Adrien Marquès
eb690cf862
add api errors for storage
2020-04-04 10:10:24 +02:00
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