Go to file
2017-09-28 11:43:04 +02:00
cmd codegen update 2017-07-03 15:17:27 +02:00
config inline testyaml fixed 2017-07-03 15:17:07 +02:00
demo Change comment information for gotsrpc to conform to generated file std 2017-09-28 11:43:04 +02:00
prometheus added size to instrumentation 2017-01-27 17:18:23 +01:00
.gitignore Add .idea to gitignore 2017-09-28 11:42:11 +02:00
.goreleaser.yml Add goreleaser for gotsrpc configuration 2017-07-07 14:36:47 +02:00
.travis.yml Update travisfile to only listen to master changes 2017-07-07 15:01:57 +02:00
build.go fixed import order in commonjs 2017-09-08 12:06:20 +02:00
client.go added configurable transport 2016-12-14 13:44:16 +01:00
code.go added support for constants, fixed support for map and array types 2016-09-12 12:16:38 +02:00
glide.lock glide update 2017-08-01 15:22:50 +02:00
glide.yaml glide update 2017-08-01 15:22:50 +02:00
go.go Change comment information for gotsrpc to conform to generated file std 2017-09-28 11:43:04 +02:00
gorpc.go fixed types 2016-12-17 15:55:32 +01:00
gotsrpc_test.go improved interface{} support and refactored arg loading 2017-07-25 08:46:42 +02:00
gotsrpc.go merged slice-args and added test for arg loading 2017-07-03 17:27:25 +02:00
Makefile Add travis configuration for automated builds and update makefile 2017-07-07 14:43:48 +02:00
model.go added helper methods 2017-07-24 20:14:04 +02:00
php.go Change comment information for gotsrpc to conform to generated file std 2017-09-28 11:43:04 +02:00
reader_test.go improved interface{} support and refactored arg loading 2017-07-25 08:46:42 +02:00
README.md docs aond demo update 2017-07-03 15:36:01 +02:00
servicereader.go implemented ServiceList to get determistically sorted code 2017-07-03 16:51:18 +02:00
stats.go added response and request size to stats 2017-01-27 16:59:03 +01:00
typereader.go reading of interface types 2017-07-24 19:53:38 +02:00
typescript_test.go added support for constants, fixed support for map and array types 2016-09-12 12:16:38 +02:00
typescript.go implemented ServiceList to get determistically sorted code 2017-07-03 16:51:18 +02:00

Go / TypeScript and Go / Go RPC

gotsrpc gotsrpc.yml

Will generate client and server side go and TypeScript code. Have fun!

config expamples

commonjs

demo/config.yml

---
modulekind: commonjs
targets:
  demo:
    services:
      /service/foo: Foo
      /service/demo: Demo
    package: github.com/foomo/gotsrpc/demo
    out: /tmp/test.ts
    gorpc:
      - Foo
      - Demo
    tsrpc:
      - Foo
      - Demo

mappings:
  github.com/foomo/gotsrpc/demo:
    out: /tmp/test-files-demo.ts
  github.com/foomo/gotsrpc/demo/nested:
    out: /tmp/test-files-demo-nested.ts
...

oldschool TypeScript

demo/config.yml

---
targets:
  demo:
    module: GoTSRPC.Demo
    services:
      /service/foo: Foo
      /service/demo: Demo
    package: github.com/foomo/gotsrpc/demo
    out: /tmp/test.ts
    gorpc:
      - Foo
      - Demo
    tsrpc:
      - Foo
      - Demo

mappings:
  github.com/foomo/gotsrpc/demo:
    module: GoTSRPC.Demo
    out: /tmp/test-files-demo.ts
  github.com/foomo/gotsrpc/demo/nested:
    module: GoTSRPC.Demo.Nested
    out: /tmp/test-files-demo-nested.ts
...