Leszek Wiesner 924da13a98 @joystream/metadata-protobuf - fix linter warnings 3 年 前
..
compiled 33938987b9 Metadata & mappings updates (DistributionBucketOperatorRemoved, DistributionBucketFamilyMetadataSet) 3 年 前
doc 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
proto 33938987b9 Metadata & mappings updates (DistributionBucketOperatorRemoved, DistributionBucketFamilyMetadataSet) 3 年 前
scripts 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
src 924da13a98 @joystream/metadata-protobuf - fix linter warnings 3 年 前
test 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
.eslintignore 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
.eslintrc.js 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
.gitignore 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
.prettierignore 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
README.md 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
compile.sh 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
generate-md-doc.sh 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前
package.json 33938987b9 Metadata & mappings updates (DistributionBucketOperatorRemoved, DistributionBucketFamilyMetadataSet) 3 年 前
tsconfig.json 34a3f88e90 Add metadata-protobuf package + storage v2 metadata standards 3 年 前

README.md

Joystream Content Directory Metadata Library

This package contains protobuf message definitions compiled to Javascript/Typescript used for creating and updating various metadata blobs in the joystream content directory.

Message Specs

Documented in doc folder

Choice of protobuf protocol v2

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

Helper methods

The custom Joystream types such as License have helper methods to construct pre-defined well known values.

Example code:

Best place to look at are the tests specs

Opaque types

We use simple ISO_639-1 code representation for Language. useful npm package https://www.npmjs.com/package/iso-639-1

Building the package

Building will compile the protofiles and build the library from source.

  • pre-requisists for compiling protofiles:

  • pre-requisists for generating documentation:

Generating docs

yarn generate-docs

Tests

yarn test