Skip to content

abonie/gohan

 
 

Repository files navigation

Gohan : YAML-based REST API Service Definition Language

Join the chat at https://gitter.im/cloudwan/gohan Coverage Status wercker status Go Report Card

  • API Definition Generation (including Swagger)
  • DB Table Generation & OR Mapping
  • Support Custom Logic using Gohan Script (Javascript, and Go)
  • Extensible Role-Based Access Control
  • etcd integration

see [Pet Store Example] (./etc/example_schema.yaml)

How to install

Download Binary

./gohan server --config-file etc/gohan.yaml

Packages

Ubuntu 14.04 Trusty 64bits server

wget -qO - https://deb.packager.io/key | sudo apt-key add -
echo "deb https://deb.packager.io/gh/cloudwan/gohan trusty master" | sudo tee /etc/apt/sources.list.d/gohan.list
sudo apt-get update
sudo apt-get install gohan

CentOS / RHEL 6 64 bits server

sudo rpm --import https://rpm.packager.io/key
echo "[gohan]
name=Repository for cloudwan/gohan application.
baseurl=https://rpm.packager.io/gh/cloudwan/gohan/centos6/master
enabled=1" | sudo tee /etc/yum.repos.d/gohan.repo
sudo yum install gohan

Debian 7 Wheezy 64bits server

wget -qO - https://deb.packager.io/key | sudo apt-key add -
echo "deb https://deb.packager.io/gh/cloudwan/gohan wheezy master" | sudo tee /etc/apt/sources.list.d/gohan.list
sudo apt-get update
sudo apt-get install gohan

Build

  • Install GO >= 1.6
  • go get github.com/cloudwan/gohan

Heroku

Deploy

Doc

Document

Quick link

GoDoc

WebUI

http://localhost:9091/ (or https://$APPNAME.herokuapp.com/ )
  • Admin User

    • ID: admin
    • Password: gohan
    • Tenant: demo
  • Member User

    • ID: member
    • Password: gohan
    • Tenant: demo

Examples

example configuraions

Development Guide

  • Install Go >= 1.6
  • Install development tools
make deps
  • make & make install
make
make install
  • Send a pull request to Github

How to contribute

We recommend to rebase multiple commits

License

Apache2

About

Gohan: YAML-based REST API Service Definition Language

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.3%
  • JavaScript 3.1%
  • Other 0.6%