clay

module
v3.0.0-...-45d7701 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2023 License: MIT

README

clay

Build Status

Minimal server platform for gRPC and REST+Swagger APIs in Go

Using clay you can automatically spin up HTTP handlers for your gRPC server with complete Swagger defs with a few lines of code.

This project provides the HTTP+Swagger handler generator and optional server that you can use to serve your handlers via any protocol.

protobuf generator compatibility

clay/v3 uses new protobuf generator google.golang.org/protobuf. If you're using old generator (golang/protobuf and protoc-gen-go <v1.20.0) then consider using clay/v2 instead.

Read more about this migration here: https://blog.golang.org/protobuf-apiv2 .

Migration from v2

Migration from v2 to v3 is intended to be as straightforward as possible - just replace generator v2 with v3 and you're good to go. Don't forget to change your protobuf generator as well - see previous section for details.

NB: to use new protobuf generator, you need to change go_package directives to be an absolute module path (i.e. github.com/foo/bar/baz instead of baz).

Requirements

Since new Semantic Import Versioning is used, you are required to use Go1.10.3+

How?

Check out an example server for a quick start if you're experienced with gRPC, or dive into step-by-step docs for a full guide.

Contributing

You may contribute in several ways like creating new features, fixing bugs, improving documentation and/or examples using GitHub pull requests.

Directories

Path Synopsis
cmd
protoc-gen-goclay/third-party/grpc-gateway/internals/codegenerator
Package codegenerator contains reusable functions used by the code generators.
Package codegenerator contains reusable functions used by the code generators.
protoc-gen-goclay/third-party/grpc-gateway/internals/generator
Package generator provides an abstract interface to code generators.
Package generator provides an abstract interface to code generators.
protoc-gen-goclay/third-party/grpc-gateway/protoc-gen-openapiv2/internals/genopenapi
Package genopenapi provides a code generator for OpenAPI v2.
Package genopenapi provides a code generator for OpenAPI v2.
Package log is DEPRECATED, left for backwards compatibility.
Package log is DEPRECATED, left for backwards compatibility.
log
middlewares/mwgrpc
Package mwgrpc provides common gRPC middlewares.
Package mwgrpc provides common gRPC middlewares.
httpruntime/httpmw
Package httpmw provides middlewares that are automatically used by the generated code.
Package httpmw provides middlewares that are automatically used by the generated code.
middlewares/mwcommon
Package mwcommon is DEPRECATED, left for backwards compatibility.
Package mwcommon is DEPRECATED, left for backwards compatibility.
middlewares/mwgrpc
Package mwgrpc is DEPRECATED, left for backwards compatibility.
Package mwgrpc is DEPRECATED, left for backwards compatibility.
middlewares/mwhttp
Package mwhttp is DEPRECATED, left for backwards compatibility.
Package mwhttp is DEPRECATED, left for backwards compatibility.
server
Package server is DEPRECATED, left for backwards compatibility.
Package server is DEPRECATED, left for backwards compatibility.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL