This website requires JavaScript.
efd83144c4
Pass KeepForHours to index template.
Alexander "Arav" Andreev
2022-02-09 00:48:52 +0400
d6d6c3f461
Update index template.
Alexander "Arav" Andreev
2022-02-09 00:47:43 +0400
abc6dd98a6
Added Share Tech Mono font.
Alexander "Arav" Andreev
2022-02-09 00:21:57 +0400
3907350459
Updated index page.
Alexander "Arav" Andreev
2022-02-09 00:21:39 +0400
0e64ad366b
Added Share Tech Mono, and styled a code tag with it.
Alexander "Arav" Andreev
2022-02-09 00:21:25 +0400
f2f51dd8b1
Fixed a typo in Makefile.
Alexander "Arav" Andreev
2022-02-09 00:20:51 +0400
0293c4e007
Changed version. And fixed backup config path.
Alexander "Arav" Andreev
2022-02-08 23:59:47 +0400
7c9ad434cb
Added run-clear to Makefile.
Alexander "Arav" Andreev
2022-02-08 23:59:24 +0400
bb3a64d334
Chroot for dwelling-upload-clean.
Alexander "Arav" Andreev
2022-02-08 23:12:53 +0400
1212915bf6
Added comments for options. Fixed a typo clean ->clear.
Alexander "Arav" Andreev
2022-02-08 23:09:19 +0400
ad336b03e2
Fixed a typo in config.
Alexander "Arav" Andreev
2022-02-08 23:08:37 +0400
a9a82868ca
Chrooting.
Alexander "Arav" Andreev
2022-02-08 23:08:03 +0400
a78001bf22
Added a chroot option.
Alexander "Arav" Andreev
2022-02-08 22:48:56 +0400
3a1e044b6d
Clean up the code a little.
Alexander "Arav" Andreev
2022-02-08 22:48:05 +0400
4a5f54ee70
Properly form a download URL.
Alexander "Arav" Andreev
2022-02-08 19:21:44 +0400
c884fe8225
Let's check if client is curl and return just a link. And NetworkType() returns a scheme as well now.
Alexander "Arav" Andreev
2022-02-08 19:02:37 +0400
0e46641599
Fixed link to a font.
Alexander "Arav" Andreev
2022-02-08 19:00:55 +0400
ffe60bae85
Host can have :port attached, so it is better to check if string contains rather ends with a particular TLD.
Alexander "Arav" Andreev
2022-02-08 19:00:37 +0400
7b5b9a7ce8
Changed site description.
Alexander "Arav" Andreev
2022-02-08 18:59:23 +0400
e2b2758b34
Removed dir arg from compileTemplates().
Alexander "Arav" Andreev
2022-02-08 18:26:20 +0400
4b8cc9060e
Removed WebDir option.
Alexander "Arav" Andreev
2022-02-08 18:25:54 +0400
424a42b3db
All is embed, so web_dir is not needed anymore.
Alexander "Arav" Andreev
2022-02-08 18:25:32 +0400
381a0dcc98
Jade can work with embed FS, so we do that.
Alexander "Arav" Andreev
2022-02-08 17:46:44 +0400
94437e3bab
Serve embed assets fs instead.
Alexander "Arav" Andreev
2022-02-08 17:46:16 +0400
967e8e6878
Added font Roboto Condensed.
Alexander "Arav" Andreev
2022-02-08 17:45:45 +0400
61dae0e57f
Moved web dir inside internal/handlers for go:embed.
Alexander "Arav" Andreev
2022-02-08 17:44:49 +0400
ebc4442540
New Jade templates.
Alexander "Arav" Andreev
2022-02-08 04:24:20 +0400
907bdeffcc
Updated CSS style.
Alexander "Arav" Andreev
2022-02-08 04:24:04 +0400
e529bfa353
Amber is replaced with Jade.
Alexander "Arav" Andreev
2022-02-08 04:23:38 +0400
b2a5e90245
Remove Amber from dependencies.
Alexander "Arav" Andreev
2022-02-08 04:23:05 +0400
435c32c500
Remove Amber templates.
Alexander "Arav" Andreev
2022-02-08 04:22:41 +0400
29931cca2f
Removed .Hours(). Reduced logClean output.
Alexander "Arav" Andreev
2022-02-08 02:35:48 +0400
338b153aa1
Inotify works when it is an array. Experimentally was found that 16 events is enough.
Alexander "Arav" Andreev
2022-02-08 02:13:15 +0400
bf0595453c
Creating a sparse file, because on file create an inotify will produce an event and dir size will be recalculated, so it can get an actual size.
Alexander "Arav" Andreev
2022-02-08 02:12:01 +0400
ddaf2bb991
Add addtional closeSignal chan for program to wait for.
Alexander "Arav" Andreev
2022-02-08 02:05:38 +0400
0c05ffeef6
Add a space between size and unit.
Alexander "Arav" Andreev
2022-02-08 01:52:27 +0400
8e44aa1477
Oops, forgot to return FSWatcher. And remove that syscall.Read.
Alexander "Arav" Andreev
2022-02-08 00:39:25 +0400
e45bb01f49
Use inotify fs watcher. Also shorten errors msg for loggers instantiation.
Alexander "Arav" Andreev
2022-02-08 00:26:59 +0400
9a4461ac4e
Now instead of computing dir size on every request use a variable that is updated using inotify.
Alexander "Arav" Andreev
2022-02-08 00:25:50 +0400
f7390b0763
Wrap an error message. Return 0 size on error.
Alexander "Arav" Andreev
2022-02-08 00:24:57 +0400
04dedc5f5c
Inotify file system watching for linux.
Alexander "Arav" Andreev
2022-02-08 00:23:40 +0400
6a8da44ee5
Superior 404 template. xDDD
Alexander "Arav" Andreev
2022-02-07 23:10:10 +0400
3b851637e5
Added blocks head and header in base.amber.
Alexander "Arav" Andreev
2022-02-07 23:09:49 +0400
d9adf74608
Handle NotFound error in Download().
Alexander "Arav" Andreev
2022-02-07 23:09:18 +0400
d893a9492b
A NotFound page template.
Alexander "Arav" Andreev
2022-02-07 22:52:20 +0400
de77530962
Set NotFound handler in main.
Alexander "Arav" Andreev
2022-02-07 22:52:01 +0400
8fdf0b61e2
Added NotFound handler. Removed commented out content-type header.
Alexander "Arav" Andreev
2022-02-07 22:51:47 +0400
a5f73e0d60
A new SetNotFoundHandler() method for server.
Alexander "Arav" Andreev
2022-02-07 22:50:46 +0400
8a4104c3d5
Remove all debugging calls.
Alexander "Arav" Andreev
2022-02-07 22:27:34 +0400
be37f74317
Storage size computing moved off to utils.DirectorySize().
Alexander "Arav" Andreev
2022-02-07 22:18:22 +0400
36b0dc7b4d
DirectorySize() func to get size of all files inside.
Alexander "Arav" Andreev
2022-02-07 22:17:40 +0400
7ac1c2ccb9
Removed excessive vars from SplitNetworkAddress().
Alexander "Arav" Andreev
2022-02-07 22:08:02 +0400
ed3b0080a3
Moved substituting user to a func for upload-clear.
Alexander "Arav" Andreev
2022-02-07 22:04:40 +0400
38ec161ae9
Moved substituting user to a func for upload.
Alexander "Arav" Andreev
2022-02-07 22:04:00 +0400
f3685c999e
An octal repr of permissions is supposed to be used here for working correctly.
Alexander "Arav" Andreev
2022-02-07 21:50:38 +0400
f92267a288
Added optional writing to stdout.
Alexander "Arav" Andreev
2022-02-07 21:24:54 +0400
17152581a9
Added ToStdout, Clean, and CleanError to Log.
Alexander "Arav" Andreev
2022-02-07 21:24:25 +0400
c1e565249c
Added stdout, clean, clean_error log options.
Alexander "Arav" Andreev
2022-02-07 21:23:54 +0400
2fb9db01b0
Added a flag for logging to stdout that if set overrides configuration. Substitute to user from config file. Moved logging to own one.
Alexander "Arav" Andreev
2022-02-07 21:23:13 +0400
53bf25364a
Added a flag for logging to stdout that if set overrides configuration.
Alexander "Arav" Andreev
2022-02-07 21:12:30 +0400
d024138593
Add Arhlinux's PKGBUILD.
Alexander "Arav" Andreev
2022-02-07 20:38:34 +0400
3bdc589118
Run services as a dwupload user.
Alexander "Arav" Andreev
2022-02-07 20:37:19 +0400
43c52dd754
Now program must try to run as a user set in a config file. init loggers from new config options.
Alexander "Arav" Andreev
2022-02-07 20:36:41 +0400
96512808a8
All log files now could be in different locations.
Alexander "Arav" Andreev
2022-02-07 20:34:04 +0400
cafb305b76
Logging using a handmade one.
Alexander "Arav" Andreev
2022-02-07 19:42:09 +0400
f5ce98c021
Added a space between timestamp and format.
Alexander "Arav" Andreev
2022-02-07 19:38:20 +0400
7bd462d1d6
Changed logging.
Alexander "Arav" Andreev
2022-02-07 19:35:48 +0400
bde46d93b0
Wrote a simple logger.
Alexander "Arav" Andreev
2022-02-07 19:35:25 +0400
64ab7e5d40
Add defer Close() for configFile. A more clear error message for yaml decoder. And a comment for SplitNetworkAddress method.
Alexander "Arav" Andreev
2022-02-07 18:21:40 +0400
c3e81c61d7
Add log directory into config file.
Alexander "Arav" Andreev
2022-02-07 18:17:12 +0400
264e403882
Handlers.
Alexander "Arav" Andreev
2022-02-07 04:49:21 +0400
473b23cbb0
Amber templates.
Alexander "Arav" Andreev
2022-02-07 04:49:10 +0400
7fd1fe0c21
Add favicon.sbg.
Alexander "Arav" Andreev
2022-02-07 04:48:54 +0400
532e786cae
Add main.css.
Alexander "Arav" Andreev
2022-02-07 04:48:44 +0400
9955e3cd28
Updated ConvertFileSize(). Added TiB suffix.
Alexander "Arav" Andreev
2022-02-07 04:48:33 +0400
db361bb509
Prefix replaced by Suffix. Added NetworkType().
Alexander "Arav" Andreev
2022-02-07 04:48:00 +0400
c5e9b48de7
Changed config struct.
Alexander "Arav" Andreev
2022-02-07 04:47:26 +0400
48545f0781
Changed config format.
Alexander "Arav" Andreev
2022-02-07 04:47:07 +0400
65ed3ec924
Updated ServeStatic and GET file request handler and path.
Alexander "Arav" Andreev
2022-02-07 04:46:46 +0400
d4e7a7fa25
Fixed flags parsing. Added more handlers.
Alexander "Arav" Andreev
2022-02-06 15:25:27 +0400
5f9485fe3c
Added ServeStatic() method. GetURLParams now returns parameter itself, and renamed to GetURLParam.
Alexander "Arav" Andreev
2022-02-06 15:24:37 +0400
8341fba20f
Utility for my infrastructure. Added MainSite function.
Alexander "Arav" Andreev
2022-02-06 15:23:32 +0400
bc83e033a1
Added Amber template engine.
Alexander "Arav" Andreev
2022-02-06 15:22:37 +0400
041fcdf2f4
-config option changed to -conf.
Alexander "Arav" Andreev
2022-02-06 15:22:14 +0400
9b5ae547cc
Snake case to camel case. Fixed argument parsing. Added a statistics log line to tell how much files gets deleted.
Alexander "Arav" Andreev
2022-02-06 03:03:01 +0400
10a64306a3
Snake case to camel case.
Alexander "Arav" Andreev
2022-02-06 03:01:16 +0400
71c3eb56b6
Utility function to convert size ib bytes to its corresponding biggest unit.
Alexander "Arav" Andreev
2022-02-06 03:00:32 +0400
bf4f41c85e
Added .gitignore, .keep file to preserve bin directory and go.sum file.
Alexander "Arav" Andreev
2022-02-06 02:28:33 +0400
8f9f4f0e30
Added use of configuratuin param KeepForHours to decide if file is to be deleted.
Alexander "Arav" Andreev
2022-02-06 02:26:55 +0400
d4852ee6dd
Initial commit.
Alexander "Arav" Andreev
2022-02-06 02:22:23 +0400