All Projects → srfrog → Go Relax

srfrog / Go Relax

Licence: mit
Framework for building RESTful API's in Go

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Relax

Graphql2rest
GraphQL to REST converter: automatically generate a RESTful API from your existing GraphQL API
Stars: ✭ 181 (+16.77%)
Mutual labels:  restful, api-rest
Restana
Super fast and minimalist framework for building REST micro-services.
Stars: ✭ 341 (+120%)
Mutual labels:  microservices, restful
Reactive Ms Example
An educational project to learn reactive programming with Spring 5
Stars: ✭ 157 (+1.29%)
Mutual labels:  microservices, api-rest
Sqler
write APIs using direct SQL queries with no hassle, let's rethink about SQL
Stars: ✭ 1,943 (+1153.55%)
Mutual labels:  restful, api-rest
Nakadi
A distributed event bus that implements a RESTful API abstraction on top of Kafka-like queues
Stars: ✭ 734 (+373.55%)
Mutual labels:  microservices, restful
Adnc
微服务框架,同时也适用于单体架构系统的开发。支持经典三层与DDD架构开发模式、集成了一系列主流稳定的微服务配套技术栈。一个前后端分离的框架,前端基于Vue、后端基于.Net Core 3.1构建。
Stars: ✭ 223 (+43.87%)
Mutual labels:  microservices, restful
Magento-Extra-RESTful
Many more REST resources for Magento's API
Stars: ✭ 32 (-79.35%)
Mutual labels:  restful, api-rest
Connexion
Swagger/OpenAPI First framework for Python on top of Flask with automatic endpoint validation & OAuth2 support
Stars: ✭ 3,869 (+2396.13%)
Mutual labels:  microservices, api-rest
Phpboot
☕️ 🚀 tiny & fast PHP framework for building Microservices/RESTful APIs, with useful features: IOC, Hook, ORM, RPC, Swagger, Annotation, Parameters binding, Validation, etc.
Stars: ✭ 638 (+311.61%)
Mutual labels:  microservices, restful
Go Api Boilerplate
Go Server/API boilerplate using best practices DDD CQRS ES gRPC
Stars: ✭ 373 (+140.65%)
Mutual labels:  microservices, restful
Snorlax
A lightweight REST client that gives you full control of your resources
Stars: ✭ 129 (-16.77%)
Mutual labels:  microservices, restful
Dubbo Go Pixiu
Based on the proxy gateway service of dubbo-go, it solves the problem that the external protocol calls the internal Dubbo cluster. At present, it supports HTTP and gRPC[developing].
Stars: ✭ 124 (-20%)
Mutual labels:  microservices, api-rest
Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (-10.97%)
Mutual labels:  microservices, api-rest
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (-5.16%)
Mutual labels:  microservices
Edward
A tool for managing local microservice instances
Stars: ✭ 152 (-1.94%)
Mutual labels:  microservices
Eventapis
eventapis is a Java based Event Sourcing framework which can be benefited by the teams who are planning to make CQRS transitions with minimum learning curve and ease of adaptation.
Stars: ✭ 147 (-5.16%)
Mutual labels:  microservices
Awesome Http Benchmark
HTTP(S) benchmark tools, testing/debugging, & restAPI (RESTful)
Stars: ✭ 2,236 (+1342.58%)
Mutual labels:  restful
Dasync
Every developer deserves the right of creating microservices without using any framework 🤍
Stars: ✭ 154 (-0.65%)
Mutual labels:  microservices
Appkernel
API development made easy: a smart Python 3 API framework
Stars: ✭ 152 (-1.94%)
Mutual labels:  api-rest
Koa Restful Boilerplate
Koa 2 RESTful API boilerplate
Stars: ✭ 146 (-5.81%)
Mutual labels:  restful

Go-Relax GoDoc Go Report Card

Build fast and complete RESTful APIs in Go

Go-Relax aims to provide the tools to help developers build RESTful web services, and information needed to abide by REST architectural constraints using correct HTTP semantics.

Quick Start

Install using "go get":

go get github.com/codehack/go-relax

Then import from your source:

import "github.com/codehack/go-relax"

View example_test.go for an extended example of basic usage and features.

Also, check the wiki for HowTo's and recipes.

Features

  • Helps build API's that follow the REST concept using ROA principles.
  • Built-in support of HATEOAS constraint with Web Linking header tags.
  • Follows REST "best practices", with inspiration from Heroku and GitHub.
  • Works fine along with http.ServeMux or independently as http.Handler
  • Supports different media types, and mixed for requests and responses.
  • It uses JSON media type by default, but also includes XML (needs import).
  • The default routing engine uses trie with regexp matching for speed and flexibility.
  • Comes with a complete set of filters to build a working API. "Batteries included"
  • Uses sync.pool to efficiently use resources when under heavy load.

Included filters

  • [x] Content - handles mixed request/response encodings, language preference, and versioning.
  • [x] Basic authentication - to protect any resource with passwords.
  • [x] CORS - Cross-Origin Resource Sharing, for remote client-server setups.
  • [x] ETag - entity tagging with conditional requests for efficient caching.
  • [x] GZip - Dynamic gzip content data compression, with ETag support.
  • [x] Logging - custom logging with pre- and post- request event support.
  • [x] Method override - GET/POST method override via HTTP header and query string.
  • [x] Security - Various security practices for request handling.
  • [x] Limits - request throttler, token-based rate limiter, and memory limits.

Upcoming filters

  • [ ] Relaxed - Test API's compliance with Relax API Specification (based on REST).
  • [ ] JSON-API support.
  • [ ] JSON-Schema for validating requests and responses.
  • [ ] Collection-JSON support.

Documentation

The full code documentation is located at GoDoc:

http://godoc.org/github.com/codehack/go-relax

The source code is thoroughly commented, have a look.

Hello World

This minimal example creates a new Relax service that handles a Hello resource.

package main

import (
   "github.com/codehack/go-relax"
)

type Hello string

func (h *Hello) Index(ctx *relax.Context) {
   ctx.Respond(h)
}

func main() {
   h := Hello("hello world!")
   svc := relax.NewService("http://api.company.com/")
   svc.Resource(&h)
   svc.Run()
}

$ curl -i -X GET http://api.company.com/hello

Response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Link: </hello>; rel="self"
Link: </hello>; rel="index"
Request-Id: 61d430de-7bb6-4ff8-84da-aff6fe81c0d2
Server: Go-Relax/0.5.0
Date: Thu, 14 Aug 2014 06:20:48 GMT
Content-Length: 14

"hello world!"

Credits

Go-Relax is Copyright (c) Codehack. Published under an MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].