Adrien Marquès
5ac3b81f6d
parameter name conflict: on rename conflicting rename, return original name
2020-03-08 16:26:55 +01:00
Adrien Marquès
4accad7286
refactor internal/config
...
- create cerr (constant errors) with wrapped context (service name, method, parameter name)
- fix comments numbering
- remove duplicate check
2020-03-08 16:26:55 +01:00
Adrien Marquès
dec7fd9a62
test internal/cerr package + add WrapString() to use a raw string
2020-03-08 16:26:55 +01:00
Adrien Marquès
5cdcfd21ca
fix typo
2020-03-08 16:26:55 +01:00
Adrien Marquès
d44df7eee0
fix readme usage & changelog
2020-03-08 16:26:55 +01:00
Adrien Marquès
6bc8160f99
Prettify logs
2020-03-08 16:26:55 +01:00
Adrien Marquès
d1d581bd75
Test json: add a check with invalid json (no parameter is parsed)
2020-03-08 16:26:55 +01:00
Adrien Marquès
5f1d76a0a8
Test json body parameters
2020-03-08 16:26:55 +01:00
Adrien Marquès
ac7adcbd1f
Test with url encoded body parameters
2020-03-08 16:26:55 +01:00
Adrien Marquès
5897461323
Test store agains Query parameters
2020-03-08 16:26:55 +01:00
Adrien Marquès
44d19e8b65
Test store with uri arguments
2020-03-08 16:26:55 +01:00
Adrien Marquès
613233faef
Test empty store -> fix
2020-03-08 16:26:55 +01:00
Adrien Marquès
c40fb03aa7
merge parseParameter
2020-03-08 16:26:55 +01:00
Adrien Marquès
1f9c3c02c1
Merge branch '0.2.0' of go/aicra into master
continuous-integration/drone/push Build is passing
Details
2019-11-19 10:49:50 +00:00
Adrien Marquès
42b09c5c38
fix badge
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2019-11-19 11:45:29 +01:00
Adrien Marquès
0348d33439
remove jenkins support
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
2019-11-18 16:18:42 +01:00
Adrien Marquès
82188560c6
add builtin.bool test + make other types that allow 'string' allow '[]byte' as well
continuous-integration/drone/push Build is passing
Details
2019-11-18 16:17:02 +01:00
Adrien Marquès
1953abf722
add ci support
continuous-integration/drone/push Build is passing
Details
2019-11-18 16:03:18 +01:00
Adrien Marquès
acfbee3894
add startup logs
...
Log aicra configuration 'METHOD /PATH' when creating the instance
Log mapped handlers before starting listening
To know when we start listening (was transparently handled by http.ListenAndServer) ; added a wrapper around 'Server' (i.e. httpServer) that fulfills the http.Server interface
2019-09-26 19:03:37 +02:00
Adrien Marquès
cabbc53a86
Merge branch '0.2.0' of gogs:go/aicra into 0.2.0
2019-09-26 18:09:52 +02:00
Adrien Marquès
4eb9f58074
Update readme
2019-09-26 14:28:11 +02:00
Adrien Marquès
54f2496943
feat: typechecks: tests for 'float64'
2019-05-06 19:26:36 +02:00
Adrien Marquès
4c5f13933c
feat: typechecks: tests for 'uint' + add string repr for 'int'
2019-05-06 18:34:21 +02:00
Adrien Marquès
4e36adfcc9
readme: add ci badge
2019-05-06 18:34:21 +02:00
Adrien Marquès
f53dfcbf62
ci: create jenkins file
2019-05-06 18:34:11 +02:00
Adrien Marquès
be84c86172
fix: use t.Run in tests instead of for{} with i
2019-05-05 19:01:54 +02:00
Adrien Marquès
21f48a65ee
feat: parallelize tests +ci
2019-05-05 19:01:54 +02:00
Adrien Marquès
bf3e651c2c
ref: clean comments and make errors constants
2019-05-05 19:01:54 +02:00
Adrien Marquès
0780e8dd33
feat: update string type checker | test: string, int, float, any typecheckers
...
feat: string type checker pre-process min,max/fixed length(s) before returning the CheckerFunc
feat: add typecheckers for 'any', 'float' and 'int' (managing number overflows)
2019-05-05 19:01:54 +02: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
eb5ce4c0d0
fix: semantic renaming : internal.config.Method.Permission is now Scope
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
0e498607ba
clean
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
d0f5277bf4
fix: prefix service path with '/' if missing
2019-05-01 16:28:16 +02:00
Adrien Marquès
16ea60f2aa
fix: add data to 'ErrorUncallableMethod' and 'ErrorUncallableService'
2019-05-01 16:20:32 +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
0a63e9afcc
removed commands
2019-05-01 11:29:04 +02:00
Adrien Marquès
16d3399ee9
ref 0: internal.checker renamed typecheck (no more internal)
2019-05-01 11:28:55 +02:00
Adrien Marquès
8d45d3241b
ref 0: internal.checker defines an interface ; default types are in internal.checker.builtin
2019-05-01 11:23:05 +02:00
Adrien Marquès
8109f57d15
ref 0: internal.apidef becomes internal.config + refactoe
2019-05-01 10:29:23 +02:00