Introducing Warehouse - the store for files shared by the user.

New endpoints:
/warehouse/create               Create a file in the warehouse
/warehouse/create/path          Create a file in the warehouse via copy
/warehouse/read                 Read a file in the warehouse
/warehouse/delete               Delete a file in the warehouse
This commit is contained in:
Kleissner
2021-10-13 01:40:58 +02:00
parent 956e6dd76b
commit cec070b740
8 changed files with 590 additions and 14 deletions

View File

@@ -62,6 +62,10 @@ func Start(ListenAddresses []string, UseSSL bool, CertificateFile, CertificateKe
Router.HandleFunc("/download/start", apiDownloadStart).Methods("GET")
Router.HandleFunc("/download/status", apiDownloadStatus).Methods("GET")
Router.HandleFunc("/download/action", apiDownloadAction).Methods("GET")
Router.HandleFunc("/warehouse/create", apiWarehouseCreateFile).Methods("POST")
Router.HandleFunc("/warehouse/create/path", apiWarehouseCreateFilePath).Methods("GET")
Router.HandleFunc("/warehouse/read", apiWarehouseReadFile).Methods("GET")
Router.HandleFunc("/warehouse/delete", apiWarehouseDeleteFile).Methods("GET")
for _, listen := range ListenAddresses {
go startWebServer(listen, UseSSL, CertificateFile, CertificateKey, Router, "API", TimeoutRead, TimeoutWrite)