mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-15 03:03:08 +08:00

*** THIS IS A BREAKING CHANGE *** as per [1]: "Required is forever" Nevertheless this seems like a good idea at this time: there are no known producers ( nor consumers ) of MetaData nodes, and the current requirement of MimeType has an extremely narrow application scope. This change could very well be rejected in lieu of implementing a new type of node ( e.g. TheRealMetadata ) in the DataType enum. Based on https://github.com/ipfs/go-ipfs/issues/3451#issuecomment-264246718 License: MIT Signed-off-by: Mib Kd743naq <mib.kd743naq@gmail.com> [1] https://developers.google.com/protocol-buffers/docs/proto#specifying-field-rules
21 lines
301 B
Protocol Buffer
21 lines
301 B
Protocol Buffer
package unixfs.pb;
|
|
|
|
message Data {
|
|
enum DataType {
|
|
Raw = 0;
|
|
Directory = 1;
|
|
File = 2;
|
|
Metadata = 3;
|
|
Symlink = 4;
|
|
}
|
|
|
|
required DataType Type = 1;
|
|
optional bytes Data = 2;
|
|
optional uint64 filesize = 3;
|
|
repeated uint64 blocksizes = 4;
|
|
}
|
|
|
|
message Metadata {
|
|
optional string MimeType = 1;
|
|
}
|