github.com/reddec/jsonrpc2
JSON-RPC 2.0 supporting library Main object - Router doesn't need any kind of initialization. Just use `var router Router`. There are two ways how to register service: dynamical and static. This is recommended way. jsonrpc2-gen tool will generate type-safe wrapper with positional and named arguments support. Tool can be installed by `go get -v github.com/reddec/jsonrpc2/cmd/...` or by other method (see README.md) For example: Assume you have an interface file (`user.go`) like this: Just invoke `jsonrpc2-gen -i user.go -o user_gen.go -I User -p abc` You will get `user_gen.go` file like that: By using RegisterPositionalOnly or RegisterNamedOnly. This two functions are heavily relying on reflection so don't use in a high-load environment. Helper `Handler` can expose JSON-RPC over HTTP with supported methods POST, PUT, PATCH. For other methods server will return MethodNotAllowed (405)
proxy.golang.org
v0.1.21
over 5 years ago
22
4
3
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/reddec/jsonrpc2
spec |
| License | MPL-2.0 |
| Namespace | github.com/reddec |
| First Release | about 6 years ago |
| Last Synced | 25 days ago |