/restless

Restful API for manage CRUD schema, table, column of RDBMS

Primary LanguageGo

restless

This is a schemaless rest api

Prerequisites

Installation & setup guide (Linux/macOS)

1. Installing Go with Homebrew

brew install go

Note: You can install Go by whichever mean you see fit. Homebrew is just our choice of preference.

2. Setup your GOPATH

# Source this in your favorite shell .rc (.bashrc, .zshrc, etc...)
# or just export it on the shell you're currently working on
export GOPATH=$HOME/place/to/put/my/go/code

Note: If you're using IDE embedded test runners like Goland configure this as an environment variable

# Make sure GO111MODULE=on is set on your working shell
# The process should be the same as how you setup your GOPATH (See section 2.)
export GO111MODULE=on

# You can use go built-in tool to clone the code
go get -d -v github.com/mazti/restless

# Or man-handling it
mkdir -p $GOPATH/src/github.com/mazti
git clone https://github.com/mazti/restless.git $GOPATH/src/github.com/mazti/restless

4. Installing dependencies (Optional)

We love localizing project level dependencies so now we're going to download them using a go module utility.

# Make sure you're inside of the project directory first
go mod vendor

We usually refer to this practice as vendoring, hence the name of the utility

5. Run the tests

go test ./...

6. Install and Run as CLI tool

Install

# Make sure you're inside of the project directory first
$GOPATH/src/github.com/mazti/restless make install

Commands

# Helps
restless help

# Run meta service (both grpc and http)
restless meta

# Run meta service (grpc only)
restless meta -g