crate::data::Data::gist_preview fetches gist metadata from DB and
retrieves contents of all the files(see notes #1) stored in the
1) Data::gist_preview uses Data::read_file under the hood, which
currently reads subdirectories up to level 1 depth. Decision has
to be made regarding what to do with level 2 and below
This program supports directories in gists. This patch modifies
Data::read_file to support directory reads. Additionally,
CreateGistRequest is modified to accept files in subdirectories.
When repository contains subdirectories, it will recursively
read all files and return their contents.
Set of known(to me) file modes that Git uses.
GitFileMode::Unsupported is used to take advantage of
num_enum::FromPrimitive. The alternative would have been
num_enum::TryFromPrimitive, which returns errors on unsupported
values. I felt the former was cleaner.
Creates a new files and commits them to "master" branch on the
bare repository allocated for the gist. If multiple files are
supplied, all files are written and committed in a single
Currently, empty commit message is used but this should probably
If filename includes spaces it is escaped. Example "foo bar".txt
is escaped and converted into "foo\ bar".txt.
Reads files already committed to the repository allocated for
the gist. This method expects filenames provided to be already
escaped. Failure would result in file not found errors
Receives gist public ID and returns path of the repository
allocated for the gist. Programmers are expected to use this
method to work on the repositories instead of manually
Escapes spaces in the provided string, "foo bar".txt is
converted to "foo\ bar".txt
- Sign Up
- Sign IN
- Username Exists
- Email Exists
- Account delete
- Password update
- Email update
- Username update
- Get account secret
- Update secret
All routes are implemented with proper error handling and testing
See ./config/default.toml for full list