All Projects → henrylee2cn → rester

henrylee2cn / rester

Licence: Apache-2.0 License
Fast and concise RESTful web framework based on fasthttp

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to rester

spring-boot-crud-example
Spring Boot + MyBatis + Thymeleaf实现简单留言板应用
Stars: ✭ 17 (-37.04%)
Mutual labels:  restful
NodeRestApi
Node.js, Express.js and MongoDB REST API App
Stars: ✭ 38 (+40.74%)
Mutual labels:  restful
mixerapi
A CakePHP Plugin for RESTful API Development [READ-ONLY]
Stars: ✭ 26 (-3.7%)
Mutual labels:  restful
elivepatch-client
Flexible Distributed Linux Kernel Live Patching
Stars: ✭ 23 (-14.81%)
Mutual labels:  restful
jAlbum
a java web photo manager
Stars: ✭ 45 (+66.67%)
Mutual labels:  restful
REST-Api-with-Slim-PHP
REST API with PHP Slim Framework 3 and MySQL
Stars: ✭ 69 (+155.56%)
Mutual labels:  restful
lumen-boilerplate
Opinionated way to start a new Lumen project.
Stars: ✭ 20 (-25.93%)
Mutual labels:  restful
agile-wroking-backend
AgileWorking 是一个团队协作的微信小程序,此工程为小程序的后台实现
Stars: ✭ 67 (+148.15%)
Mutual labels:  restful
Magento-Extra-RESTful
Many more REST resources for Magento's API
Stars: ✭ 32 (+18.52%)
Mutual labels:  restful
storybook-addon-headless
A Storybook addon to preview content from a headless CMS in components
Stars: ✭ 23 (-14.81%)
Mutual labels:  restful
symfony-angular-todomvc
An implementation of TodoMVC using AngularJS and Symfony REST Edition
Stars: ✭ 94 (+248.15%)
Mutual labels:  restful
idealyard
使用 Vue 和 Flask 搭建前后端分离的 RESTful 个人博客
Stars: ✭ 112 (+314.81%)
Mutual labels:  restful
relax
Relax is a set of tools for modeling, documenting and testing RESTFul APIs
Stars: ✭ 12 (-55.56%)
Mutual labels:  restful
voter-service
The Voter Spring Boot RESTful Web Service, backed by MongoDB, and uses RabbitMQ for IPC
Stars: ✭ 53 (+96.3%)
Mutual labels:  restful
go-restapi-boilerplate
How I write rest api service in go
Stars: ✭ 55 (+103.7%)
Mutual labels:  restful
shik
shik项目基于springcloud微服务搭建的分布式项目。搭建了shik-config云公共配置,通过shik-RA服务注册发现各个模块,通过shik-zuul路由转发与统一接口。并整合了包括mybatis,jpa,jedis,quartz,freemarker和layui等多个模块,支持spring-session二级域名共享session,使用了RESTful方式提供api接口
Stars: ✭ 89 (+229.63%)
Mutual labels:  restful
tensorflow-scala
A Scala binding of TensorFlow for Serving TensorFlow Models (Provides RESTful API)
Stars: ✭ 47 (+74.07%)
Mutual labels:  restful
in-memoriam
Lightweight, super fast, atomic, transactional in-memory database
Stars: ✭ 13 (-51.85%)
Mutual labels:  restful
light-rest-4j
A RESTful framework built on top of light-4j with both Swagger 2.0 and OpenAPI 3.0 supports
Stars: ✭ 113 (+318.52%)
Mutual labels:  restful
tutorial-go-fiber-rest-api
📖 Build a RESTful API on Go: Fiber, PostgreSQL, JWT and Swagger docs in isolated Docker containers.
Stars: ✭ 175 (+548.15%)
Mutual labels:  restful

Rester report card GitHub release GoDoc view Go网络编程群

Fast and concise RESTful web framework based on fasthttp.

Example

package main

import "github.com/henrylee2cn/rester"

type MwCtl struct {
	rester.BaseCtl
	skip bool
}

func (ctl *MwCtl) Any(args struct {
	A string `query:"a"`
}) {
	ctl.Logger().Printf("MwCtl: a=%s", args.A)
	if !ctl.skip {
		ctl.SetUserValue("a", args.A)
	}
}

type EchoCtl struct {
	MwCtl
}

func (ctl *EchoCtl) GET(args struct {
	B []string `query:"b"`
}) {
	ctl.Logger().Printf("EchoCtl: b=%v", args.B)
	ctl.OK(rester.H{
		"a": ctl.UserValue("a"),
		"b": args.B,
	})
}

func main() {
	engine := rester.New()
	engine.DefControl("/", new(EchoCtl))
	engine.Control("/from", func() rester.Controller {
		return &EchoCtl{
			MwCtl{skip: true},
		}
	})
	err := engine.ListenAndServe(":8080")
	if err != nil {
		panic(err)
	}
	// request:
	//  GET http://localhost:8080/?a=x&b=y&b=z
	// log:
	//  - MwCtl: a=x
	//  - EchoCtl: b=[y z]
	// response:
	//  {"a":"x","b":["y","z"]}

	// request:
	//  GET http://localhost:8080/from?a=x&b=y&b=z
	// log:
	//  - MwCtl: a=x
	//  - EchoCtl: b=[y z]
	// response:
	//  {"a":null,"b":["y","z"]}
}

More examples

Binding

binding doc

Controller

Design of method call chain for anonymous field of controller

Struct Method Chain

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