mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-17 02:47:51 +01:00
Add TypeEbook. Clarify documentation on File Type and File Format.
This commit is contained in:
@@ -9,8 +9,8 @@ File records:
|
||||
Offset Size Info
|
||||
0 32 Hash blake3 of the file content
|
||||
32 16 File ID
|
||||
48 1 File Type (low-level)
|
||||
49 2 File Format (high-level)
|
||||
48 1 File Type
|
||||
49 2 File Format
|
||||
51 8 File Size
|
||||
59 2 Count of Tags
|
||||
61 ? Tags
|
||||
@@ -54,8 +54,8 @@ const (
|
||||
type BlockRecordFile struct {
|
||||
Hash []byte // Hash of the file data
|
||||
ID uuid.UUID // ID
|
||||
Type uint8 // Type (low-level)
|
||||
Format uint16 // Format (high-level)
|
||||
Type uint8 // File Type
|
||||
Format uint16 // File Format
|
||||
Size uint64 // Size of the file data
|
||||
TagsRaw []BlockRecordFileTag // Tags to provide additional metadata
|
||||
TagsDecoded []interface{} // Decoded tags. See FileTagX structures.
|
||||
|
||||
@@ -8,7 +8,7 @@ Definition of all recognized file formats. This file is likely being updated mor
|
||||
|
||||
package core
|
||||
|
||||
// Low-level content types of file data. This is a copy from Intelligence X.
|
||||
// General content types of data.
|
||||
const (
|
||||
TypeBinary = iota // Binary/unspecified
|
||||
TypeText // Plain text
|
||||
@@ -20,9 +20,10 @@ const (
|
||||
TypeContainer // Container files like ZIP, RAR, TAR
|
||||
TypeCompressed // Compressed files like GZ, BZ
|
||||
TypeFolder // Virtual folder
|
||||
TypeEbook // Ebook
|
||||
)
|
||||
|
||||
// High-level file types. New ones may be added as required.
|
||||
// File formats. New ones may be added to the list as required.
|
||||
const (
|
||||
FormatBinary = iota // Binary/unspecified
|
||||
FormatPDF // PDF document
|
||||
|
||||
@@ -123,8 +123,8 @@ type apiFileTagRaw struct {
|
||||
type apiBlockRecordFile struct {
|
||||
ID uuid.UUID `json:"id"` // Unique ID.
|
||||
Hash []byte `json:"hash"` // Blake3 hash of the file data
|
||||
Type uint8 `json:"type"` // Type (low-level)
|
||||
Format uint16 `json:"format"` // Format (high-level)
|
||||
Type uint8 `json:"type"` // File Type. For example audio or document. See TypeX.
|
||||
Format uint16 `json:"format"` // File Format. This is more granular, for example PDF or Word file. See FormatX.
|
||||
Size uint64 `json:"size"` // Size of the file
|
||||
Folder string `json:"folder"` // Folder, optional
|
||||
Name string `json:"name"` // Name of the file
|
||||
|
||||
@@ -175,8 +175,8 @@ type apiBlockRecordProfileBlob struct {
|
||||
type apiBlockRecordFile struct {
|
||||
ID uuid.UUID `json:"id"` // Unique ID.
|
||||
Hash []byte `json:"hash"` // Blake3 hash of the file data
|
||||
Type uint8 `json:"type"` // Type (low-level)
|
||||
Format uint16 `json:"format"` // Format (high-level)
|
||||
Type uint8 `json:"type"` // File Type. For example audio or document. See TypeX.
|
||||
Format uint16 `json:"format"` // File Format. This is more granular, for example PDF or Word file. See FormatX.
|
||||
Size uint64 `json:"size"` // Size of the file
|
||||
Folder string `json:"folder"` // Folder, optional
|
||||
Name string `json:"name"` // Name of the file
|
||||
|
||||
Reference in New Issue
Block a user