🚀 Fast, intuitive, and powerful configuration-driven engine for faster and easier REST development
Go to file
Adrien Marquès f0aa6d2c5c minfix 2018-07-06 10:51:45 +02:00
checker fix 'string' type not to crash on 'nil' values 2018-05-31 09:23:30 +02:00
config new configuration format (more explicit + cleaner) 2018-06-03 15:08:47 +02:00
err moved 'err' into package 2018-06-01 09:09:32 +02:00
implement rename repo 2018-07-05 19:15:57 +02:00
multipart removed from /internal directory 2018-05-30 09:02:08 +02:00
request rename repo 2018-07-05 19:15:57 +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 rename repo 2018-07-05 19:15:57 +02:00
build-controllers.sh restrict to 'i.go'-ending filenames + remove debug 2018-06-16 22:21:41 +02:00
build-types.sh rename repo 2018-07-05 19:21:01 +02:00
server.go minfix 2018-07-06 10:51:45 +02:00
types.go rename repo 2018-07-05 19:15:57 +02:00
util.go refactor 'router' + 'loader' into 'server' 2018-07-06 10:49:52 +02:00

README.md

aicra: all-in-config REST API

Aicra 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.

A working example is available here

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