Skip to content

A Golang framework for restful API for User Management

License

Notifications You must be signed in to change notification settings

lonerzacky/restgo_framework

Repository files navigation

RestGo Framework

A Golang framework for restful API. This repository demonstrates the usage of Restful API within a Golang application.

Installation

Without Docker
  1. go dep
$ go get -u github.com/golang/dep/cmd/dep
$ dep init -v
$ dep ensure -v
  1. Create .env file
$ make env-init

It will create .env file

APP_HOST=yourapphost
APP_DB_HOST=yourdbhost
APP_PORT=yourapphost
APP_VERSION=ypurappversion
DB_CONNECTION=yourdbdriver
DB_USERNAME=yourdatabaseuser
DB_DATABASE=yourdatabasename
DB_PASSWORD=yourdatabasepassword
DB_PORT=yourdatabaseport

Starting App

 go run main.go
With Docker
  1. Set Local Path Project in makefile
$ vi makefile

set local path

$  LOCAL_DESTINATION=/home/golang/src/restgo_framework/
  1. Build image and run application
$  make build 
$  make run 
  1. start|restart|stop program
$  make start 
$  make restart 
$  make stop 

Request Headers

Required Key Value
Yes Content-Type application/x-www-form-urlencoded

Features

  • env configuration
  • Controller based
  • Route based
  • Model based
  • Helper JSON format

Database Sample

alt tag

About

A Golang framework for restful API for User Management

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published