Skip to content

Commit

Permalink
fix: force protobuf (un)marshal methods generation in go to avoid usi…
Browse files Browse the repository at this point in the history
…ng reflect (#3092)

* fix: fix useless custom codec set in blackbox test

Signed-off-by: Guillaume Louvigny <glouvigny@users.noreply.github.com>
Signed-off-by: Guilhem Fanton <guilhem.fanton@gmail.com>
Co-authored-by: Guilhem Fanton <guilhem.fanton@gmail.com>
  • Loading branch information
glouvigny and gfanton committed Feb 12, 2021
1 parent 5934055 commit 4e57389
Show file tree
Hide file tree
Showing 12 changed files with 9,901 additions and 409 deletions.
4 changes: 4 additions & 0 deletions api/bertyaccount.proto
Expand Up @@ -8,6 +8,10 @@ import "errcode.proto";

option go_package = "berty.tech/berty/go/pkg/bertyaccount";

option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;

service AccountService {
/// Account

Expand Down
6 changes: 6 additions & 0 deletions api/bertybridge.proto
Expand Up @@ -2,10 +2,16 @@ syntax = "proto3";

package berty.bridge.v1;

import "gogoproto/gogo.proto";
import "errcode.proto";

option go_package = "berty.tech/berty/go/pkg/bertybridge";

option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;


// BridgeService used to create advanced grpc transport
// /!\ UNARY SUPPORT ONLY /!\
service BridgeService {
Expand Down
5 changes: 5 additions & 0 deletions api/bertyreplication.proto
Expand Up @@ -2,10 +2,15 @@ syntax = "proto3";

package berty.protocol.v1;

import "gogoproto/gogo.proto";
import "protocoltypes.proto";

option go_package = "berty.tech/berty/go/pkg/bertyprotocol";

option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;

// ReplicationService
service ReplicationService {
// ReplicateGroup
Expand Down
3 changes: 3 additions & 0 deletions api/errcode.proto
Expand Up @@ -7,6 +7,9 @@ import "gogoproto/gogo.proto";
option go_package = "berty.tech/berty/go/pkg/errcode";

option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;

enum ErrCode {
//----------------
Expand Down
8 changes: 4 additions & 4 deletions docs/gen.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions go/gen.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e57389

Please sign in to comment.