Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use proto generated struct for Executions #1281

Closed
5 tasks
NicolasMahe opened this issue Aug 31, 2019 · 0 comments · Fixed by #1296
Closed
5 tasks

Use proto generated struct for Executions #1281

NicolasMahe opened this issue Aug 31, 2019 · 0 comments · Fixed by #1296
Assignees

Comments

@NicolasMahe
Copy link
Member

The Engine should use directly the struct generated by protobuf instead of the current by-hand struct.

To do:

  • replace the current by-hand struct by the generated one (make protoc generates in the right folder)
  • add hash and validation tags (gogoproto.moretags):
    string key = 4 [
    (gogoproto.moretags) = 'hash:"name:1" validate:"printascii"'
    ];
  • set gogoproto.customtype for hashes to hash.Hash:
    bytes hash = 10 [
    (gogoproto.moretags) = 'validate:"required"',
    (gogoproto.customtype) = "github.com/mesg-foundation/engine/hash.Hash",
    (gogoproto.nullable) = false
    ];
  • remove mapping function
  • update codebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants