Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add/get folders #88

Open
sergey-shandar opened this issue Oct 16, 2023 · 1 comment
Open

add/get folders #88

sergey-shandar opened this issue Oct 16, 2023 · 1 comment
Milestone

Comments

@sergey-shandar
Copy link
Contributor

sergey-shandar commented Oct 16, 2023

We don't have to use TAR.

{
  "fileCatalog": {
     "a/fileA.txt": "cwjisj449...",
     "b/c/file.exe": {
        "ref": "dijoi3j....",
        "mode": ["executable", ....],
     },
     "a/c": {
         // "type": "directory"
         "dirFiles": "dsdiouh48ds....",
     }
  },

  /// .......
  "signature": ....
  "timestamp": ....
  "message": ...
  "previous": ...
}
@sergey-shandar sergey-shandar added this to the 23.Q4.M1 milestone Oct 16, 2023
@sergey-shandar
Copy link
Contributor Author

sergey-shandar commented Nov 14, 2023

flat structure:

{
   "fileCatalog": {
     "a.txt": "ddhash...", // file
     "b.txt/": "dddsa...", // directory
   }
}

Default is a hash.

If we need additional attributes, like 'executable', 'mime-type'?, then we use an object instead of string. For example:

{
   "fileCatalog": {
     "a.txt": "ddhash...", // file
     "b.txt/": {
        "ref": "dddsa...", 
        "attributes": ["executable", "read-only"],
     }
   }
}

Extension for the format:

Data inside the object:

{
   "fileCatalog": {
     "a.txt": "ddhash...", // file
     "b.txt/": {
        "data": {
           "a": { "data": "...base64......." }
        },
        "attributes": ["executable", "read-only"],
     }
   }
}

Full path

{
   "fileCatalog": {
     "a.txt": "ddhash...", // file
     "c/d/r/b.txt/": {
        "data": {
           "a": { "data": "...base64......." }
        },
        "attributes": ["executable", "read-only"],
     }
   }
}

Different hash formats:

{
   "defaultHashFormat": "cdt0",
   "fileCatalog": {
     "a.txt": "sha256:ddhash...", // file
     "c/d/r/b.txt/": {
        "data": {
           "a": { "data": "...base64......." }
        },
        "attributes": ["executable", "read-only"],
     }
   }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant