github.com/mckael/restic@v0.8.3/internal/repository/doc.go (about)

     1  // Package repository implements a restic repository on top of a backend. In
     2  // the following the abstractions used for this package are listed. More
     3  // information can be found in the restic design document.
     4  //
     5  // File
     6  //
     7  // A file is a named handle for some data saved in the backend. For the local
     8  // backend, this corresponds to actual files saved to disk. Usually, the SHA256
     9  // hash of the content is used for a file's name (hexadecimal, in lower-case
    10  // ASCII characters). An exception is the file `config`. Most files are
    11  // encrypted before being saved in a backend. This means that the name is the
    12  // hash of the ciphertext.
    13  //
    14  // Blob
    15  //
    16  // A blob is a number of bytes that has a type (data or tree). Blobs are
    17  // identified by an ID, which is the SHA256 hash of the blobs' contents. One or
    18  // more blobs are bundled together in a Pack and then saved to the backend.
    19  // Blobs are always encrypted before being bundled in a Pack.
    20  //
    21  // Pack
    22  //
    23  // A Pack is a File in the backend that contains one or more (encrypted) blobs,
    24  // followed by a header at the end of the Pack. The header is encrypted and
    25  // contains the ID, type, length and offset for each blob contained in the
    26  // Pack.
    27  //
    28  package repository