|
пре 4 година | |
---|---|---|
.. | ||
compiled | пре 4 година | |
doc | пре 4 година | |
proto | пре 4 година | |
src | пре 4 година | |
test | пре 4 година | |
.eslintignore | пре 4 година | |
.eslintrc.js | пре 4 година | |
.gitignore | пре 4 година | |
.prettierignore | пре 4 година | |
README.md | пре 4 година | |
compile.sh | пре 4 година | |
package.json | пре 4 година | |
tsconfig.json | пре 4 година |
This package contains protobuf message definitions compiled to Javascript/Typescript used for creating and updating various metadata blobs in the joystream content directory.
Documented in doc folder
For our usecase we wish to re-use same message to create and update subset of fields. For this reason we need the explicit information about wether a field has been set or not and this is only possible with proto v2.
Background: required/optional feilds are deprecated in proto v3
The custom Joystream types such as License have helper methods to construct pre-defined well known values.
Best place to look at are the tests specs
We use simple ISO_639-1 code representation for Language. useful npm package https://www.npmjs.com/package/iso-639-1
.proto
files:pre-requisists:
- [protoc](https://github.com/protocolbuffers/protobuf/releases)
- [golang](https://golang.org/)
- [protoc-gen-doc](https://github.com/pseudomuto/protoc-gen-doc) to generate docs
yarn compile
After compiling proto files
yarn build
yarn test