• Patrick Bajao's avatar
    Refactor upload destinations · 95d9c5fd
    Patrick Bajao authored
    In https://gitlab.com/gitlab-org/gitlab/-/issues/351657, the
    goal is to document and refactor workhorse code related to
    object storage upload. This is to improve readability and
    help new contributors.
    
    This include the following changes:
    - Created `destination` package to consolidate upload destination
      related logic. Used this name so we're consistent with the
      language we use for upload destination.
    - Moved `objectstore` and `filestore` packages under destination
      package since these are the store used as destination for object
      storage upload.
    - Made `filestore` package specific for storing to disk. This is to
      clarify that `filestore` package is responsible for uploading to
      disk instead of its previous responsibilities.
    - Renamed `SaveFileFromReader` to `Upload` to be consistent with the
      language of object storage upload. The previous name is a bit too
      tied to implementation details.
    - Renamed `SaveFileOpts` to `UploadOpts` to be consistent with language.
    - Removed `SaveFileFromDisk` as it's not being used at all.
    95d9c5fd
uploader.go 2.83 KB