github.com/qri-io/qri@v0.10.1-0.20220104210721-c771715036cb/repo/repo.fbs (about) 1 // IDL file for flatbufer repo data. Flatbuffers can be used for storage and as 2 // a wire protocol, so they're defined in the repo "interface package" 3 // currently only Refstore info is defined here. We may choose to add other 4 // repo data structures here in the future. 5 namespace repo_fbs; 6 7 // Datasetref is a reference to a dataset 8 table DatasetRef { 9 // peer that owns a dataset 10 peername: string; 11 // immutable identifier for this user 12 profileID: string; 13 // name of the dataset 14 name: string; 15 // immutable dataset path. usually /ipfs/Qm... 16 path: string; 17 // path to linked dataset directory on the local filesystem 18 fsiPath: string; 19 // weather or not this dataset is publically listed 20 published: bool; 21 } 22 23 // flatbuffers don't (currently) support using a vector as a root type 24 // in an ideal world we'd just `root_type [DatasetRef]`. On the upside if we 25 // ever needed to track state scoped to a list of references, we can add fields 26 // here to do so 27 // issue: https://github.com/google/flatbuffers/issues/4854 28 table Reflist { 29 refs:[DatasetRef]; 30 } 31 32 // setting file_identifier adds a "magic number" to bytes 4-7 to use as a 33 // sanity check for a "Qri FlatBuffer File". As our use of flatbuffers grows 34 // this file identifier should remain as the top level identifier for all 35 // qri flatbuffer schemas 36 file_identifier "QFBF"; 37 38 // for our use this is mainly an annotation. this file extension for a 39 // "qri flatbuffer" file should be .qfb 40 file_extension "qfb"; 41 42 root_type Reflist;