Skip to content

Releases: foomo/gotsrpc

v2.15.0-rc.2

23 Mar 09:50
2eb1ee0

Choose a tag to compare

v2.15.0-rc.2 Pre-release
Pre-release

What's Changed

  • feat: 2.14.1 by @franklinkim in #96
  • chore(deps): bump docker/setup-qemu-action from 3 to 4 by @dependabot[bot] in #95
  • sec(deps): bump github.com/buger/jsonparser from 1.1.1 to 1.1.2 in the security group across 1 directory by @dependabot[bot] in #97

Full Changelog: v2.15.0-rc.1...v2.15.0-rc.2

v2.14.1

23 Mar 09:48
163a61c

Choose a tag to compare

What's Changed

  • chore(deps): bump docker/setup-buildx-action from 3 to 4 by @dependabot[bot] in #92
  • feat: 2.14.1 by @franklinkim in #96
  • chore(deps): bump docker/setup-qemu-action from 3 to 4 by @dependabot[bot] in #95
  • sec(deps): bump github.com/buger/jsonparser from 1.1.1 to 1.1.2 in the security group across 1 directory by @dependabot[bot] in #97

Full Changelog: v2.14.0...v2.14.1

v2.15.0-rc.1

20 Mar 11:41
0a39ea9

Choose a tag to compare

v2.15.0-rc.1 Pre-release
Pre-release

What's Changed

  • chore(deps): bump docker/setup-buildx-action from 3 to 4 by @dependabot[bot] in #92

Full Changelog: v2.14.0...v2.15.0-rc.1

v2.14.0

16 Mar 15:28
48cddd8

Choose a tag to compare

What's Changed

Full Changelog: v2.13.0...v2.14.0

v2.14.0-rc.1

13 Mar 16:22
d0bf300

Choose a tag to compare

v2.14.0-rc.1 Pre-release
Pre-release

What's Changed

Full Changelog: v2.13.0...v2.14.0-rc.1

v2.13.0

07 Nov 09:41
31d2c58

Choose a tag to compare

What's Changed

  • chore(deps): bump actions/setup-node from 5 to 6 by @dependabot[bot] in #77
  • fix: resolve variable name conflicts in GoRPC client generation by @quwe66 in #80

Context parameter

type Service interface {
  Hello(ctx context.Context, args string) string
}

Which will automatically pass the r.Context() through.

client.hello("foomo").then((err) => {
  console.log(err);
});

Errors can now be passed to the frontend

Add the generic error mapping

mappings:
  github.com/foomo/gotsrpc/v2:
    out: ./client/src/service-error.ts
    structs:
      - github.com/foomo/gotsrpc/v2.Error
type Service interface {
  TypedError(ctx context.Context, msg string) error
  CustomError(ctx context.Context, msg string) error
  WrappedError(ctx context.Context, msg string) error
  StandardError(ctx context.Context, msg string) error
}
// {"m":"something went wrong: ups","p":"errors","t":"*errors.errorString","d":{}}
client.standardError("ups").then((err) => {
  console.log(JSON.stringify(err));
});

// {"m":"something","p":"github.com/pkg/errors","t":"*errors.fundamental","d":{}}
client.typedError("ups").then((err) => {
  console.log(JSON.stringify(err));
});

// {"m":"ups","p":"github.com/pkg/errors","t":"*errors.withMessage","d":{},"c":{"m":"something","p":"github.com/pkg/errors","t":"*errors.fundamental","d":{}}}
client.wrappedError("ups").then((err) => {
  console.log(JSON.stringify(err));
});

// {"m":"ups","p":"github.com/foomo/gotsrpc/v2/example/context/service","t":"*service.MyError","d":{"payload":"ups"},"c":{"m":"something","p":"github.com/pkg/errors","t":"*errors.fundamental","d":{}}}
client.customError("ups").then((err) => {
  console.log(JSON.stringify(err));
});

New Contributors

Full Changelog: v2.12.0...v2.13.0

v2.12.0

05 Nov 11:16
1647155

Choose a tag to compare

What's Changed

Full Changelog: v2.11.0...v2.12.0

v2.12.0-rc.1

19 Sep 07:06
e58d03f

Choose a tag to compare

v2.12.0-rc.1 Pre-release
Pre-release

Full Changelog: v2.11.0...v2.12.0-rc.1

v2.11.0

19 Sep 04:50
6c126a5

Choose a tag to compare

What's Changed

Full Changelog: v2.10.0...v2.11.0

v2.10.0

03 Jun 14:57
b605ee6

Choose a tag to compare

What's Changed

Full Changelog: v2.9.2...v2.10.0