Adrien Marquès
76cc2f5279
replace datatype.Kind() with Type()
2020-03-28 19:11:23 +01:00
Adrien Marquès
8cfa2235d6
add Kind() method to datatype.T interface and to config parameter
2020-03-28 18:48:27 +01:00
Adrien Marquès
49cf06d5d8
implement validator interface for config.server; refactor
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2020-03-28 12:31:44 +01:00
Adrien Marquès
af3ffa7d6a
implement validator interface for config.service; rename for readability
2020-03-28 12:30:57 +01:00
Adrien Marquès
dac9aa4298
implement validator interface for config.parameter
2020-03-28 12:28:58 +01:00
Adrien Marquès
54705b7472
create validator interface for config
2020-03-28 12:26:11 +01:00
Adrien Marquès
5f3aa5967d
provide datatype registry to every type to allow for recursive datatypes : slices, maps, structs
2020-03-22 16:50:10 +01:00
Adrien Marquès
a15a5c1f7a
fix: register mismatch when no brace capture
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
2020-03-21 15:58:05 +01:00
Adrien Marquès
5fe983c486
display both services in pattern collision error messages
2020-03-21 15:57:35 +01:00
Adrien Marquès
3017cc5ba9
add method tests for pattern collision
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
2020-03-21 15:52:07 +01:00
Adrien Marquès
9c3166397f
add tests for service collision
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
2020-03-21 15:49:07 +01:00
Adrien Marquès
e3adbf48ca
consider collision only if every part is matching
2020-03-21 15:48:59 +01:00
Adrien Marquès
0e6dfbe580
make pattern collission error message explicit
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
2020-03-21 15:15:33 +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
93b31b9718
keep references to Form parameters
2020-03-16 11:48:44 +01:00
Adrien Marquès
12417f7f1c
reference query parameters in config.Service
2020-03-16 11:32:37 +01:00
Adrien Marquès
e7f10723a6
check for undefined brace captures + make tests parallel
2020-03-16 10:56:26 +01:00
Adrien Marquès
c32b038da2
make splitURL public
2020-03-16 09:26:10 +01:00
Adrien Marquès
1b4922693b
move config -> internal.config and config.datatype to datatype
2020-03-16 09:20:00 +01:00
Adrien Marquès
a6f5083f0d
bcupdate: make config flat, rewrite, simplify, test
2020-03-14 15:24:17 +01:00
Adrien Marquès
638f5e44c8
test internal/config trick to have a 100% coverage (as conflict check is undeterministic, merge all conditions)
2020-03-08 16:26:55 +01:00
Adrien Marquès
228f5b9a02
test internal/config empty parameter rename should not rename
2020-03-08 16:26:55 +01:00
Adrien Marquès
aba95d4163
remove dead code
2020-03-08 16:26:55 +01:00
Adrien Marquès
e9c7160d2e
expand internal/config test coverage
...
- make parameter type "?" invalid as it marks it as optional only
- check optional vs. required parameters
- test subservice in method description error check
2020-03-08 16:26:55 +01:00
Adrien Marquès
61b58a9f98
add internal/config test for the Browse() method
2020-03-08 16:26:55 +01:00
Adrien Marquès
dd0e321cbd
test internal/config parsing and illegal/missing fields
2020-03-08 16:26:55 +01:00
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
bf3e651c2c
ref: clean comments and make errors constants
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
0e498607ba
clean
2019-05-05 19:01:54 +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
8109f57d15
ref 0: internal.apidef becomes internal.config + refactoe
2019-05-01 10:29:23 +02:00
Adrien Marquès
a63e227538
ref 0: internal/request
2019-05-01 00:02:28 +02:00
Adrien Marquès
5e7ece3f30
fix mispelled words
2018-10-07 11:14:54 +02:00
Adrien Marquès
d406338777
implement driver for type checkers | move controller/middleware/checker definition inside the 'driver' package (all uses are exported from this place) | now driver.Driver returns 'Controller', 'Middleware', and 'Checker' in the interface | a lot a junk
2018-10-01 19:27:38 +02:00
Adrien Marquès
37fe30ebc7
rename 'internal/meta' to 'internal/config' | move driver type definition into explicit file + remove 'import' driver | remove useless method to parse multipart
2018-10-01 17:43:18 +02:00
Adrien Marquès
7bcbefdf35
rename 'internal/config' to 'internal/api' | rename 'internal.api.Load()' to 'internal.api.Parse()'
2018-10-01 14:15:00 +02:00
Adrien Marquès
74e4ce83cb
restrict parameter names in config + ignore parameter names in received requests
2018-09-28 08:54:04 +02:00
Adrien Marquès
3feae783dc
add driver management + moved implementation of default driver into 'driver/plugin'
2018-09-27 13:43:36 +02:00
Adrien Marquès
1aee9e92fd
rename package 'request' -> 'apirequest' ; 'config' -> 'controller' + main types.go bundled into server.go + made attributes non-exported (lowercase)
2018-07-11 01:36:42 +02:00
Adrien Marquès
637bc91770
LINT: renaming + refactor
2018-07-09 01:34:21 +02:00
Adrien Marquès
6784c2df95
moved local imports into 'internal' parent package
2018-07-09 00:10:03 +02:00
Adrien Marquès
2b1bf77c0f
removed from /internal directory
2018-05-30 09:02:08 +02:00
Adrien Marquès
73c36a3821
config.Load() now sets defaults for optional fields
2018-05-24 16:53:39 +02:00
Adrien Marquès
75db1513bb
add Controller.Method(string) to interface the extraction of dynamic method
2018-05-24 16:22:29 +02:00
Adrien Marquès
8106c22dbd
implemented method check in 'config' package
2018-05-24 16:18:28 +02:00
Adrien Marquès
32520a1591
full parameter gathering in 'request_builder'
2018-05-22 09:10:10 +02:00
Adrien Marquès
18f4bcbbae
add 'controller path-finding' + 'method check' + [TODO: issue with ParseMultipartForm() that is slow]
2018-05-21 13:02:15 +02:00