all
3
Downloads/Deluge/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Downloads/Deluge/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL :
|
||||
|
||||
# Deluge
|
||||
|
||||
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Deluge
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Deluge
|
||||
```
|
||||
|
||||
## Modifier la configuration de Deluge
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Deluge
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Deluge
|
||||
|
||||
Pour utiliser Deluge tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Deluge avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Deluge.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Downloads/Deluge/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
8
Downloads/Deluge/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
#### NETWORKS
|
||||
networks:
|
||||
back_network:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
|
||||
#### SERVICES
|
||||
services:
|
BIN
Downloads/Deluge/img/logo-Deluge.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
3
Downloads/Exatorrent/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Downloads/Exatorrent/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL :
|
||||
|
||||
# Exatorrent
|
||||
|
||||
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Exatorrent
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Exatorrent
|
||||
```
|
||||
|
||||
## Modifier la configuration de Exatorrent
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Exatorrent
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Exatorrent
|
||||
|
||||
Pour utiliser Exatorrent tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Exatorrent avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Exatorrent.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Downloads/Exatorrent/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
10
Downloads/Exatorrent/docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
version: '3.9'
|
||||
services:
|
||||
varbhat:
|
||||
image: 'ghcr.io/varbhat/exatorrent:latest'
|
||||
volumes:
|
||||
- '/srv/appdata/exatorrent:/exa/exadir'
|
||||
environment:
|
||||
ports:
|
||||
- '42069:42069'
|
||||
- '5000:5000'
|
BIN
Downloads/Exatorrent/img/banniere-Exatorrent.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
Downloads/Exatorrent/img/logo-Exatorrent.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
2
Downloads/Exatorrent/prepare.sh
Normal file
@ -0,0 +1,2 @@
|
||||
mkdir -p exatorrent
|
||||
chmod 777 exatorrent
|
3
Downloads/FileZilla/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Downloads/FileZilla/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL :
|
||||
|
||||
# FileZilla
|
||||
|
||||
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de FileZilla
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\FileZilla
|
||||
```
|
||||
|
||||
## Modifier la configuration de FileZilla
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\FileZilla
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de FileZilla
|
||||
|
||||
Pour utiliser FileZilla tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser FileZilla avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://FileZilla.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Downloads/FileZilla/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
8
Downloads/FileZilla/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
#### NETWORKS
|
||||
networks:
|
||||
back_network:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
|
||||
#### SERVICES
|
||||
services:
|
BIN
Downloads/FileZilla/img/logo-FileZilla.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
3
Downloads/Flood/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Downloads/Flood/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL :
|
||||
|
||||
# Flood
|
||||
|
||||
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Flood
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Flood
|
||||
```
|
||||
|
||||
## Modifier la configuration de Flood
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Flood
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Flood
|
||||
|
||||
Pour utiliser Flood tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Flood avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Flood.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Downloads/Flood/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
8
Downloads/Flood/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
#### NETWORKS
|
||||
networks:
|
||||
back_network:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
|
||||
#### SERVICES
|
||||
services:
|
BIN
Downloads/Flood/img/logo-Flood.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
3
Downloads/JDownloader/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Downloads/JDownloader/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL :
|
||||
|
||||
# JDownloader
|
||||
|
||||
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de JDownloader
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\JDownloader
|
||||
```
|
||||
|
||||
## Modifier la configuration de JDownloader
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\JDownloader
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de JDownloader
|
||||
|
||||
Pour utiliser JDownloader tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser JDownloader avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://JDownloader.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Downloads/JDownloader/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
8
Downloads/JDownloader/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
#### NETWORKS
|
||||
networks:
|
||||
back_network:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
|
||||
#### SERVICES
|
||||
services:
|
BIN
Downloads/JDownloader/img/logo-JDownloader.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
3
Downloads/NZBGet/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Downloads/NZBGet/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL :
|
||||
|
||||
# NZBGet
|
||||
|
||||
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de NZBGet
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\NZBGet
|
||||
```
|
||||
|
||||
## Modifier la configuration de NZBGet
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\NZBGet
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de NZBGet
|
||||
|
||||
Pour utiliser NZBGet tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser NZBGet avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://NZBGet.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Downloads/NZBGet/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
8
Downloads/NZBGet/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
#### NETWORKS
|
||||
networks:
|
||||
back_network:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
|
||||
#### SERVICES
|
||||
services:
|
BIN
Downloads/NZBGet/img/logo-NZBGet.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
3
Downloads/SABnzbd/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Downloads/SABnzbd/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL :
|
||||
|
||||
# SABnzbd
|
||||
|
||||
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de SABnzbd
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\SABnzbd
|
||||
```
|
||||
|
||||
## Modifier la configuration de SABnzbd
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\SABnzbd
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de SABnzbd
|
||||
|
||||
Pour utiliser SABnzbd tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser SABnzbd avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://SABnzbd.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Downloads/SABnzbd/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
8
Downloads/SABnzbd/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
#### NETWORKS
|
||||
networks:
|
||||
back_network:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
|
||||
#### SERVICES
|
||||
services:
|
BIN
Downloads/SABnzbd/img/logo-SABnzbd.png
Normal file
After Width: | Height: | Size: 929 B |
3
Downloads/SickChill/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Downloads/SickChill/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : https://github.com/igorsheg/astro
|
||||
|
||||
# SickChill
|
||||
|
||||
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de SickChill
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\SickChill
|
||||
```
|
||||
|
||||
## Modifier la configuration de SickChill
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\SickChill
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de SickChill
|
||||
|
||||
Pour utiliser SickChill tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser SickChill avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://SickChill.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Downloads/SickChill/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
8
Downloads/SickChill/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
#### NETWORKS
|
||||
networks:
|
||||
back_network:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
|
||||
#### SERVICES
|
||||
services:
|
BIN
Downloads/SickChill/img/logo-SickChill.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
3
Downloads/Transmission/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
66
Downloads/Transmission/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : https://github.com/jez500/bender
|
||||
|
||||
# Transmission
|
||||
|
||||
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Transmission
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Transmission
|
||||
```
|
||||
|
||||
## Modifier la configuration de Transmission
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Transmission
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Transmission
|
||||
|
||||
Pour utiliser Transmission tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Transmission avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Transmission.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
66
Downloads/Transmission/docker-compose-traefik.yml
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : HHHHH
|
||||
|
||||
# Fichier-Stockage
|
||||
|
||||
GGGGG
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
## Modifier la configuration de Fichier-Stockage
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd AAAAA\Fichier-Stockage
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Fichier-Stockage
|
||||
|
||||
Pour utiliser Fichier-Stockage tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Fichier-Stockage avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Fichier-Stockage.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
8
Downloads/Transmission/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
#### NETWORKS
|
||||
networks:
|
||||
back_network:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
|
||||
#### SERVICES
|
||||
services:
|
BIN
Downloads/Transmission/img/logo-Transmission.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
38
Downloads/Voltaserve/.env
Normal file
@ -0,0 +1,38 @@
|
||||
# Docker Config
|
||||
COMPOSE_PROJECT_NAME="voltaserve"
|
||||
|
||||
# Hostname
|
||||
VOLTASERVE_HOSTNAME="localhost"
|
||||
|
||||
# Services Ports
|
||||
VOLTASERVE_UI_PORT=3000
|
||||
VOLTASERVE_API_PORT=5000
|
||||
VOLTASERVE_CONVERSION_PORT=5001
|
||||
VOLTASERVE_IDP_PORT=7000
|
||||
VOLTASERVE_WEBDAV_PORT=6000
|
||||
VOLTASERVE_EXIFTOOL_PORT=6001
|
||||
VOLTASERVE_FFMPEG_PORT=6002
|
||||
VOLTASERVE_IMAGEMAGICK_PORT=6003
|
||||
VOLTASERVE_LIBREOFFICE_PORT=6004
|
||||
VOLTASERVE_OCRMYPDF_PORT=6005
|
||||
VOLTASERVE_POPPLER_PORT=6006
|
||||
VOLTASERVE_TESSERACT_PORT=6007
|
||||
|
||||
# Infrastructure Ports
|
||||
VOLTASERVE_POSTGRES_PORT=5432
|
||||
VOLTASERVE_MINIO_PORT=9000
|
||||
VOLTASERVE_MINIO_CONSOLE_PORT=9001
|
||||
VOLTASERVE_REDISINSIGHT_PORT=8001
|
||||
VOLTASERVE_MEILISEARCH_PORT=7700
|
||||
VOLTASERVE_REDIS_PORT=6379
|
||||
VOLTASERVE_MAILHOG_WEB_PORT=8025
|
||||
VOLTASERVE_MAILHOG_SMTP_PORT=1025
|
||||
|
||||
# SMTP Config
|
||||
VOLTASERVE_SMTP_HOST="mailhog"
|
||||
VOLTASERVE_SMTP_PORT=1025
|
||||
VOLTASERVE_SMTP_SECURE=false
|
||||
VOLTASERVE_SMTP_USERNAME=""
|
||||
VOLTASERVE_SMTP_PASSWORD=""
|
||||
VOLTASERVE_SMTP_SENDER_ADDRESS="no-reply@localhost"
|
||||
VOLTASERVE_SMTP_SENDER_NAME="Voltaserve"
|
24
Downloads/Voltaserve/DEVELOPMENT.md
Normal file
@ -0,0 +1,24 @@
|
||||
# Voltaserve Development
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Run Infrastructure Services With Docker
|
||||
|
||||
```shell
|
||||
docker compose up -d \
|
||||
postgres \
|
||||
minio \
|
||||
meilisearch \
|
||||
redis \
|
||||
mailhog
|
||||
```
|
||||
|
||||
### Run Microservices
|
||||
|
||||
Start each microservice separately in a new terminal as described here:
|
||||
|
||||
- [Voltaserve API](api/README.md)
|
||||
- [Voltaserve UI](ui/README.md)
|
||||
- [Voltaserve Identity Provider](idp/README.md)
|
||||
- [Voltaserve WebDAV](webdav/README.md)
|
||||
- [Voltaserve Conversion](conversion/README.md)
|
3
Downloads/Voltaserve/LICENSE
Normal file
@ -0,0 +1,3 @@
|
||||
Additional permission under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.
|
651
Downloads/Voltaserve/LICENSE.md
Normal file
@ -0,0 +1,651 @@
|
||||
GNU Affero General Public License
|
||||
=================================
|
||||
|
||||
_Version 3, 19 November 2007_
|
||||
_Copyright © 2007 Free Software Foundation, Inc. <<http://fsf.org/>>_
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
## Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: **(1)** assert copyright on the software, and **(2)** offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
## TERMS AND CONDITIONS
|
||||
|
||||
### 0. Definitions
|
||||
|
||||
“This License” refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
“Copyright” also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
“The Program” refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as “you”. “Licensees” and
|
||||
“recipients” may be individuals or organizations.
|
||||
|
||||
To “modify” a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a “modified version” of the
|
||||
earlier work or a work “based on” the earlier work.
|
||||
|
||||
A “covered work” means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To “propagate” a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To “convey” a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays “Appropriate Legal Notices”
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that **(1)** displays an appropriate copyright notice, and **(2)**
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
### 1. Source Code
|
||||
|
||||
The “source code” for a work means the preferred form of the work
|
||||
for making modifications to it. “Object code” means any non-source
|
||||
form of a work.
|
||||
|
||||
A “Standard Interface” means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The “System Libraries” of an executable work include anything, other
|
||||
than the work as a whole, that **(a)** is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and **(b)** serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
“Major Component”, in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The “Corresponding Source” for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
### 2. Basic Permissions
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
### 4. Conveying Verbatim Copies
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
### 5. Conveying Modified Source Versions
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
* **a)** The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
* **b)** The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section 7.
|
||||
This requirement modifies the requirement in section 4 to
|
||||
“keep intact all notices”.
|
||||
* **c)** You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
* **d)** If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
“aggregate” if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
### 6. Conveying Non-Source Forms
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
* **a)** Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
* **b)** Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either **(1)** a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or **(2)** access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
* **c)** Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
* **d)** Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
* **e)** Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A “User Product” is either **(1)** a “consumer product”, which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or **(2)** anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, “normally used” refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
“Installation Information” for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
### 7. Additional Terms
|
||||
|
||||
“Additional permissions” are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
* **a)** Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
* **b)** Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
* **c)** Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
* **d)** Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
* **e)** Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
* **f)** Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered “further
|
||||
restrictions” within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
### 8. Termination
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated **(a)**
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and **(b)** permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
### 9. Acceptance Not Required for Having Copies
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
### 10. Automatic Licensing of Downstream Recipients
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An “entity transaction” is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
### 11. Patents
|
||||
|
||||
A “contributor” is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's “contributor version”.
|
||||
|
||||
A contributor's “essential patent claims” are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, “control” includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a “patent license” is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To “grant” such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either **(1)** cause the Corresponding Source to be so
|
||||
available, or **(2)** arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or **(3)** arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. “Knowingly relying” means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is “discriminatory” if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license **(a)** in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or **(b)** primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
### 12. No Surrender of Others' Freedom
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
### 13. Remote Network Interaction; Use with the GNU General Public License
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
### 14. Revised Versions of this License
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License “or any later version” applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
### 15. Disclaimer of Warranty
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
### 16. Limitation of Liability
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
### 17. Interpretation of Sections 15 and 16
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
_END OF TERMS AND CONDITIONS_
|
||||
|
||||
## How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the “copyright” line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a “Source” link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a “copyright disclaimer” for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<<http://www.gnu.org/licenses/>>.
|
12
Downloads/Voltaserve/NOTICE.md
Normal file
@ -0,0 +1,12 @@
|
||||
Copyright (c) 2023 Anass Bouassaba.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License version 3.0 as published by
|
||||
the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
66
Downloads/Voltaserve/README.md
Normal file
@ -0,0 +1,66 @@
|
||||

|
||||
URL : https://github.com/Lissy93/dashy
|
||||
|
||||
# Voltaserve
|
||||
|
||||
Avec Voltaserve, t?l?chargez des fichiers, recherchez et pr?visualisez des documents, cr?ez des groupes et des organisations, attribuez des autorisations et collaborez en temps r?el avec votre ?quipe.
|
||||
|
||||
# Téléchargement, Configuration et Lancement
|
||||
|
||||
## Téléchargement de Voltaserve
|
||||
|
||||
Saisir la commande pour télécharger la source
|
||||
```bash
|
||||
git clone https://git.tips-of-mine.fr/Tips-Of-Mine/Docker.git
|
||||
```
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Voltaserve
|
||||
```
|
||||
|
||||
## Modifier la configuration de Voltaserve
|
||||
|
||||
Saisir la commande pour vous rendre dans le dossier
|
||||
```bash
|
||||
cd Downloads\Voltaserve
|
||||
```
|
||||
|
||||
Nous éditons le fichier de configuration
|
||||
```bash
|
||||
nano .env
|
||||
```
|
||||
|
||||
Nous modifions les variables dont nous avons besoin.
|
||||
|
||||
## Lancement de Voltaserve
|
||||
|
||||
Pour utiliser Voltaserve tout seul
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Pour utiliser Voltaserve avec Traefik
|
||||
```bash
|
||||
docker compose -f docker-compose-traefik.yml up -d
|
||||
```
|
||||
|
||||
# Utilisation
|
||||
|
||||
## Accueil
|
||||
|
||||
Ouvrir une page web avec l'url :
|
||||
Pour une utilisation tout seul
|
||||
|
||||
http://10.0.4.29:3000
|
||||
|
||||
Pour une utilisation avec Traefik
|
||||
|
||||
https://Voltaserve.10.0.4.29.traefik.me`)"
|
||||
|
||||
|
||||
# More info
|
||||
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
|
||||
|
||||
# Buy me a coffe
|
||||
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
|
44
Downloads/Voltaserve/api/.air.toml
Normal file
@ -0,0 +1,44 @@
|
||||
root = "."
|
||||
testdata_dir = "testdata"
|
||||
tmp_dir = ".air"
|
||||
|
||||
[build]
|
||||
args_bin = []
|
||||
bin = "./.air/main"
|
||||
cmd = "go build -o ./.air/main ."
|
||||
delay = 0
|
||||
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
|
||||
exclude_file = []
|
||||
exclude_regex = ["_test.go"]
|
||||
exclude_unchanged = false
|
||||
follow_symlink = false
|
||||
full_bin = ""
|
||||
include_dir = []
|
||||
include_ext = ["go", "tpl", "tmpl", "html"]
|
||||
include_file = []
|
||||
kill_delay = "0s"
|
||||
log = "build-errors.log"
|
||||
poll = false
|
||||
poll_interval = 0
|
||||
rerun = false
|
||||
rerun_delay = 500
|
||||
send_interrupt = false
|
||||
stop_on_error = false
|
||||
|
||||
[color]
|
||||
app = ""
|
||||
build = "yellow"
|
||||
main = "magenta"
|
||||
runner = "green"
|
||||
watcher = "cyan"
|
||||
|
||||
[log]
|
||||
main_only = false
|
||||
time = false
|
||||
|
||||
[misc]
|
||||
clean_on_exit = false
|
||||
|
||||
[screen]
|
||||
clear_on_rebuild = false
|
||||
keep_scroll = true
|
6
Downloads/Voltaserve/api/.dockerignore
Normal file
@ -0,0 +1,6 @@
|
||||
README.md
|
||||
DEVELOPMENT.md
|
||||
Dockerfile
|
||||
.gitignore
|
||||
.gitattributes
|
||||
.vscode
|
39
Downloads/Voltaserve/api/.env
Normal file
@ -0,0 +1,39 @@
|
||||
PORT=5000
|
||||
|
||||
# URLs
|
||||
PUBLIC_UI_URL="http://localhost:3000"
|
||||
CONVERSION_URL="http://127.0.0.1:5001"
|
||||
POSTGRES_URL="postgresql://voltaserve:voltaserve@127.0.0.1:5432/voltaserve"
|
||||
|
||||
# Security
|
||||
SECURITY_JWT_SIGNING_KEY="586cozl1x9m6zmu4fg8iwi6ajazguehcm9qdfgd5ndo2pc3pcn"
|
||||
SECURITY_CORS_ORIGINS="http://localhost:3000"
|
||||
SECURITY_API_KEY="7znl9Zd8F!4lRZA43lEQb757mCy"
|
||||
|
||||
# S3
|
||||
S3_URL="127.0.0.1:9000"
|
||||
S3_ACCESS_KEY="voltaserve"
|
||||
S3_SECRET_KEY="voltaserve"
|
||||
S3_REGION="us-east-1"
|
||||
S3_SECURE=false
|
||||
|
||||
# Search
|
||||
SEARCH_URL="http://127.0.0.1:7700"
|
||||
|
||||
# Redis
|
||||
REDIS_ADDRESS="127.0.0.1:6379"
|
||||
REDIS_DB=0
|
||||
|
||||
# SMTP
|
||||
SMTP_HOST="localhost"
|
||||
SMTP_PORT=1025
|
||||
SMTP_SECURE=false
|
||||
SMTP_SENDER_ADDRESS="no-reply@localhost"
|
||||
SMTP_SENDER_NAME="Voltaserve"
|
||||
|
||||
# Limits
|
||||
LIMITS_EXTERNAL_COMMAND_TIMEOUT_SECONDS=900
|
||||
LIMITS_MULTIPART_BODY_LENGTH_LIMIT_MB=1000
|
||||
|
||||
# Defaults
|
||||
DEFAULT_WORKSPACE_STORAGE_CAPACITY_BYTES=100000000000
|
1
Downloads/Voltaserve/api/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
docs/** linguist-generated
|
4
Downloads/Voltaserve/api/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/.env.local
|
||||
/voltaserve
|
||||
/__debug_bin*
|
||||
/.air
|
5
Downloads/Voltaserve/api/.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"golang.go"
|
||||
]
|
||||
}
|
15
Downloads/Voltaserve/api/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Package",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/main.go"
|
||||
}
|
||||
]
|
||||
}
|
6
Downloads/Voltaserve/api/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"[go]": {
|
||||
"editor.defaultFormatter": "golang.go",
|
||||
"editor.tabSize": 4
|
||||
}
|
||||
}
|
20
Downloads/Voltaserve/api/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
FROM registry.suse.com/bci/golang:1.21 AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go mod download
|
||||
RUN go build -o voltaserve-api
|
||||
|
||||
FROM registry.suse.com/bci/bci-micro:15.5 AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /build/voltaserve-api ./voltaserve-api
|
||||
COPY --from=builder /build/.env ./.env
|
||||
COPY --from=builder /build/templates ./templates
|
||||
|
||||
ENTRYPOINT ["./voltaserve-api"]
|
||||
|
||||
EXPOSE 5000
|
55
Downloads/Voltaserve/api/README.md
Normal file
@ -0,0 +1,55 @@
|
||||
# Voltaserve API
|
||||
|
||||
## Getting Started
|
||||
|
||||
Install [swag](https://github.com/swaggo/swag) and [golangci-lint](https://golangci-lint.run/usage/install).
|
||||
|
||||
Run for development:
|
||||
|
||||
```shell
|
||||
go run .
|
||||
```
|
||||
|
||||
Build binary:
|
||||
|
||||
```shell
|
||||
go build .
|
||||
```
|
||||
|
||||
Build Docker image:
|
||||
|
||||
```shell
|
||||
docker build -t voltaserve/api .
|
||||
```
|
||||
|
||||
Run code linter:
|
||||
|
||||
```shell
|
||||
golangci-lint run
|
||||
```
|
||||
|
||||
## Generate and Publish Documentation
|
||||
|
||||
Format swag comments:
|
||||
|
||||
```shell
|
||||
swag fmt
|
||||
```
|
||||
|
||||
Generate `swagger.yml`:
|
||||
|
||||
```shell
|
||||
swag init --output ./docs --outputTypes yaml
|
||||
```
|
||||
|
||||
Preview (will be served at [http://127.0.0.1:5555](http://127.0.0.1:5555)):
|
||||
|
||||
```shell
|
||||
npx @redocly/cli preview-docs --port 5555 ./docs/swagger.yaml
|
||||
```
|
||||
|
||||
Generate the final static HTML documentation:
|
||||
|
||||
```shell
|
||||
npx @redocly/cli build-docs ./docs/swagger.yaml --output ./docs/index.html
|
||||
```
|
64
Downloads/Voltaserve/api/cache/file_cache.go
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"voltaserve/infra"
|
||||
"voltaserve/model"
|
||||
"voltaserve/repo"
|
||||
)
|
||||
|
||||
type FileCache struct {
|
||||
redis *infra.RedisManager
|
||||
fileRepo repo.FileRepo
|
||||
keyPrefix string
|
||||
}
|
||||
|
||||
func NewFileCache() *FileCache {
|
||||
return &FileCache{
|
||||
fileRepo: repo.NewFileRepo(),
|
||||
redis: infra.NewRedisManager(),
|
||||
keyPrefix: "file:",
|
||||
}
|
||||
}
|
||||
|
||||
func (c *FileCache) Set(file model.File) error {
|
||||
b, err := json.Marshal(file)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = c.redis.Set(c.keyPrefix+file.GetID(), string(b))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *FileCache) Get(id string) (model.File, error) {
|
||||
value, err := c.redis.Get(c.keyPrefix + id)
|
||||
if err != nil {
|
||||
return c.Refresh(id)
|
||||
}
|
||||
file := repo.NewFile()
|
||||
if err = json.Unmarshal([]byte(value), &file); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return file, nil
|
||||
}
|
||||
|
||||
func (c *FileCache) Refresh(id string) (model.File, error) {
|
||||
res, err := c.fileRepo.Find(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = c.Set(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func (c *FileCache) Delete(id string) error {
|
||||
if err := c.redis.Delete(c.keyPrefix + id); err != nil {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
57
Downloads/Voltaserve/api/cache/group_cache.go
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"voltaserve/infra"
|
||||
"voltaserve/model"
|
||||
"voltaserve/repo"
|
||||
)
|
||||
|
||||
type GroupCache struct {
|
||||
redis *infra.RedisManager
|
||||
groupRepo repo.GroupRepo
|
||||
keyPrefix string
|
||||
}
|
||||
|
||||
func NewGroupCache() *GroupCache {
|
||||
return &GroupCache{
|
||||
redis: infra.NewRedisManager(),
|
||||
groupRepo: repo.NewGroupRepo(),
|
||||
keyPrefix: "group:",
|
||||
}
|
||||
}
|
||||
|
||||
func (c *GroupCache) Set(workspace model.Group) error {
|
||||
b, err := json.Marshal(workspace)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = c.redis.Set(c.keyPrefix+workspace.GetID(), string(b))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *GroupCache) Get(id string) (model.Group, error) {
|
||||
value, err := c.redis.Get(c.keyPrefix + id)
|
||||
if err != nil {
|
||||
return c.Refresh(id)
|
||||
}
|
||||
group := repo.NewGroup()
|
||||
if err = json.Unmarshal([]byte(value), &group); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return group, nil
|
||||
}
|
||||
|
||||
func (c *GroupCache) Refresh(id string) (model.Group, error) {
|
||||
res, err := c.groupRepo.Find(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = c.Set(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return res, nil
|
||||
}
|
64
Downloads/Voltaserve/api/cache/organization_cache.go
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"voltaserve/infra"
|
||||
"voltaserve/model"
|
||||
"voltaserve/repo"
|
||||
)
|
||||
|
||||
type OrganizationCache struct {
|
||||
redis *infra.RedisManager
|
||||
orgRepo repo.OrganizationRepo
|
||||
keyPrefix string
|
||||
}
|
||||
|
||||
func NewOrganizationCache() *OrganizationCache {
|
||||
return &OrganizationCache{
|
||||
redis: infra.NewRedisManager(),
|
||||
orgRepo: repo.NewOrganizationRepo(),
|
||||
keyPrefix: "organization:",
|
||||
}
|
||||
}
|
||||
|
||||
func (c *OrganizationCache) Set(organization model.Organization) error {
|
||||
b, err := json.Marshal(organization)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = c.redis.Set(c.keyPrefix+organization.GetID(), string(b))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *OrganizationCache) Get(id string) (model.Organization, error) {
|
||||
value, err := c.redis.Get(c.keyPrefix + id)
|
||||
if err != nil {
|
||||
return c.Refresh(id)
|
||||
}
|
||||
var org = repo.NewOrganization()
|
||||
if err = json.Unmarshal([]byte(value), &org); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return org, nil
|
||||
}
|
||||
|
||||
func (c *OrganizationCache) Refresh(id string) (model.Organization, error) {
|
||||
res, err := c.orgRepo.Find(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = c.Set(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func (c *OrganizationCache) Delete(id string) error {
|
||||
if err := c.redis.Delete(c.keyPrefix + id); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
64
Downloads/Voltaserve/api/cache/workspace_cache.go
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"voltaserve/infra"
|
||||
"voltaserve/model"
|
||||
"voltaserve/repo"
|
||||
)
|
||||
|
||||
type WorkspaceCache struct {
|
||||
redis *infra.RedisManager
|
||||
workspaceRepo repo.WorkspaceRepo
|
||||
keyPrefix string
|
||||
}
|
||||
|
||||
func NewWorkspaceCache() *WorkspaceCache {
|
||||
return &WorkspaceCache{
|
||||
redis: infra.NewRedisManager(),
|
||||
workspaceRepo: repo.NewWorkspaceRepo(),
|
||||
keyPrefix: "workspace:",
|
||||
}
|
||||
}
|
||||
|
||||
func (c *WorkspaceCache) Set(workspace model.Workspace) error {
|
||||
b, err := json.Marshal(workspace)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = c.redis.Set(c.keyPrefix+workspace.GetID(), string(b))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *WorkspaceCache) Get(id string) (model.Workspace, error) {
|
||||
value, err := c.redis.Get(c.keyPrefix + id)
|
||||
if err != nil {
|
||||
return c.Refresh(id)
|
||||
}
|
||||
workspace := repo.NewWorkspace()
|
||||
if err = json.Unmarshal([]byte(value), &workspace); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return workspace, nil
|
||||
}
|
||||
|
||||
func (c *WorkspaceCache) Refresh(id string) (model.Workspace, error) {
|
||||
res, err := c.workspaceRepo.Find(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = c.Set(res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func (c *WorkspaceCache) Delete(id string) error {
|
||||
if err := c.redis.Delete(c.keyPrefix + id); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
47
Downloads/Voltaserve/api/client/conversion_client.go
Normal file
@ -0,0 +1,47 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"voltaserve/config"
|
||||
)
|
||||
|
||||
type ConversionClient struct {
|
||||
config config.Config
|
||||
}
|
||||
|
||||
type PipelineRunOptions struct {
|
||||
FileID string `json:"fileId"`
|
||||
SnapshotID string `json:"snapshotId"`
|
||||
Bucket string `json:"bucket"`
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
func NewConversionClient() *ConversionClient {
|
||||
return &ConversionClient{
|
||||
config: config.GetConfig(),
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ConversionClient) RunPipeline(opts *PipelineRunOptions) error {
|
||||
body, err := json.Marshal(opts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req, err := http.NewRequest("POST", fmt.Sprintf("%s/v1/pipelines/run?api_key=%s", c.config.ConversionURL, c.config.Security.APIKey), bytes.NewBuffer(body))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.Header.Set("Content-Type", "application/json; charset=UTF-8")
|
||||
client := &http.Client{}
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := res.Body.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
121
Downloads/Voltaserve/api/config/config.go
Normal file
@ -0,0 +1,121 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var config *Config
|
||||
|
||||
func GetConfig() Config {
|
||||
if config == nil {
|
||||
port, err := strconv.Atoi(os.Getenv("PORT"))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config = &Config{
|
||||
Port: port,
|
||||
}
|
||||
readURLs(config)
|
||||
readSecurity(config)
|
||||
readS3(config)
|
||||
readSearch(config)
|
||||
readRedis(config)
|
||||
readSMTP(config)
|
||||
readLimits(config)
|
||||
readDefaults(config)
|
||||
}
|
||||
return *config
|
||||
}
|
||||
|
||||
func readURLs(config *Config) {
|
||||
config.PublicUIURL = os.Getenv("PUBLIC_UI_URL")
|
||||
config.ConversionURL = os.Getenv("CONVERSION_URL")
|
||||
config.DatabaseURL = os.Getenv("POSTGRES_URL")
|
||||
}
|
||||
|
||||
func readSecurity(config *Config) {
|
||||
config.Security.JWTSigningKey = os.Getenv("SECURITY_JWT_SIGNING_KEY")
|
||||
config.Security.CORSOrigins = strings.Split(os.Getenv("SECURITY_CORS_ORIGINS"), ",")
|
||||
config.Security.APIKey = os.Getenv("SECURITY_API_KEY")
|
||||
}
|
||||
|
||||
func readS3(config *Config) {
|
||||
config.S3.URL = os.Getenv("S3_URL")
|
||||
config.S3.AccessKey = os.Getenv("S3_ACCESS_KEY")
|
||||
config.S3.SecretKey = os.Getenv("S3_SECRET_KEY")
|
||||
config.S3.Region = os.Getenv("S3_REGION")
|
||||
if len(os.Getenv("S3_SECURE")) > 0 {
|
||||
v, err := strconv.ParseBool(os.Getenv("S3_SECURE"))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config.S3.Secure = v
|
||||
}
|
||||
}
|
||||
|
||||
func readSearch(config *Config) {
|
||||
config.Search.URL = os.Getenv("SEARCH_URL")
|
||||
}
|
||||
|
||||
func readRedis(config *Config) {
|
||||
config.Redis.Address = os.Getenv("REDIS_ADDRESS")
|
||||
config.Redis.Password = os.Getenv("REDIS_PASSWORD")
|
||||
if len(os.Getenv("REDIS_DB")) > 0 {
|
||||
v, err := strconv.ParseInt(os.Getenv("REDIS_DB"), 10, 32)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config.Redis.DB = int(v)
|
||||
}
|
||||
}
|
||||
|
||||
func readSMTP(config *Config) {
|
||||
config.SMTP.Host = os.Getenv("SMTP_HOST")
|
||||
if len(os.Getenv("SMTP_PORT")) > 0 {
|
||||
v, err := strconv.ParseInt(os.Getenv("SMTP_PORT"), 10, 32)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config.SMTP.Port = int(v)
|
||||
}
|
||||
if len(os.Getenv("SMTP_SECURE")) > 0 {
|
||||
v, err := strconv.ParseBool(os.Getenv("SMTP_SECURE"))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config.SMTP.Secure = v
|
||||
}
|
||||
config.SMTP.Username = os.Getenv("SMTP_USERNAME")
|
||||
config.SMTP.Password = os.Getenv("SMTP_PASSWORD")
|
||||
config.SMTP.SenderAddress = os.Getenv("SMTP_SENDER_ADDRESS")
|
||||
config.SMTP.SenderName = os.Getenv("SMTP_SENDER_NAME")
|
||||
}
|
||||
|
||||
func readLimits(config *Config) {
|
||||
if len(os.Getenv("LIMITS_EXTERNAL_COMMAND_TIMEOUT_SECONDS")) > 0 {
|
||||
v, err := strconv.ParseInt(os.Getenv("LIMITS_EXTERNAL_COMMAND_TIMEOUT_SECONDS"), 10, 32)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config.Limits.ExternalCommandTimeoutSeconds = int(v)
|
||||
}
|
||||
if len(os.Getenv("LIMITS_MULTIPART_BODY_LENGTH_LIMIT_MB")) > 0 {
|
||||
v, err := strconv.ParseInt(os.Getenv("LIMITS_MULTIPART_BODY_LENGTH_LIMIT_MB"), 10, 32)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config.Limits.MultipartBodyLengthLimitMB = int(v)
|
||||
}
|
||||
}
|
||||
|
||||
func readDefaults(config *Config) {
|
||||
if len(os.Getenv("DEFAULT_WORKSPACE_STORAGE_CAPACITY_BYTES")) > 0 {
|
||||
v, err := strconv.ParseInt(os.Getenv("DEFAULT_WORKSPACE_STORAGE_CAPACITY_BYTES"), 10, 64)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config.Defaults.WorkspaceStorageCapacityBytes = v
|
||||
}
|
||||
}
|
65
Downloads/Voltaserve/api/config/types.go
Normal file
@ -0,0 +1,65 @@
|
||||
package config
|
||||
|
||||
type Config struct {
|
||||
Port int
|
||||
PublicUIURL string
|
||||
ConversionURL string
|
||||
DatabaseURL string
|
||||
Search SearchConfig
|
||||
Redis RedisConfig
|
||||
S3 S3Config
|
||||
Limits LimitsConfig
|
||||
Security SecurityConfig
|
||||
SMTP SMTPConfig
|
||||
Defaults DefaultsConfig
|
||||
}
|
||||
|
||||
type LimitsConfig struct {
|
||||
ExternalCommandTimeoutSeconds int
|
||||
MultipartBodyLengthLimitMB int
|
||||
}
|
||||
|
||||
type DefaultsConfig struct {
|
||||
WorkspaceStorageCapacityBytes int64
|
||||
}
|
||||
|
||||
type TokenConfig struct {
|
||||
AccessTokenLifetime int
|
||||
RefreshTokenLifetime int
|
||||
TokenAudience string
|
||||
TokenIssuer string
|
||||
}
|
||||
|
||||
type SearchConfig struct {
|
||||
URL string
|
||||
}
|
||||
|
||||
type RedisConfig struct {
|
||||
Address string
|
||||
Password string
|
||||
DB int
|
||||
}
|
||||
|
||||
type S3Config struct {
|
||||
URL string
|
||||
AccessKey string
|
||||
SecretKey string
|
||||
Region string
|
||||
Secure bool
|
||||
}
|
||||
|
||||
type SecurityConfig struct {
|
||||
JWTSigningKey string
|
||||
CORSOrigins []string
|
||||
APIKey string
|
||||
}
|
||||
|
||||
type SMTPConfig struct {
|
||||
Host string
|
||||
Port int
|
||||
Secure bool
|
||||
Username string
|
||||
Password string
|
||||
SenderAddress string
|
||||
SenderName string
|
||||
}
|
763
Downloads/Voltaserve/api/docs/index.html
generated
Normal file
2679
Downloads/Voltaserve/api/docs/swagger.yaml
generated
Normal file
7
Downloads/Voltaserve/api/errorpkg/error_constants.go
Normal file
@ -0,0 +1,7 @@
|
||||
package errorpkg
|
||||
|
||||
const (
|
||||
MsgResourceNotFound = "The resource you are looking for might have been removed or temporatily unavailable."
|
||||
MsgSomethingWentWrong = "Oops! something went wrong."
|
||||
MsgInvalidRequest = "An invalid request was sent to the server."
|
||||
)
|
415
Downloads/Voltaserve/api/errorpkg/error_creators.go
Normal file
@ -0,0 +1,415 @@
|
||||
package errorpkg
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"voltaserve/model"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func NewGroupNotFoundError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"group_not_found",
|
||||
http.StatusNotFound,
|
||||
"Group not found.",
|
||||
MsgResourceNotFound,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewFileNotFoundError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"file_not_found",
|
||||
http.StatusNotFound,
|
||||
"File not found.",
|
||||
MsgResourceNotFound,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewInvalidPathError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"invalid_path",
|
||||
http.StatusBadRequest,
|
||||
"Invalid path.",
|
||||
MsgInvalidRequest,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewWorkspaceNotFoundError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"workspace_not_found",
|
||||
http.StatusNotFound,
|
||||
"Workspace not found.",
|
||||
MsgResourceNotFound,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewOrganizationNotFoundError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"organization_not_found",
|
||||
http.StatusNotFound,
|
||||
"Organization not found.",
|
||||
MsgResourceNotFound,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewSnapshotNotFoundError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"snapshot_not_found",
|
||||
http.StatusNotFound,
|
||||
"Snapshot not found.",
|
||||
"The file has no snapshots.",
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewS3ObjectNotFoundError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"s3_object_not_found",
|
||||
http.StatusNotFound,
|
||||
"S3 object not found.",
|
||||
"The snapshot does not contain the S3 object requested.",
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewInvitationNotFoundError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"invitation_not_found",
|
||||
http.StatusNotFound,
|
||||
"Invitation not found.",
|
||||
MsgResourceNotFound,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewUserNotFoundError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"user_not_found",
|
||||
http.StatusNotFound,
|
||||
"User not found.",
|
||||
MsgResourceNotFound,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewInternalServerError(err error) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"internal_server_error",
|
||||
http.StatusInternalServerError,
|
||||
"Internal server error.",
|
||||
MsgSomethingWentWrong,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewOrganizationPermissionError(user model.User, org model.Organization, permission string) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"missing_organization_permission",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf(
|
||||
"User '%s' (%s) is missing the permission '%s' for organization '%s' (%s).",
|
||||
user.GetUsername(), user.GetID(), permission, org.GetName(), org.GetID(),
|
||||
),
|
||||
fmt.Sprintf("Sorry, you don't have enough permissions for organization '%s'.", org.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewCannotRemoveLastRemainingOwnerOfOrganizationError(id string) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"cannot_remove_last_owner_of_organization",
|
||||
http.StatusBadRequest,
|
||||
fmt.Sprintf("Cannot remove the last remaining owner of organization '%s'.", id), MsgInvalidRequest,
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewGroupPermissionError(user model.User, org model.Organization, permission string) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"missing_group_permission",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf(
|
||||
"User '%s' (%s) is missing the permission '%s' for the group '%s' (%s).",
|
||||
user.GetUsername(), user.GetID(), permission, org.GetName(), org.GetID(),
|
||||
),
|
||||
fmt.Sprintf("Sorry, you don't have enough permissions for the group '%s'.", org.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewWorkspacePermissionError(user model.User, workspace model.Workspace, permission string) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"missing_workspace_permission",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf(
|
||||
"User '%s' (%s) is missing the permission '%s' for the workspace '%s' (%s).",
|
||||
user.GetUsername(), user.GetID(), permission, workspace.GetName(), workspace.GetID(),
|
||||
),
|
||||
fmt.Sprintf("Sorry, you don't have enough permissions for the workspace '%s'.", workspace.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewFilePermissionError(user model.User, file model.File, permission string) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"missing_file_permission",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf(
|
||||
"User '%s' (%s) is missing the permission '%s' for the file '%s' (%s).",
|
||||
user.GetUsername(), user.GetID(), permission, file.GetName(), file.GetID(),
|
||||
),
|
||||
fmt.Sprintf("Sorry, you don't have enough permissions for the item '%s'.", file.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewS3Error(message string) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"s3_error",
|
||||
http.StatusInternalServerError,
|
||||
message,
|
||||
MsgSomethingWentWrong,
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewMissingQueryParamError(param string) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"missing_query_param",
|
||||
http.StatusBadRequest,
|
||||
fmt.Sprintf("Query param '%s' is required.", param),
|
||||
MsgInvalidRequest,
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewInvalidQueryParamError(param string) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"invalid_query_param",
|
||||
http.StatusBadRequest,
|
||||
fmt.Sprintf("Query param '%s' is invalid.", param),
|
||||
MsgInvalidRequest,
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewStorageLimitExceededError() *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"storage_limit_exceeded",
|
||||
http.StatusForbidden,
|
||||
"Storage limit exceeded.",
|
||||
"The storage limit of your workspace has been reached, please increase it and try again.",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewInsufficientStorageCapacityError() *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"insufficient_storage_capacity",
|
||||
http.StatusForbidden,
|
||||
"Insufficient storage capacity.",
|
||||
"The requested storage capacity is insufficient.",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewRequestBodyValidationError(err error) *ErrorResponse {
|
||||
var fields []string
|
||||
for _, e := range err.(validator.ValidationErrors) {
|
||||
fields = append(fields, e.Field())
|
||||
}
|
||||
return NewErrorResponse(
|
||||
"request_validation_error",
|
||||
http.StatusBadRequest,
|
||||
fmt.Sprintf("Failed validation for the following fields: %s.", strings.Join(fields, ",")),
|
||||
MsgInvalidRequest,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
func NewFileAlreadyChildOfDestinationError(source model.File, target model.File) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"file_already_child_of_destination",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("File '%s' (%s) is already a child of '%s' (%s).", source.GetName(), source.GetID(), target.GetName(), target.GetID()),
|
||||
fmt.Sprintf("Item '%s' is already within '%s'.", source.GetName(), target.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewFileCannotBeMovedIntoItselfError(source model.File) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"file_cannot_be_moved_into_itself",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("File '%s' (%s) cannot be moved into itself.", source.GetName(), source.GetID()),
|
||||
fmt.Sprintf("Item '%s' cannot be moved into itself.", source.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewFileIsNotAFolderError(file model.File) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"file_is_not_a_folder",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("File '%s' (%s) is not a folder.", file.GetName(), file.GetID()),
|
||||
fmt.Sprintf("Item '%s' is not a folder.", file.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewTargetIsGrandChildOfSourceError(file model.File) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"target_is_grant_child_of_source",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("File '%s' (%s) cannot be moved in another file within its own tree.", file.GetName(), file.GetID()),
|
||||
fmt.Sprintf("Item '%s' cannot be moved in another item within its own tree.", file.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewCannotDeleteWorkspaceRootError(file model.File, workspace model.Workspace) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"cannot_delete_workspace_root",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("Cannot delete the root file (%s) of the workspace '%s' (%s).", file.GetID(), workspace.GetName(), workspace.GetID()),
|
||||
fmt.Sprintf("Cannot delete the root item of the workspace '%s'.", workspace.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewFileCannotBeCopiedIntoOwnSubtreeError(file model.File) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"file_cannot_be_coped_into_own_subtree",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("File '%s' (%s) cannot be copied in another file within its own subtree.", file.GetName(), file.GetID()),
|
||||
fmt.Sprintf("Item '%s' cannot be copied in another item within its own subtree.", file.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewFileCannotBeCopiedIntoIselfError(file model.File) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"file_cannot_be_copied_into_itself",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("File '%s' (%s) cannot be copied into itself.", file.GetName(), file.GetID()),
|
||||
fmt.Sprintf("Item '%s' cannot be copied into itself.", file.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewFileWithSimilarNameExistsError() *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"file_with_similar_name_exists",
|
||||
http.StatusForbidden,
|
||||
"File with similar name exists.",
|
||||
"Item with similar name exists.",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewInvalidPageParameterError() *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"invalid_page_parameter",
|
||||
http.StatusBadRequest,
|
||||
"Invalid page parameter, must be >= 1.",
|
||||
MsgInvalidRequest,
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewInvalidSizeParameterError() *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"invalid_size_parameter",
|
||||
http.StatusBadRequest,
|
||||
"Invalid size parameter, must be >= 1.",
|
||||
MsgInvalidRequest,
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewCannotAcceptNonPendingInvitationError(invitation model.Invitation) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"cannot_accept_non_pending_invitation",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("Cannot accept an invitation which is not pending, the status of the invitation (%s) is (%s).", invitation.GetID(), invitation.GetStatus()),
|
||||
"Cannot accept an invitation which is not pending.",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewCannotDeclineNonPendingInvitationError(invitation model.Invitation) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"cannot_decline_non_pending_invitation",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("Cannot decline an invitation which is not pending, the status of the invitation (%s) is (%s).", invitation.GetID(), invitation.GetStatus()),
|
||||
"Cannot decline an invitation which is not pending.",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewCannotResendNonPendingInvitationError(invitation model.Invitation) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"cannot_resend_non_pending_invitation",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("Cannot resend an invitation which is not pending, the status of the invitation (%s) is (%s).", invitation.GetID(), invitation.GetStatus()),
|
||||
"Cannot resend an invitation which is not pending.",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewUserNotAllowedToAcceptInvitationError(user model.User, invitation model.Invitation) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"user_not_allowed_to_accept_invitation",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("User '%s' (%s) is not allowed to accept the invitation (%s).", user.GetUsername(), user.GetID(), invitation.GetID()),
|
||||
"Not allowed to accept this invitation.",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewUserNotAllowedToDeclineInvitationError(user model.User, invitation model.Invitation) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"user_not_allowed_to_decline_invitation",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("User '%s' (%s) is not allowed to decline the invitation (%s).", user.GetUsername(), user.GetID(), invitation.GetID()),
|
||||
"Not allowed to decline this invitation.",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewUserNotAllowedToDeleteInvitationError(user model.User, invitation model.Invitation) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"user_not_allowed_to_delete_invitation",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("User '%s' (%s) not allowed to delete the invitation (%s).", user.GetUsername(), user.GetID(), invitation.GetID()),
|
||||
"Not allowed to delete this invitation.",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewUserAlreadyMemberOfOrganizationError(user model.User, org model.Organization) *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"user_already_member_of_organization",
|
||||
http.StatusForbidden,
|
||||
fmt.Sprintf("User '%s' (%s) is already a member of the organization '%s' (%s).", user.GetUsername(), user.GetID(), org.GetName(), org.GetID()),
|
||||
fmt.Sprintf("You are already a member of the organization '%s'.", org.GetName()),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func NewInvalidAPIKeyError() *ErrorResponse {
|
||||
return NewErrorResponse(
|
||||
"invalid_api_key",
|
||||
http.StatusUnauthorized,
|
||||
"Invalid API key.",
|
||||
"The API key is either missing or invalid.",
|
||||
nil,
|
||||
)
|
||||
}
|
20
Downloads/Voltaserve/api/errorpkg/error_handler.go
Normal file
@ -0,0 +1,20 @@
|
||||
package errorpkg
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/log"
|
||||
)
|
||||
|
||||
func ErrorHandler(c *fiber.Ctx, err error) error {
|
||||
var e *ErrorResponse
|
||||
if errors.As(err, &e) {
|
||||
v := err.(*ErrorResponse)
|
||||
return c.Status(v.Status).JSON(v)
|
||||
} else {
|
||||
log.Error(err)
|
||||
return c.Status(http.StatusInternalServerError).JSON(NewInternalServerError(err))
|
||||
}
|
||||
}
|
31
Downloads/Voltaserve/api/errorpkg/error_response.go
Normal file
@ -0,0 +1,31 @@
|
||||
package errorpkg
|
||||
|
||||
import "fmt"
|
||||
|
||||
type ErrorResponse struct {
|
||||
Code string `json:"code"`
|
||||
Status int `json:"status"`
|
||||
Message string `json:"message"`
|
||||
UserMessage string `json:"userMessage"`
|
||||
MoreInfo string `json:"moreInfo"`
|
||||
Err error `json:"-"`
|
||||
}
|
||||
|
||||
func NewErrorResponse(code string, status int, message string, userMessage string, err error) *ErrorResponse {
|
||||
return &ErrorResponse{
|
||||
Code: code,
|
||||
Status: status,
|
||||
Message: message,
|
||||
UserMessage: userMessage,
|
||||
MoreInfo: fmt.Sprintf("https://voltaserve.com/docs/api/errors/%s", code),
|
||||
Err: err,
|
||||
}
|
||||
}
|
||||
|
||||
func (err ErrorResponse) Error() string {
|
||||
return fmt.Sprintf("%s %s", err.Code, err.Message)
|
||||
}
|
||||
|
||||
func (err ErrorResponse) Unwrap() error {
|
||||
return err.Err
|
||||
}
|
82
Downloads/Voltaserve/api/go.mod
Normal file
@ -0,0 +1,82 @@
|
||||
module voltaserve
|
||||
|
||||
go 1.21
|
||||
|
||||
toolchain go1.22.2
|
||||
|
||||
require (
|
||||
github.com/gabriel-vasile/mimetype v1.4.3
|
||||
github.com/go-playground/validator/v10 v10.19.0
|
||||
github.com/gofiber/contrib/jwt v1.0.8
|
||||
github.com/gofiber/fiber/v2 v2.52.4
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/gosimple/slug v1.14.0
|
||||
github.com/joho/godotenv v1.5.1
|
||||
github.com/meilisearch/meilisearch-go v0.26.2
|
||||
github.com/minio/minio-go/v7 v7.0.69
|
||||
github.com/reactivex/rxgo/v2 v2.5.0
|
||||
github.com/redis/go-redis/v9 v9.5.1
|
||||
github.com/speps/go-hashids/v2 v2.0.1
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
||||
gorm.io/datatypes v1.2.0
|
||||
gorm.io/driver/postgres v1.5.7
|
||||
gorm.io/gorm v1.25.9
|
||||
sigs.k8s.io/yaml v1.4.0
|
||||
)
|
||||
|
||||
require (
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/MicahParks/keyfunc/v2 v2.1.0 // indirect
|
||||
github.com/andybalholm/brotli v1.1.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-sql-driver/mysql v1.8.1 // indirect
|
||||
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
|
||||
github.com/gosimple/unidecode v1.0.1 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
|
||||
github.com/jackc/pgx/v5 v5.5.5 // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.1 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.17.8 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
||||
github.com/minio/md5-simd v1.1.2 // indirect
|
||||
github.com/minio/sha256-simd v1.0.1 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||
github.com/rs/xid v1.5.0 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/stretchr/testify v1.9.0 // indirect
|
||||
github.com/teivah/onecontext v1.3.0 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
github.com/valyala/fasthttp v1.52.0 // indirect
|
||||
github.com/valyala/tcplisten v1.0.0 // indirect
|
||||
golang.org/x/crypto v0.22.0 // indirect
|
||||
golang.org/x/net v0.24.0 // indirect
|
||||
golang.org/x/sync v0.7.0 // indirect
|
||||
golang.org/x/sys v0.19.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/tools v0.14.0 // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gorm.io/driver/mysql v1.5.6 // indirect
|
||||
)
|
228
Downloads/Voltaserve/api/go.sum
Normal file
@ -0,0 +1,228 @@
|
||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
github.com/MicahParks/keyfunc/v2 v2.1.0 h1:6ZXKb9Rp6qp1bDbJefnG7cTH8yMN1IC/4nf+GVjO99k=
|
||||
github.com/MicahParks/keyfunc/v2 v2.1.0/go.mod h1:rW42fi+xgLJ2FRRXAfNx9ZA8WpD4OeE/yHVMteCkw9k=
|
||||
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
|
||||
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
|
||||
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
|
||||
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
||||
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
|
||||
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
|
||||
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
||||
github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
|
||||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn0+wvQ3bZ8b/AU4=
|
||||
github.com/go-playground/validator/v10 v10.19.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
|
||||
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||
github.com/gofiber/contrib/jwt v1.0.8 h1:/GeOsm/Mr1OGr0GTy+RIVSz5VgNNyP3ZgK4wdqxF/WY=
|
||||
github.com/gofiber/contrib/jwt v1.0.8/go.mod h1:gWWBtBiLmKXRN7xy6a96QO0KGvPEyxdh8x496Ujtg84=
|
||||
github.com/gofiber/fiber/v2 v2.52.4 h1:P+T+4iK7VaqUsq2PALYEfBBo6bJZ4q3FP8cZ84EggTM=
|
||||
github.com/gofiber/fiber/v2 v2.52.4/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ=
|
||||
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
|
||||
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
|
||||
github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gosimple/slug v1.14.0 h1:RtTL/71mJNDfpUbCOmnf/XFkzKRtD6wL6Uy+3akm4Es=
|
||||
github.com/gosimple/slug v1.14.0/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ=
|
||||
github.com/gosimple/unidecode v1.0.1 h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o=
|
||||
github.com/gosimple/unidecode v1.0.1/go.mod h1:CP0Cr1Y1kogOtx0bJblKzsVWrqYaqfNOnHzpgWw4Awc=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 h1:L0QtFUgDarD7Fpv9jeVMgy/+Ec0mtnmYuImjTz6dtDA=
|
||||
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||
github.com/jackc/pgx/v5 v5.5.5 h1:amBjrZVmksIdNjxGW/IiIMzxMKZFelXbUoPNb+8sjQw=
|
||||
github.com/jackc/pgx/v5 v5.5.5/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=
|
||||
github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=
|
||||
github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
|
||||
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
|
||||
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
|
||||
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
|
||||
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
|
||||
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
||||
github.com/meilisearch/meilisearch-go v0.26.2 h1:3gTlmiV1dHHumVUhYdJbvh3camiNiyqQ1hNveVsU2OE=
|
||||
github.com/meilisearch/meilisearch-go v0.26.2/go.mod h1:SxuSqDcPBIykjWz1PX+KzsYzArNLSCadQodWs8extS0=
|
||||
github.com/microsoft/go-mssqldb v0.17.0 h1:Fto83dMZPnYv1Zwx5vHHxpNraeEaUlQ/hhHLgZiaenE=
|
||||
github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ=
|
||||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
||||
github.com/minio/minio-go/v7 v7.0.69 h1:l8AnsQFyY1xiwa/DaQskY4NXSLA2yrGsW5iD9nRPVS0=
|
||||
github.com/minio/minio-go/v7 v7.0.69/go.mod h1:XAvOPJQ5Xlzk5o3o/ArO2NMbhSGkimC+bpW/ngRKDmQ=
|
||||
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
|
||||
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/reactivex/rxgo/v2 v2.5.0 h1:FhPgHwX9vKdNQB2gq9EPt+EKk9QrrzoeztGbEEnZam4=
|
||||
github.com/reactivex/rxgo/v2 v2.5.0/go.mod h1:bs4fVZxcb5ZckLIOeIeVH942yunJLWDABWGbrHAW+qU=
|
||||
github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8=
|
||||
github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=
|
||||
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/speps/go-hashids/v2 v2.0.1 h1:ViWOEqWES/pdOSq+C1SLVa8/Tnsd52XC34RY7lt7m4g=
|
||||
github.com/speps/go-hashids/v2 v2.0.1/go.mod h1:47LKunwvDZki/uRVD6NImtyk712yFzIs3UF3KlHohGw=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/teivah/onecontext v0.0.0-20200513185103-40f981bfd775/go.mod h1:XUZ4x3oGhWfiOnUvTslnKKs39AWUct3g3yJvXTQSJOQ=
|
||||
github.com/teivah/onecontext v1.3.0 h1:tbikMhAlo6VhAuEGCvhc8HlTnpX4xTNPTOseWuhO1J0=
|
||||
github.com/teivah/onecontext v1.3.0/go.mod h1:hoW1nmdPVK/0jrvGtcx8sCKYs2PiS4z0zzfdeuEVyb0=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasthttp v1.37.1-0.20220607072126-8a320890c08d/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
|
||||
github.com/valyala/fasthttp v1.52.0 h1:wqBQpxH71XW0e2g+Og4dzQM8pk34aFYlA1Ga8db7gU0=
|
||||
github.com/valyala/fasthttp v1.52.0/go.mod h1:hf5C4QnVMkNXMspnsUlfM3WitlgYflyhHYoKol/szxQ=
|
||||
github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
|
||||
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
|
||||
go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
|
||||
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
|
||||
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
|
||||
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
|
||||
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
|
||||
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
|
||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/datatypes v1.2.0 h1:5YT+eokWdIxhJgWHdrb2zYUimyk0+TaFth+7a0ybzco=
|
||||
gorm.io/datatypes v1.2.0/go.mod h1:o1dh0ZvjIjhH/bngTpypG6lVRJ5chTBxE09FH/71k04=
|
||||
gorm.io/driver/mysql v1.5.6 h1:Ld4mkIickM+EliaQZQx3uOJDJHtrd70MxAUqWqlx3Y8=
|
||||
gorm.io/driver/mysql v1.5.6/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM=
|
||||
gorm.io/driver/postgres v1.5.7 h1:8ptbNJTDbEmhdr62uReG5BGkdQyeasu/FZHxI0IMGnM=
|
||||
gorm.io/driver/postgres v1.5.7/go.mod h1:3e019WlBaYI5o5LIdNV+LyxCMNtLOQETBXL2h4chKpA=
|
||||
gorm.io/driver/sqlite v1.4.3 h1:HBBcZSDnWi5BW3B3rwvVTc510KGkBkexlOg0QrmLUuU=
|
||||
gorm.io/driver/sqlite v1.4.3/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI=
|
||||
gorm.io/driver/sqlserver v1.4.1 h1:t4r4r6Jam5E6ejqP7N82qAJIJAht27EGT41HyPfXRw0=
|
||||
gorm.io/driver/sqlserver v1.4.1/go.mod h1:DJ4P+MeZbc5rvY58PnmN1Lnyvb5gw5NPzGshHDnJLig=
|
||||
gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||
gorm.io/gorm v1.25.9 h1:wct0gxZIELDk8+ZqF/MVnHLkA1rvYlBWUMv2EdsK1g8=
|
||||
gorm.io/gorm v1.25.9/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
|
||||
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
52
Downloads/Voltaserve/api/guard/file_guard.go
Normal file
@ -0,0 +1,52 @@
|
||||
package guard
|
||||
|
||||
import (
|
||||
"voltaserve/cache"
|
||||
"voltaserve/errorpkg"
|
||||
"voltaserve/model"
|
||||
|
||||
"github.com/gofiber/fiber/v2/log"
|
||||
)
|
||||
|
||||
type FileGuard struct {
|
||||
groupCache *cache.GroupCache
|
||||
}
|
||||
|
||||
func NewFileGuard() *FileGuard {
|
||||
return &FileGuard{
|
||||
groupCache: cache.NewGroupCache(),
|
||||
}
|
||||
}
|
||||
|
||||
func (g *FileGuard) IsAuthorized(user model.User, file model.File, permission string) bool {
|
||||
for _, p := range file.GetUserPermissions() {
|
||||
if p.GetUserID() == user.GetID() && model.IsEquivalentPermission(p.GetValue(), permission) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
for _, p := range file.GetGroupPermissions() {
|
||||
g, err := g.groupCache.Get(p.GetGroupID())
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return false
|
||||
}
|
||||
for _, u := range g.GetUsers() {
|
||||
if u == user.GetID() && model.IsEquivalentPermission(p.GetValue(), permission) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (g *FileGuard) Authorize(user model.User, file model.File, permission string) error {
|
||||
if !g.IsAuthorized(user, file, permission) {
|
||||
err := errorpkg.NewFilePermissionError(user, file, permission)
|
||||
if g.IsAuthorized(user, file, model.PermissionViewer) {
|
||||
return err
|
||||
} else {
|
||||
return errorpkg.NewOrganizationNotFoundError(err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
52
Downloads/Voltaserve/api/guard/group_guard.go
Normal file
@ -0,0 +1,52 @@
|
||||
package guard
|
||||
|
||||
import (
|
||||
"voltaserve/cache"
|
||||
"voltaserve/errorpkg"
|
||||
"voltaserve/model"
|
||||
|
||||
"github.com/gofiber/fiber/v2/log"
|
||||
)
|
||||
|
||||
type GroupGuard struct {
|
||||
groupCache *cache.GroupCache
|
||||
}
|
||||
|
||||
func NewGroupGuard() *GroupGuard {
|
||||
return &GroupGuard{
|
||||
groupCache: cache.NewGroupCache(),
|
||||
}
|
||||
}
|
||||
|
||||
func (g *GroupGuard) IsAuthorized(user model.User, group model.Group, permission string) bool {
|
||||
for _, p := range group.GetUserPermissions() {
|
||||
if p.GetUserID() == user.GetID() && model.IsEquivalentPermission(p.GetValue(), permission) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
for _, p := range group.GetGroupPermissions() {
|
||||
g, err := g.groupCache.Get(p.GetGroupID())
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return false
|
||||
}
|
||||
for _, u := range g.GetUsers() {
|
||||
if u == user.GetID() && model.IsEquivalentPermission(p.GetValue(), permission) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (g *GroupGuard) Authorize(user model.User, group model.Group, permission string) error {
|
||||
if !g.IsAuthorized(user, group, permission) {
|
||||
err := errorpkg.NewGroupPermissionError(user, group, permission)
|
||||
if g.IsAuthorized(user, group, model.PermissionViewer) {
|
||||
return err
|
||||
} else {
|
||||
return errorpkg.NewGroupNotFoundError(err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
52
Downloads/Voltaserve/api/guard/organization_guard.go
Normal file
@ -0,0 +1,52 @@
|
||||
package guard
|
||||
|
||||
import (
|
||||
"voltaserve/cache"
|
||||
"voltaserve/errorpkg"
|
||||
"voltaserve/model"
|
||||
|
||||
"github.com/gofiber/fiber/v2/log"
|
||||
)
|
||||
|
||||
type OrganizationGuard struct {
|
||||
groupCache *cache.GroupCache
|
||||
}
|
||||
|
||||
func NewOrganizationGuard() *OrganizationGuard {
|
||||
return &OrganizationGuard{
|
||||
groupCache: cache.NewGroupCache(),
|
||||
}
|
||||
}
|
||||
|
||||
func (g *OrganizationGuard) IsAuthorized(user model.User, org model.Organization, permission string) bool {
|
||||
for _, p := range org.GetUserPermissions() {
|
||||
if p.GetUserID() == user.GetID() && model.IsEquivalentPermission(p.GetValue(), permission) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
for _, p := range org.GetGroupPermissions() {
|
||||
g, err := g.groupCache.Get(p.GetGroupID())
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return false
|
||||
}
|
||||
for _, u := range g.GetUsers() {
|
||||
if u == user.GetID() && model.IsEquivalentPermission(p.GetValue(), permission) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (g *OrganizationGuard) Authorize(user model.User, org model.Organization, permission string) error {
|
||||
if !g.IsAuthorized(user, org, permission) {
|
||||
err := errorpkg.NewOrganizationPermissionError(user, org, permission)
|
||||
if g.IsAuthorized(user, org, model.PermissionViewer) {
|
||||
return err
|
||||
} else {
|
||||
return errorpkg.NewOrganizationNotFoundError(err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
52
Downloads/Voltaserve/api/guard/workspace_guard.go
Normal file
@ -0,0 +1,52 @@
|
||||
package guard
|
||||
|
||||
import (
|
||||
"voltaserve/cache"
|
||||
"voltaserve/errorpkg"
|
||||
"voltaserve/model"
|
||||
|
||||
"github.com/gofiber/fiber/v2/log"
|
||||
)
|
||||
|
||||
type WorkspaceGuard struct {
|
||||
groupCache *cache.GroupCache
|
||||
}
|
||||
|
||||
func NewWorkspaceGuard() *WorkspaceGuard {
|
||||
return &WorkspaceGuard{
|
||||
groupCache: cache.NewGroupCache(),
|
||||
}
|
||||
}
|
||||
|
||||
func (g *WorkspaceGuard) IsAuthorized(user model.User, workspace model.Workspace, permission string) bool {
|
||||
for _, p := range workspace.GetUserPermissions() {
|
||||
if p.GetUserID() == user.GetID() && model.IsEquivalentPermission(p.GetValue(), permission) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
for _, p := range workspace.GetGroupPermissions() {
|
||||
g, err := g.groupCache.Get(p.GetGroupID())
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return false
|
||||
}
|
||||
for _, u := range g.GetUsers() {
|
||||
if u == user.GetID() && model.IsEquivalentPermission(p.GetValue(), permission) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (g *WorkspaceGuard) Authorize(user model.User, workspace model.Workspace, permission string) error {
|
||||
if !g.IsAuthorized(user, workspace, permission) {
|
||||
err := errorpkg.NewWorkspacePermissionError(user, workspace, permission)
|
||||
if g.IsAuthorized(user, workspace, model.PermissionViewer) {
|
||||
return err
|
||||
} else {
|
||||
return errorpkg.NewWorkspaceNotFoundError(err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
22
Downloads/Voltaserve/api/helper/id.go
Normal file
@ -0,0 +1,22 @@
|
||||
package helper
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/speps/go-hashids/v2"
|
||||
)
|
||||
|
||||
func NewID() string {
|
||||
hd := hashids.NewData()
|
||||
hd.Salt = uuid.NewString()
|
||||
h, err := hashids.NewWithData(hd)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
id, err := h.EncodeInt64([]int64{time.Now().UTC().UnixNano()})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return id
|
||||
}
|
5
Downloads/Voltaserve/api/helper/unit.go
Normal file
@ -0,0 +1,5 @@
|
||||
package helper
|
||||
|
||||
func MegabyteToByte(mb int) int64 {
|
||||
return int64(mb) * 1000000
|
||||
}
|
17
Downloads/Voltaserve/api/helper/workspace.go
Normal file
@ -0,0 +1,17 @@
|
||||
package helper
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/gosimple/slug"
|
||||
)
|
||||
|
||||
func SlugFromWorkspace(id string, name string) string {
|
||||
return fmt.Sprintf("%s-%s", slug.Make(name), id)
|
||||
}
|
||||
|
||||
func WorkspaceIDFromSlug(slug string) string {
|
||||
parts := strings.Split(slug, "-")
|
||||
return parts[len(parts)-1]
|
||||
}
|
22
Downloads/Voltaserve/api/infra/db.go
Normal file
@ -0,0 +1,22 @@
|
||||
package infra
|
||||
|
||||
import (
|
||||
"voltaserve/config"
|
||||
|
||||
"gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var db *gorm.DB
|
||||
|
||||
func GetDb() *gorm.DB {
|
||||
if db != nil {
|
||||
return db
|
||||
}
|
||||
var err error
|
||||
db, err = gorm.Open(postgres.Open(config.GetConfig().DatabaseURL), &gorm.Config{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return db
|
||||
}
|
123
Downloads/Voltaserve/api/infra/file_identifier.go
Normal file
@ -0,0 +1,123 @@
|
||||
package infra
|
||||
|
||||
import "strings"
|
||||
|
||||
type FileIdentifier struct {
|
||||
}
|
||||
|
||||
func NewFileIdentifier() *FileIdentifier {
|
||||
return &FileIdentifier{}
|
||||
}
|
||||
|
||||
func (fi *FileIdentifier) IsPDF(extension string) bool {
|
||||
return strings.ToLower(extension) == ".pdf"
|
||||
}
|
||||
|
||||
func (fi *FileIdentifier) IsOffice(extension string) bool {
|
||||
extensions := []string{
|
||||
".xls",
|
||||
".doc",
|
||||
".ppt",
|
||||
".xlsx",
|
||||
".docx",
|
||||
".pptx",
|
||||
".odt",
|
||||
".ott",
|
||||
".ods",
|
||||
".ots",
|
||||
".odp",
|
||||
".otp",
|
||||
".odg",
|
||||
".otg",
|
||||
".odf",
|
||||
".odc",
|
||||
".rtf",
|
||||
}
|
||||
for _, v := range extensions {
|
||||
if strings.ToLower(extension) == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (fi *FileIdentifier) IsPlainText(extension string) bool {
|
||||
extensions := []string{
|
||||
".txt",
|
||||
".html",
|
||||
".js",
|
||||
"jsx",
|
||||
".ts",
|
||||
".tsx",
|
||||
".css",
|
||||
".sass",
|
||||
".scss",
|
||||
".go",
|
||||
".py",
|
||||
".rb",
|
||||
".java",
|
||||
".c",
|
||||
".h",
|
||||
".cpp",
|
||||
".hpp",
|
||||
".json",
|
||||
".yml",
|
||||
".yaml",
|
||||
".toml",
|
||||
".md",
|
||||
}
|
||||
for _, v := range extensions {
|
||||
if strings.ToLower(extension) == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (fi *FileIdentifier) IsImage(extension string) bool {
|
||||
extensions := []string{
|
||||
".xpm",
|
||||
".png",
|
||||
".jpg",
|
||||
".jpeg",
|
||||
".jp2",
|
||||
".gif",
|
||||
".webp",
|
||||
".tiff",
|
||||
".bmp",
|
||||
".ico",
|
||||
".heif",
|
||||
".xcf",
|
||||
".svg",
|
||||
}
|
||||
for _, v := range extensions {
|
||||
if strings.ToLower(extension) == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (fi *FileIdentifier) IsVideo(extension string) bool {
|
||||
extensions := []string{
|
||||
".ogv",
|
||||
".mpeg",
|
||||
".mov",
|
||||
".mqv",
|
||||
".mp4",
|
||||
".webm",
|
||||
".3gp",
|
||||
".3g2",
|
||||
".avi",
|
||||
".flv",
|
||||
".mkv",
|
||||
".asf",
|
||||
".m4v",
|
||||
}
|
||||
for _, v := range extensions {
|
||||
if strings.ToLower(extension) == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
99
Downloads/Voltaserve/api/infra/mail.go
Normal file
@ -0,0 +1,99 @@
|
||||
package infra
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"voltaserve/config"
|
||||
|
||||
"github.com/gofiber/fiber/v2/log"
|
||||
"gopkg.in/gomail.v2"
|
||||
"sigs.k8s.io/yaml"
|
||||
|
||||
"text/template"
|
||||
)
|
||||
|
||||
type MessageParams struct {
|
||||
Subject string
|
||||
}
|
||||
|
||||
type MailTemplate struct {
|
||||
dialer *gomail.Dialer
|
||||
config config.SMTPConfig
|
||||
}
|
||||
|
||||
func NewMailTemplate() *MailTemplate {
|
||||
mt := new(MailTemplate)
|
||||
mt.config = config.GetConfig().SMTP
|
||||
mt.dialer = gomail.NewDialer(mt.config.Host, mt.config.Port, mt.config.Username, mt.config.Password)
|
||||
return mt
|
||||
}
|
||||
|
||||
func (mt *MailTemplate) Send(templateName string, address string, variables map[string]string) error {
|
||||
html, err := mt.GetText(filepath.FromSlash("templates/"+templateName+"/template.html"), variables)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
text, err := mt.GetText(filepath.FromSlash("templates/"+templateName+"/template.txt"), variables)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
params, err := mt.GetMessageParams(templateName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m := gomail.NewMessage()
|
||||
m.SetHeader("From", fmt.Sprintf(`"%s" <%s>`, mt.config.SenderName, mt.config.SenderAddress))
|
||||
m.SetHeader("To", address)
|
||||
m.SetHeader("Subject", params.Subject)
|
||||
m.SetBody("text/plain ", text)
|
||||
m.AddAlternative("text/html", html)
|
||||
if err := mt.dialer.DialAndSend(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mt *MailTemplate) GetText(path string, variables map[string]string) (string, error) {
|
||||
f, err := os.Open(path)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer func(f *os.File) {
|
||||
if err := f.Close(); err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
}(f)
|
||||
b, _ := io.ReadAll(f)
|
||||
html := string(b)
|
||||
tmpl, err := template.New("").Parse(html)
|
||||
if err != nil {
|
||||
return "", nil
|
||||
}
|
||||
var buf bytes.Buffer
|
||||
err = tmpl.Execute(&buf, variables)
|
||||
if err != nil {
|
||||
return "", nil
|
||||
}
|
||||
return buf.String(), nil
|
||||
}
|
||||
|
||||
func (mt *MailTemplate) GetMessageParams(templateName string) (*MessageParams, error) {
|
||||
f, err := os.Open(filepath.FromSlash("templates/" + templateName + "/params.yml"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func(f *os.File) {
|
||||
if err := f.Close(); err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
}(f)
|
||||
b, _ := io.ReadAll(f)
|
||||
res := &MessageParams{}
|
||||
if err := yaml.Unmarshal(b, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return res, nil
|
||||
}
|
15
Downloads/Voltaserve/api/infra/mime.go
Normal file
@ -0,0 +1,15 @@
|
||||
package infra
|
||||
|
||||
import "github.com/gabriel-vasile/mimetype"
|
||||
|
||||
func DetectMimeFromFile(path string) string {
|
||||
mime, err := mimetype.DetectFile(path)
|
||||
if err != nil {
|
||||
return "application/octet-stream"
|
||||
}
|
||||
return mime.String()
|
||||
}
|
||||
|
||||
func DetectMimeFromBytes(b []byte) string {
|
||||
return mimetype.Detect(b).String()
|
||||
}
|
113
Downloads/Voltaserve/api/infra/redis.go
Normal file
@ -0,0 +1,113 @@
|
||||
package infra
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"voltaserve/config"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
type RedisManager struct {
|
||||
config config.RedisConfig
|
||||
client *redis.Client
|
||||
clusterClient *redis.ClusterClient
|
||||
}
|
||||
|
||||
func NewRedisManager() *RedisManager {
|
||||
mgr := new(RedisManager)
|
||||
mgr.config = config.GetConfig().Redis
|
||||
return mgr
|
||||
}
|
||||
|
||||
func (mgr *RedisManager) Set(key string, value interface{}) error {
|
||||
if mgr.client == nil && mgr.clusterClient == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if mgr.clusterClient != nil {
|
||||
if _, err := mgr.clusterClient.Set(context.Background(), key, value, 0).Result(); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if _, err := mgr.client.Set(context.Background(), key, value, 0).Result(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *RedisManager) Get(key string) (string, error) {
|
||||
if mgr.client == nil && mgr.clusterClient == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
if mgr.clusterClient != nil {
|
||||
value, err := mgr.clusterClient.Get(context.Background(), key).Result()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return value, nil
|
||||
} else {
|
||||
value, err := mgr.client.Get(context.Background(), key).Result()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return value, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (mgr *RedisManager) Delete(key string) error {
|
||||
if mgr.client == nil && mgr.clusterClient == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if mgr.clusterClient != nil {
|
||||
if _, err := mgr.clusterClient.Del(context.Background(), key).Result(); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if _, err := mgr.client.Del(context.Background(), key).Result(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *RedisManager) Close() error {
|
||||
if mgr.client != nil {
|
||||
if err := mgr.client.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *RedisManager) connect() error {
|
||||
if mgr.client != nil || mgr.clusterClient != nil {
|
||||
return nil
|
||||
}
|
||||
addresses := strings.Split(mgr.config.Address, ";")
|
||||
if len(addresses) > 1 {
|
||||
mgr.clusterClient = redis.NewClusterClient(&redis.ClusterOptions{
|
||||
Addrs: addresses,
|
||||
Password: mgr.config.Password,
|
||||
})
|
||||
if err := mgr.clusterClient.Ping(context.Background()).Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
mgr.client = redis.NewClient(&redis.Options{
|
||||
Addr: mgr.config.Address,
|
||||
Password: mgr.config.Password,
|
||||
DB: mgr.config.DB,
|
||||
})
|
||||
if err := mgr.client.Ping(context.Background()).Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
205
Downloads/Voltaserve/api/infra/s3.go
Normal file
@ -0,0 +1,205 @@
|
||||
package infra
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"strings"
|
||||
"voltaserve/config"
|
||||
"voltaserve/errorpkg"
|
||||
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio-go/v7/pkg/credentials"
|
||||
"github.com/minio/minio-go/v7/pkg/sse"
|
||||
)
|
||||
|
||||
type S3Manager struct {
|
||||
config config.S3Config
|
||||
client *minio.Client
|
||||
}
|
||||
|
||||
func NewS3Manager() *S3Manager {
|
||||
mgr := new(S3Manager)
|
||||
mgr.config = config.GetConfig().S3
|
||||
return mgr
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) GetFile(objectName string, filePath string, bucketName string) error {
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := mgr.client.FGetObject(context.Background(), bucketName, objectName, filePath, minio.GetObjectOptions{}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) PutFile(objectName string, filePath string, contentType string, bucketName string) error {
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if contentType == "" {
|
||||
contentType = "application/octet-stream"
|
||||
}
|
||||
if _, err := mgr.client.FPutObject(context.Background(), bucketName, objectName, filePath, minio.PutObjectOptions{
|
||||
ContentType: contentType,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) PutText(objectName string, text string, contentType string, bucketName string) error {
|
||||
if contentType != "" && contentType != "text/plain" && contentType != "application/json" {
|
||||
return errorpkg.NewS3Error("Invalid content type '" + contentType + "'")
|
||||
}
|
||||
if contentType == "" {
|
||||
contentType = "text/plain"
|
||||
}
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if _, err := mgr.client.PutObject(context.Background(), bucketName, objectName, strings.NewReader(text), int64(len(text)), minio.PutObjectOptions{
|
||||
ContentType: contentType,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) GetObject(objectName string, bucketName string) (*bytes.Buffer, error) {
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
reader, err := mgr.client.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var buf bytes.Buffer
|
||||
_, err = io.Copy(io.Writer(&buf), reader)
|
||||
if err != nil {
|
||||
return nil, nil
|
||||
}
|
||||
return &buf, nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) GetText(objectName string, bucketName string) (string, error) {
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
reader, err := mgr.client.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
buf := new(strings.Builder)
|
||||
_, err = io.Copy(buf, reader)
|
||||
if err != nil {
|
||||
return "", nil
|
||||
}
|
||||
return buf.String(), nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) RemoveObject(objectName string, bucketName string) error {
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
err := mgr.client.RemoveObject(context.Background(), bucketName, objectName, minio.RemoveObjectOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) CreateBucket(bucketName string) error {
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
found, err := mgr.client.BucketExists(context.Background(), bucketName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !found {
|
||||
if err = mgr.client.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{
|
||||
Region: mgr.config.Region,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) RemoveBucket(bucketName string) error {
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
found, err := mgr.client.BucketExists(context.Background(), bucketName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !found {
|
||||
return nil
|
||||
}
|
||||
objectCh := mgr.client.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{
|
||||
Prefix: "",
|
||||
Recursive: true,
|
||||
})
|
||||
mgr.client.RemoveObjects(context.Background(), bucketName, objectCh, minio.RemoveObjectsOptions{})
|
||||
if err = mgr.client.RemoveBucket(context.Background(), bucketName); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) EnableBucketEncryption(bucketName string) error {
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
err := mgr.client.SetBucketEncryption(context.Background(), bucketName, sse.NewConfigurationSSES3())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) DisableBucketEncryption(bucketName string) error {
|
||||
if mgr.client == nil {
|
||||
if err := mgr.connect(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
err := mgr.client.RemoveBucketEncryption(context.Background(), bucketName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *S3Manager) connect() error {
|
||||
client, err := minio.New(mgr.config.URL, &minio.Options{
|
||||
Creds: credentials.NewStaticV4(mgr.config.AccessKey, mgr.config.SecretKey, ""),
|
||||
Secure: mgr.config.Secure,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
mgr.client = client
|
||||
return nil
|
||||
}
|
123
Downloads/Voltaserve/api/infra/search.go
Normal file
@ -0,0 +1,123 @@
|
||||
package infra
|
||||
|
||||
import (
|
||||
"voltaserve/config"
|
||||
|
||||
"github.com/meilisearch/meilisearch-go"
|
||||
)
|
||||
|
||||
var searchClient *meilisearch.Client
|
||||
|
||||
const (
|
||||
FileSearchIndex = "file"
|
||||
GroupSearchIndex = "group"
|
||||
WorkspaceSearchIndex = "workspace"
|
||||
OrganizationSearchIndex = "organization"
|
||||
UserSearchIndex = "user"
|
||||
)
|
||||
|
||||
type SearchModel interface {
|
||||
GetID() string
|
||||
}
|
||||
|
||||
type SearchManager struct {
|
||||
config config.SearchConfig
|
||||
}
|
||||
|
||||
func NewSearchManager() *SearchManager {
|
||||
if searchClient == nil {
|
||||
searchClient = meilisearch.NewClient(meilisearch.ClientConfig{
|
||||
Host: config.GetConfig().Search.URL,
|
||||
})
|
||||
if _, err := searchClient.CreateIndex(&meilisearch.IndexConfig{
|
||||
Uid: FileSearchIndex,
|
||||
PrimaryKey: "id",
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if _, err := searchClient.Index(FileSearchIndex).UpdateSettings(&meilisearch.Settings{
|
||||
SearchableAttributes: []string{"name", "text"},
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if _, err := searchClient.CreateIndex(&meilisearch.IndexConfig{
|
||||
Uid: GroupSearchIndex,
|
||||
PrimaryKey: "id",
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if _, err := searchClient.Index(GroupSearchIndex).UpdateSettings(&meilisearch.Settings{
|
||||
SearchableAttributes: []string{"name"},
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if _, err := searchClient.CreateIndex(&meilisearch.IndexConfig{
|
||||
Uid: WorkspaceSearchIndex,
|
||||
PrimaryKey: "id",
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if _, err := searchClient.Index(WorkspaceSearchIndex).UpdateSettings(&meilisearch.Settings{
|
||||
SearchableAttributes: []string{"name"},
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if _, err := searchClient.CreateIndex(&meilisearch.IndexConfig{
|
||||
Uid: OrganizationSearchIndex,
|
||||
PrimaryKey: "id",
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if _, err := searchClient.Index(OrganizationSearchIndex).UpdateSettings(&meilisearch.Settings{
|
||||
SearchableAttributes: []string{"name"},
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if _, err := searchClient.CreateIndex(&meilisearch.IndexConfig{
|
||||
Uid: UserSearchIndex,
|
||||
PrimaryKey: "id",
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if _, err := searchClient.Index(UserSearchIndex).UpdateSettings(&meilisearch.Settings{
|
||||
SearchableAttributes: []string{"fullName", "email"},
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
return &SearchManager{
|
||||
config: config.GetConfig().Search,
|
||||
}
|
||||
}
|
||||
|
||||
func (mgr *SearchManager) Query(index string, query string) ([]interface{}, error) {
|
||||
res, err := searchClient.Index(index).Search(query, &meilisearch.SearchRequest{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return res.Hits, nil
|
||||
}
|
||||
|
||||
func (mgr *SearchManager) Index(index string, models []SearchModel) error {
|
||||
_, err := searchClient.Index(index).AddDocuments(models)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *SearchManager) Update(index string, m []SearchModel) error {
|
||||
_, err := searchClient.Index(index).UpdateDocuments(m)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mgr *SearchManager) Delete(index string, ids []string) error {
|
||||
_, err := searchClient.Index(index).DeleteDocuments(ids)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
92
Downloads/Voltaserve/api/main.go
Normal file
@ -0,0 +1,92 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/cors"
|
||||
|
||||
"voltaserve/config"
|
||||
"voltaserve/errorpkg"
|
||||
"voltaserve/helper"
|
||||
"voltaserve/router"
|
||||
|
||||
jwtware "github.com/gofiber/contrib/jwt"
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
// @title Voltaserve API
|
||||
// @version 1.0.0
|
||||
// @BasePath /v1
|
||||
func main() {
|
||||
if _, err := os.Stat(".env.local"); err == nil {
|
||||
err := godotenv.Load(".env.local")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
} else {
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
cfg := config.GetConfig()
|
||||
|
||||
app := fiber.New(fiber.Config{
|
||||
ErrorHandler: errorpkg.ErrorHandler,
|
||||
BodyLimit: int(helper.MegabyteToByte(cfg.Limits.MultipartBodyLengthLimitMB)),
|
||||
})
|
||||
|
||||
v1 := app.Group("/v1")
|
||||
|
||||
f := v1.Group("files")
|
||||
|
||||
app.Get("v1/health", func(c *fiber.Ctx) error {
|
||||
return c.SendStatus(200)
|
||||
})
|
||||
|
||||
app.Use(cors.New(cors.Config{
|
||||
AllowOrigins: strings.Join(cfg.Security.CORSOrigins, ","),
|
||||
}))
|
||||
|
||||
fileDownloads := router.NewFileDownloadRouter()
|
||||
fileDownloads.AppendNonJWTRoutes(f)
|
||||
|
||||
conversionWebhook := router.NewConversionWebhookRouter()
|
||||
conversionWebhook.AppendInternalRoutes(f)
|
||||
|
||||
app.Use(jwtware.New(jwtware.Config{
|
||||
SigningKey: jwtware.SigningKey{Key: []byte(cfg.Security.JWTSigningKey)},
|
||||
}))
|
||||
|
||||
files := router.NewFileRouter()
|
||||
files.AppendRoutes(f)
|
||||
|
||||
invitations := router.NewInvitationRouter()
|
||||
invitations.AppendRoutes(v1.Group("invitations"))
|
||||
|
||||
notifications := router.NewNotificationRouter()
|
||||
notifications.AppendRoutes(v1.Group("notifications"))
|
||||
|
||||
organizations := router.NewOrganizationRouter()
|
||||
organizations.AppendRoutes(v1.Group("organizations"))
|
||||
|
||||
storage := router.NewStorageRouter()
|
||||
storage.AppendRoutes(v1.Group("storage"))
|
||||
|
||||
workspaces := router.NewWorkspaceRouter()
|
||||
workspaces.AppendRoutes(v1.Group("workspaces"))
|
||||
|
||||
groups := router.NewGroupRouter()
|
||||
groups.AppendRoutes(v1.Group("groups"))
|
||||
|
||||
users := router.NewUserRouter()
|
||||
users.AppendRoutes(v1.Group("users"))
|
||||
|
||||
if err := app.Listen(fmt.Sprintf(":%d", cfg.Port)); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
28
Downloads/Voltaserve/api/model/file_model.go
Normal file
@ -0,0 +1,28 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
FileTypeFile = "file"
|
||||
FileTypeFolder = "folder"
|
||||
)
|
||||
|
||||
type File interface {
|
||||
GetID() string
|
||||
GetWorkspaceID() string
|
||||
GetName() string
|
||||
GetType() string
|
||||
GetParentID() *string
|
||||
GetCreateTime() string
|
||||
GetUpdateTime() *string
|
||||
GetSnapshots() []Snapshot
|
||||
GetUserPermissions() []CoreUserPermission
|
||||
GetGroupPermissions() []CoreGroupPermission
|
||||
GetText() *string
|
||||
SetID(string)
|
||||
SetParentID(*string)
|
||||
SetWorkspaceID(string)
|
||||
SetType(string)
|
||||
SetName(string)
|
||||
SetText(*string)
|
||||
SetCreateTime(string)
|
||||
SetUpdateTime(*string)
|
||||
}
|
14
Downloads/Voltaserve/api/model/group_model.go
Normal file
@ -0,0 +1,14 @@
|
||||
package model
|
||||
|
||||
type Group interface {
|
||||
GetID() string
|
||||
GetName() string
|
||||
GetOrganizationID() string
|
||||
GetUserPermissions() []CoreUserPermission
|
||||
GetGroupPermissions() []CoreGroupPermission
|
||||
GetUsers() []string
|
||||
GetCreateTime() string
|
||||
GetUpdateTime() *string
|
||||
SetName(string)
|
||||
SetUpdateTime(*string)
|
||||
}
|
19
Downloads/Voltaserve/api/model/invitation_model.go
Normal file
@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
InvitationStatusPending = "pending"
|
||||
InvitationStatusAccepted = "accepted"
|
||||
InvitationStatusDeclined = "declined"
|
||||
)
|
||||
|
||||
type Invitation interface {
|
||||
GetID() string
|
||||
GetOrganizationID() string
|
||||
GetOwnerID() string
|
||||
GetEmail() string
|
||||
GetStatus() string
|
||||
GetCreateTime() string
|
||||
GetUpdateTime() *string
|
||||
SetStatus(string)
|
||||
SetUpdateTime(*string)
|
||||
}
|
13
Downloads/Voltaserve/api/model/organization_model.go
Normal file
@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
type Organization interface {
|
||||
GetID() string
|
||||
GetName() string
|
||||
GetUserPermissions() []CoreUserPermission
|
||||
GetGroupPermissions() []CoreGroupPermission
|
||||
GetUsers() []string
|
||||
GetCreateTime() string
|
||||
GetUpdateTime() *string
|
||||
SetName(string)
|
||||
SetUpdateTime(*string)
|
||||
}
|
58
Downloads/Voltaserve/api/model/permission_model.go
Normal file
@ -0,0 +1,58 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
PermissionViewer = "viewer"
|
||||
PermissionEditor = "editor"
|
||||
PermissionOwner = "owner"
|
||||
)
|
||||
|
||||
type CoreUserPermission interface {
|
||||
GetUserID() string
|
||||
GetValue() string
|
||||
}
|
||||
|
||||
type CoreGroupPermission interface {
|
||||
GetGroupID() string
|
||||
GetValue() string
|
||||
}
|
||||
|
||||
func GteViewerPermission(permission string) bool {
|
||||
return permission == PermissionViewer || permission == PermissionEditor || permission == PermissionOwner
|
||||
}
|
||||
|
||||
func GteEditorPermission(permission string) bool {
|
||||
return permission == PermissionEditor || permission == PermissionOwner
|
||||
}
|
||||
|
||||
func GteOwnerPermission(permission string) bool {
|
||||
return permission == PermissionOwner
|
||||
}
|
||||
|
||||
func IsEquivalentPermission(permission string, otherPermission string) bool {
|
||||
if permission == otherPermission {
|
||||
return true
|
||||
}
|
||||
if otherPermission == PermissionViewer && GteViewerPermission(permission) {
|
||||
return true
|
||||
}
|
||||
if otherPermission == PermissionEditor && GteEditorPermission(permission) {
|
||||
return true
|
||||
}
|
||||
if otherPermission == PermissionOwner && GteOwnerPermission(permission) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func GetPermissionWeight(permission string) int {
|
||||
if permission == PermissionViewer {
|
||||
return 1
|
||||
}
|
||||
if permission == PermissionEditor {
|
||||
return 2
|
||||
}
|
||||
if permission == PermissionOwner {
|
||||
return 3
|
||||
}
|
||||
return 0
|
||||
}
|
49
Downloads/Voltaserve/api/model/snapshot_model.go
Normal file
@ -0,0 +1,49 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
SnapshotStatusNew = "new"
|
||||
SnapshotStatusProcessing = "processing"
|
||||
SnapshotStatusReady = "ready"
|
||||
SnapshotStatusError = "error"
|
||||
)
|
||||
|
||||
type Snapshot interface {
|
||||
GetID() string
|
||||
GetVersion() int64
|
||||
GetOriginal() *S3Object
|
||||
GetPreview() *S3Object
|
||||
GetText() *S3Object
|
||||
GetThumbnail() *Thumbnail
|
||||
HasOriginal() bool
|
||||
HasPreview() bool
|
||||
HasText() bool
|
||||
HasThumbnail() bool
|
||||
GetStatus() string
|
||||
GetCreateTime() string
|
||||
GetUpdateTime() *string
|
||||
SetID(string)
|
||||
SetVersion(int64)
|
||||
SetOriginal(*S3Object)
|
||||
SetPreview(*S3Object)
|
||||
SetText(*S3Object)
|
||||
SetThumbnail(*Thumbnail)
|
||||
SetStatus(string)
|
||||
}
|
||||
|
||||
type S3Object struct {
|
||||
Bucket string `json:"bucket"`
|
||||
Key string `json:"key"`
|
||||
Size int64 `json:"size"`
|
||||
Image *ImageProps `json:"image,omitempty"`
|
||||
}
|
||||
|
||||
type ImageProps struct {
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
}
|
||||
|
||||
type Thumbnail struct {
|
||||
Base64 string `json:"base64"`
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
}
|
12
Downloads/Voltaserve/api/model/user_model.go
Normal file
@ -0,0 +1,12 @@
|
||||
package model
|
||||
|
||||
type User interface {
|
||||
GetID() string
|
||||
GetFullName() string
|
||||
GetUsername() string
|
||||
GetEmail() string
|
||||
GetPicture() *string
|
||||
GetIsEmailConfirmed() bool
|
||||
GetCreateTime() string
|
||||
GetUpdateTime() *string
|
||||
}
|