ups is a Go package for implementing http microservices using Protocol Buffers.
Protocol Buffers: https://github.com/golang/protobuf
JSON is also supported using https://github.com/golang/protobuf/jsonpb
syntax = "proto3";
message HelloRequest {
string name = 1;
}
message HelloResponse {
string text = 1;
}
http.Handle("/hello", ups.UPS(func(req *HelloRequest) *HelloResponse {
return &HelloResponse{Text: "Hello, " + req.Name + "!"}
}))