🚀 Fast, intuitive, and powerful configuration-driven engine for faster and easier REST development
Go to file
Adrien Marquès aef8d74bb9 minmod 2018-06-03 14:48:10 +02:00
checker fix 'string' type not to crash on 'nil' values 2018-05-31 09:23:30 +02:00
config remove debug | add parameter 'rename' feature 2018-06-03 11:32:44 +02:00
err moved 'err' into package 2018-06-01 09:09:32 +02:00
implement minmod 2018-06-03 14:48:10 +02:00
multipart removed from /internal directory 2018-05-30 09:02:08 +02:00
request remove debug 2018-06-03 11:36:36 +02:00
.gitignore rename type build script + add controller build script + update 'readme' to _checkable_ changelog 2018-05-31 09:23:06 +02:00
LICENSE first commit 2018-05-19 12:04:45 +02:00
README.md changelog 2018-06-01 11:08:31 +02:00
build-controllers.sh rename type build script + add controller build script + update 'readme' to _checkable_ changelog 2018-05-31 09:23:06 +02:00
build-types.sh rename type build script + add controller build script + update 'readme' to _checkable_ changelog 2018-05-31 09:23:06 +02:00
loader.go remove useless 'Server.err' 2018-06-03 11:38:17 +02:00
router.go remove debug | add parameter 'rename' feature 2018-06-03 11:32:44 +02:00
server.go add 'controller path-finding' + 'method check' + [TODO: issue with ParseMultipartForm() that is slow] 2018-05-21 13:02:15 +02:00
types.go remove useless 'Server.err' 2018-06-03 11:38:17 +02:00

README.md

xfw: all-in-one REST API

xfw is a self-working API coded in Go:

  • It allows anyone to create a fully featured REST API
  • it can be used in Go as a library, or as a proxy to launch external commands (e.g. php scripts)

It is based on the all-in-config idea, where you only have a configuration file, and your implementation and it works without no further work.

changelog
  • human-readable json configuration
  • nested routes (i.e. /user/:id: and /user/post/:id:)
  • nested URL arguments (i.e. /user/:id: and /user/:id:/post/:id:)
  • useful http methods: GET, POST, PUT, DELETE
  • manage URL, query and body arguments:
    • multipart/form-data (variables and file uploads)
    • application/x-www-form-urlencoded
    • application/json
  • required vs. optional parameters with a default value
  • parameter renaming
  • generic authentication system (i.e. you can override the built-in one)
  • generic type check (i.e. implement custom types alongside built-in ones)
  • built-in types
    • any - wildcard matching all values
    • int - any number (e.g. float, int, uint)
    • string - any text
    • varchar(min, max) - any string with a length between min and max
    • <a> - array containing only elements matching a type
    • <a:b> - map containing only keys of type a and values of type b (a or b can be ommited)
  • generic controllers implementation (shared objects)
  • response interface