Commit graph

11 commits

Author SHA1 Message Date
Gabriel Simmer dad608edbc Embed web assets into binary.
Theorectically, this means that the entire binary is now self contained,
minus the need for the config file. Ripped out the redundant static file
directives and root handler while I was at it.
2021-05-23 17:31:57 +01:00
Gabriel Simmer 396c5914f6
Renaming application from "NAS" to "Sliproad". 2020-04-24 09:22:33 +01:00
Gabriel Simmer c559f28ebb
Authentication handling with Keycloak.
Implemented a rudementary authentication method using Keycloak as the
IdP - still very barebones, but login does function. Next steps will
include a Docker Compose file (most likely) for managing this
integration. The application will work fine without setting up the
integration however, and will just throw a warning message. Setup should
be relatively self explanatory, but some documentation is TBD, along
with some automation when spinning up for the first time. Still not
super happy with the implementation.
2020-04-16 23:49:35 +01:00
Gabriel Simmer e1b8c50d55
Delete files and create directories.
Added DELETE handler to files endpoint for deleting files and
directories, along with new handling for creating directories, as
specified with the `X-NAS-Type` header - if this is set to "directory",
a new directory is created with the path of the request. Otherwise, an
attempt to parse the file from form data is done as before.

Also added buttons to interact with the new functionality in the default
frontend.
2020-04-12 22:10:51 +01:00
Gabriel Simmer 641e015ca6
Simplify router, remove common and authentication.
Removed common package, since it was largely useless and instead
integrated what I could into the router package. Should simplify things
going forward, but we can always split this out later. Also completely
removed authentication for the time being - want to consider other
options for this.
2020-04-02 20:50:39 +01:00
Gabriel Simmer 49dba732d3
Implement Setup() function for providers, cleanup
Implemented a much-needed Setup() function for providers to implement,
which (as demonstrated in the backblaze provider) allows for
authentication in advance of needing to make calls to remote locations.
This could also be used to create a directory or perform some other
sanity check required for the provider to work. So far, haven't noticed
any performance impacts from this approach, besides not needing to auth
each time we make a request.
2020-03-21 00:31:24 +00:00
Gabriel Simmer c2171d00c9
io.Copy rather than ioutil.ReadAll
Should offer some speed boost, copying the file contents rather than
reading it all to memory then writing it back out. Should theoretically
be able to handle larger files as well, although some benchmarks
are TBD around filesize limits.
2020-03-19 10:13:38 +00:00
Gabriel Simmer bf1f06b79c Refactoring file storage to enable different providers
Expanding this as we go, currently have POC Backblaze B2 support and
basic 'disk' provider as well. Still WIP, but functional for the most
part. Also moving to simplified YAML configuration.

Overall, simplifying things to be extensible down the line. Still work
to be done, but coming along nicely.
2020-02-24 18:07:47 +00:00
Gabriel Simmer 6524726357 Directory listing in new frontend 2019-07-27 21:43:05 -07:00
Gabriel Simmer 9ab5f248a9 Rewriting frontend in react, refactoring of routes. 2019-07-13 20:19:28 -07:00
Gabriel Simmer 7b091438d4
Initial commit of basic functional file listing 2019-02-24 00:25:39 -08:00