FEATURE (databasus): Migrate to new name

This commit is contained in:
Rostislav Dugin
2025-12-25 21:26:53 +03:00
parent 24c97a7070
commit b44ce1f3ea
217 changed files with 1095 additions and 1058 deletions

View File

@@ -21,6 +21,7 @@ backend/*.exe
# Scripts and data directories # Scripts and data directories
scripts scripts
postgresus-data postgresus-data
databasus-data
# IDE and editor files # IDE and editor files
.idea .idea

View File

@@ -2,7 +2,7 @@
## Our Pledge ## Our Pledge
We as members, contributors and maintainers pledge to make participation in the Postgresus community a friendly and welcoming experience for everyone, regardless of background, experience level or personal circumstances. We as members, contributors and maintainers pledge to make participation in the Databasus community a friendly and welcoming experience for everyone, regardless of background, experience level or personal circumstances.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive and healthy community. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive and healthy community.
@@ -31,10 +31,10 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div
This Code of Conduct applies within all community spaces, including: This Code of Conduct applies within all community spaces, including:
- GitHub repositories (issues, pull requests, discussions, comments) - GitHub repositories (issues, pull requests, discussions, comments)
- Telegram channels and direct messages related to Postgresus - Telegram channels and direct messages related to Databasus
- Social media interactions when representing the project - Social media interactions when representing the project
- Community forums and online discussions - Community forums and online discussions
- Any other spaces where Postgresus community members interact - Any other spaces where Databasus community members interact
This Code of Conduct also applies when an individual is officially representing the community in public spaces, such as using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. This Code of Conduct also applies when an individual is officially representing the community in public spaces, such as using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
@@ -42,7 +42,7 @@ This Code of Conduct also applies when an individual is officially representing
Instances of abusive or unacceptable behavior may be reported to the community leaders responsible for enforcement: Instances of abusive or unacceptable behavior may be reported to the community leaders responsible for enforcement:
- **Email**: [info@postgresus.com](mailto:info@postgresus.com) - **Email**: [info@databasus.com](mailto:info@databasus.com)
- **Telegram**: [@rostislav_dugin](https://t.me/rostislav_dugin) - **Telegram**: [@rostislav_dugin](https://t.me/rostislav_dugin)
All complaints will be reviewed and investigated promptly and fairly. All complaints will be reviewed and investigated promptly and fairly.
@@ -79,13 +79,13 @@ Community leaders will follow these Community Impact Guidelines in determining t
## Contributing with Respect ## Contributing with Respect
When contributing to Postgresus, please: When contributing to Databasus, please:
- Be patient with maintainers and other contributors - Be patient with maintainers and other contributors
- Understand that everyone has different levels of experience - Understand that everyone has different levels of experience
- Ask questions in a respectful manner - Ask questions in a respectful manner
- Accept that your contribution may not be accepted, and be open to feedback - Accept that your contribution may not be accepted, and be open to feedback
- Follow the [contribution guidelines](https://postgresus.com/contribute) - Follow the [contribution guidelines](https://databasus.com/contribute)
For code contributions, remember to: For code contributions, remember to:

28
.github/SECURITY.md vendored
View File

@@ -2,13 +2,13 @@
## Reporting a Vulnerability ## Reporting a Vulnerability
If you discover a security vulnerability in Postgresus, please report it responsibly. **Do not create a public GitHub issue for security vulnerabilities.** If you discover a security vulnerability in Databasus, please report it responsibly. **Do not create a public GitHub issue for security vulnerabilities.**
### How to Report ### How to Report
1. **Email** (preferred): Send details to [info@postgresus.com](mailto:info@postgresus.com) 1. **Email** (preferred): Send details to [info@databasus.com](mailto:info@databasus.com)
2. **Telegram**: Contact [@rostislav_dugin](https://t.me/rostislav_dugin) 2. **Telegram**: Contact [@rostislav_dugin](https://t.me/rostislav_dugin)
3. **GitHub Security Advisories**: Use the [private vulnerability reporting](https://github.com/RostislavDugin/postgresus/security/advisories/new) feature 3. **GitHub Security Advisories**: Use the [private vulnerability reporting](https://github.com/databasus/databasus/security/advisories/new) feature
### What to Include ### What to Include
@@ -23,11 +23,23 @@ If you discover a security vulnerability in Postgresus, please report it respons
| ------- | --------- | | ------- | --------- |
| Latest | Yes | | Latest | Yes |
We recommend always using the latest version of Postgresus. Security patches are applied to the most recent release. We recommend always using the latest version of Databasus. Security patches are applied to the most recent release.
### PostgreSQL Compatibility ### PostgreSQL Compatibility
Postgresus supports PostgreSQL versions 12, 13, 14, 15, 16, 17 and 18. Databasus supports PostgreSQL versions 12, 13, 14, 15, 16, 17 and 18.
### MySQL Compatibility
Databasus supports MySQL versions 5.7, 8 and 9.
### MariaDB Compatibility
Databasus supports MariaDB versions 10 and 11.
### MongoDB Compatibility
Databasus supports MongoDB versions 4, 5, 6, 7 and 8.
## Response Timeline ## Response Timeline
@@ -39,16 +51,16 @@ We follow a coordinated disclosure policy. We ask that you give us reasonable ti
## Security Features ## Security Features
Postgresus is designed with security in mind. For full details, see our [security documentation](https://postgresus.com/security). Databasus is designed with security in mind. For full details, see our [security documentation](https://databasus.com/security).
Key features include: Key features include:
- **AES-256-GCM Encryption**: Enterprise-grade encryption for backup files and sensitive data - **AES-256-GCM Encryption**: Enterprise-grade encryption for backup files and sensitive data
- **Read-Only Database Access**: Postgresus uses read-only access by default and warns if write permissions are detected - **Read-Only Database Access**: Databasus uses read-only access by default and warns if write permissions are detected
- **Role-Based Access Control**: Assign viewer, member, admin or owner roles within workspaces - **Role-Based Access Control**: Assign viewer, member, admin or owner roles within workspaces
- **Audit Logging**: Track all system activities and changes made by users - **Audit Logging**: Track all system activities and changes made by users
- **Zero-Trust Storage**: Encrypted backups are safe even in shared cloud storage - **Zero-Trust Storage**: Encrypted backups are safe even in shared cloud storage
## License ## License
Postgresus is licensed under [Apache 2.0](../LICENSE). Databasus is licensed under [Apache 2.0](../LICENSE).

View File

@@ -151,17 +151,17 @@ jobs:
cd backend cd backend
cat > .env << EOF cat > .env << EOF
# docker-compose.yml # docker-compose.yml
DEV_DB_NAME=postgresus DEV_DB_NAME=databasus
DEV_DB_USERNAME=postgres DEV_DB_USERNAME=postgres
DEV_DB_PASSWORD=Q1234567 DEV_DB_PASSWORD=Q1234567
#app #app
ENV_MODE=development ENV_MODE=development
# db # db
DATABASE_DSN=host=localhost user=postgres password=Q1234567 dbname=postgresus port=5437 sslmode=disable DATABASE_DSN=host=localhost user=postgres password=Q1234567 dbname=databasus port=5437 sslmode=disable
DATABASE_URL=postgres://postgres:Q1234567@localhost:5437/postgresus?sslmode=disable DATABASE_URL=postgres://postgres:Q1234567@localhost:5437/databasus?sslmode=disable
# migrations # migrations
GOOSE_DRIVER=postgres GOOSE_DRIVER=postgres
GOOSE_DBSTRING=postgres://postgres:Q1234567@localhost:5437/postgresus?sslmode=disable GOOSE_DBSTRING=postgres://postgres:Q1234567@localhost:5437/databasus?sslmode=disable
GOOSE_MIGRATION_DIR=./migrations GOOSE_MIGRATION_DIR=./migrations
# testing # testing
# to get Google Drive env variables: add storage in UI and copy data from added storage here # to get Google Drive env variables: add storage in UI and copy data from added storage here
@@ -307,8 +307,8 @@ jobs:
run: | run: |
# Create directories that are used for backups and restore # Create directories that are used for backups and restore
# These paths match what's configured in config.go # These paths match what's configured in config.go
mkdir -p postgresus-data/backups mkdir -p databasus-data/backups
mkdir -p postgresus-data/temp mkdir -p databasus-data/temp
- name: Cache PostgreSQL client tools - name: Cache PostgreSQL client tools
id: cache-postgres id: cache-postgres
@@ -539,8 +539,8 @@ jobs:
build-args: | build-args: |
APP_VERSION=dev-${{ github.sha }} APP_VERSION=dev-${{ github.sha }}
tags: | tags: |
rostislavdugin/postgresus:latest databasus/databasus:latest
rostislavdugin/postgresus:${{ github.sha }} databasus/databasus:${{ github.sha }}
build-and-push: build-and-push:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -573,9 +573,9 @@ jobs:
build-args: | build-args: |
APP_VERSION=${{ needs.determine-version.outputs.new_version }} APP_VERSION=${{ needs.determine-version.outputs.new_version }}
tags: | tags: |
rostislavdugin/postgresus:latest databasus/databasus:latest
rostislavdugin/postgresus:v${{ needs.determine-version.outputs.new_version }} databasus/databasus:v${{ needs.determine-version.outputs.new_version }}
rostislavdugin/postgresus:${{ github.sha }} databasus/databasus:${{ github.sha }}
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -662,7 +662,7 @@ jobs:
# Add Docker image info # Add Docker image info
CHANGELOG="${CHANGELOG}### 🐳 Docker\n" CHANGELOG="${CHANGELOG}### 🐳 Docker\n"
CHANGELOG="${CHANGELOG}- **Image**: \`rostislavdugin/postgresus:v${NEW_VERSION}\`\n" CHANGELOG="${CHANGELOG}- **Image**: \`databasus/databasus:v${NEW_VERSION}\`\n"
CHANGELOG="${CHANGELOG}- **Platforms**: linux/amd64, linux/arm64\n\n" CHANGELOG="${CHANGELOG}- **Platforms**: linux/amd64, linux/arm64\n\n"
# Set output for GitHub release # Set output for GitHub release
@@ -726,4 +726,4 @@ jobs:
- name: Push Helm chart to GHCR - name: Push Helm chart to GHCR
run: | run: |
VERSION="${{ needs.determine-version.outputs.new_version }}" VERSION="${{ needs.determine-version.outputs.new_version }}"
helm push postgresus-${VERSION}.tgz oci://ghcr.io/rostislavdugin/charts helm push databasus-${VERSION}.tgz oci://ghcr.io/databasus/charts

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
postgresus_data/ postgresus_data/
postgresus-data/ postgresus-data/
databasus-data/
.env .env
pgdata/ pgdata/
docker-compose.yml docker-compose.yml

View File

@@ -1,13 +1,13 @@
cff-version: 1.2.0 cff-version: 1.2.0
title: Postgresus title: Databasus
message: "If you use this software, please cite it as below." message: "If you use this software, please cite it as below."
type: software type: software
authors: authors:
- family-names: Dugin - family-names: Dugin
given-names: Rostislav given-names: Rostislav
repository-code: https://github.com/RostislavDugin/postgresus repository-code: https://github.com/databasus/databasus
url: https://postgresus.com url: https://databasus.com
abstract: "Free, open source and self-hosted solution for automated PostgreSQL backups with multiple storage options and notifications." abstract: "Free, open source and self-hosted solution for automated databases backups with multiple storage options and notifications."
keywords: keywords:
- docker - docker
- kubernetes - kubernetes
@@ -28,6 +28,9 @@ keywords:
- pg - pg
- system-administration - system-administration
- database-backup - database-backup
- mysql
- mongodb
- mariadb
license: Apache-2.0 license: Apache-2.0
version: 2.15.3 version: 2.15.3
date-released: "2025-12-25" date-released: "2025-12-25"

View File

@@ -188,8 +188,8 @@ RUN apt-get update && \
# Create postgres user and set up directories # Create postgres user and set up directories
RUN useradd -m -s /bin/bash postgres || true && \ RUN useradd -m -s /bin/bash postgres || true && \
mkdir -p /postgresus-data/pgdata && \ mkdir -p /databasus-data/pgdata && \
chown -R postgres:postgres /postgresus-data/pgdata chown -R postgres:postgres /databasus-data/pgdata
WORKDIR /app WORKDIR /app
@@ -223,26 +223,26 @@ PG_BIN="/usr/lib/postgresql/17/bin"
# Ensure proper ownership of data directory # Ensure proper ownership of data directory
echo "Setting up data directory permissions..." echo "Setting up data directory permissions..."
mkdir -p /postgresus-data/pgdata mkdir -p /databasus-data/pgdata
chown -R postgres:postgres /postgresus-data chown -R postgres:postgres /databasus-data
# Initialize PostgreSQL if not already initialized # Initialize PostgreSQL if not already initialized
if [ ! -s "/postgresus-data/pgdata/PG_VERSION" ]; then if [ ! -s "/databasus-data/pgdata/PG_VERSION" ]; then
echo "Initializing PostgreSQL database..." echo "Initializing PostgreSQL database..."
gosu postgres \$PG_BIN/initdb -D /postgresus-data/pgdata --encoding=UTF8 --locale=C.UTF-8 gosu postgres \$PG_BIN/initdb -D /databasus-data/pgdata --encoding=UTF8 --locale=C.UTF-8
# Configure PostgreSQL # Configure PostgreSQL
echo "host all all 127.0.0.1/32 md5" >> /postgresus-data/pgdata/pg_hba.conf echo "host all all 127.0.0.1/32 md5" >> /databasus-data/pgdata/pg_hba.conf
echo "local all all trust" >> /postgresus-data/pgdata/pg_hba.conf echo "local all all trust" >> /databasus-data/pgdata/pg_hba.conf
echo "port = 5437" >> /postgresus-data/pgdata/postgresql.conf echo "port = 5437" >> /databasus-data/pgdata/postgresql.conf
echo "listen_addresses = 'localhost'" >> /postgresus-data/pgdata/postgresql.conf echo "listen_addresses = 'localhost'" >> /databasus-data/pgdata/postgresql.conf
echo "shared_buffers = 256MB" >> /postgresus-data/pgdata/postgresql.conf echo "shared_buffers = 256MB" >> /databasus-data/pgdata/postgresql.conf
echo "max_connections = 100" >> /postgresus-data/pgdata/postgresql.conf echo "max_connections = 100" >> /databasus-data/pgdata/postgresql.conf
fi fi
# Start PostgreSQL in background # Start PostgreSQL in background
echo "Starting PostgreSQL..." echo "Starting PostgreSQL..."
gosu postgres \$PG_BIN/postgres -D /postgresus-data/pgdata -p 5437 & gosu postgres \$PG_BIN/postgres -D /databasus-data/pgdata -p 5437 &
POSTGRES_PID=\$! POSTGRES_PID=\$!
# Wait for PostgreSQL to be ready # Wait for PostgreSQL to be ready
@@ -263,14 +263,14 @@ done
echo "Setting up database and user..." echo "Setting up database and user..."
gosu postgres \$PG_BIN/psql -p 5437 -h localhost -d postgres << 'SQL' gosu postgres \$PG_BIN/psql -p 5437 -h localhost -d postgres << 'SQL'
ALTER USER postgres WITH PASSWORD 'Q1234567'; ALTER USER postgres WITH PASSWORD 'Q1234567';
SELECT 'CREATE DATABASE postgresus OWNER postgres' SELECT 'CREATE DATABASE databasus OWNER postgres'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'postgresus') WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'databasus')
\\gexec \\gexec
\\q \\q
SQL SQL
# Start the main application # Start the main application
echo "Starting Postgresus application..." echo "Starting Databasus application..."
exec ./main exec ./main
EOF EOF
@@ -279,7 +279,7 @@ RUN chmod +x /app/start.sh
EXPOSE 4005 EXPOSE 4005
# Volume for PostgreSQL data # Volume for PostgreSQL data
VOLUME ["/postgresus-data"] VOLUME ["/databasus-data"]
ENTRYPOINT ["/app/start.sh"] ENTRYPOINT ["/app/start.sh"]
CMD [] CMD []

View File

@@ -187,7 +187,7 @@
same "license" line as the copyright notice for easier same "license" line as the copyright notice for easier
identification within third-party archives. identification within third-party archives.
Copyright 2025 Postgresus Copyright 2026 Databasus
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

121
README.md
View File

@@ -1,8 +1,8 @@
<div align="center"> <div align="center">
<img src="assets/logo.svg" style="margin-bottom: 20px;" alt="Postgresus Logo" width="250"/> <img src="assets/logo.svg" style="margin-bottom: 20px;" alt="Databasus Logo" width="250"/>
<h3>Databases backup tool for PostgreSQL, MySQL and MongoDB</h3> <h1 style="font-size: 1.5em; border-bottom: none;">Backup tool for PostgreSQL, MySQL and MongoDB</h1>
<p>Postgresus is a free, open source and self-hosted tool to backup databases. Make backups with different storages (S3, Google Drive, FTP, etc.) and notifications about progress (Slack, Discord, Telegram, etc.)</p> <p>Databasus is a free, open source and self-hosted tool to backup databases. Make backups with different storages (S3, Google Drive, FTP, etc.) and notifications about progress (Slack, Discord, Telegram, etc.). Previously known as Postgresus (see migration guide).</p>
<!-- Badges --> <!-- Badges -->
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-336791?logo=postgresql&logoColor=white)](https://www.postgresql.org/) [![PostgreSQL](https://img.shields.io/badge/PostgreSQL-336791?logo=postgresql&logoColor=white)](https://www.postgresql.org/)
@@ -12,10 +12,9 @@
<br /> <br />
[![Apache 2.0 License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE) [![Apache 2.0 License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
[![Docker Pulls](https://img.shields.io/docker/pulls/rostislavdugin/postgresus?color=brightgreen)](https://hub.docker.com/r/rostislavdugin/postgresus) [![Docker Pulls](https://img.shields.io/docker/pulls/rostislavdugin/postgresus?color=brightgreen)](https://hub.docker.com/r/rostislavdugin/postgresus)
[![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macos%20%7C%20windows-lightgrey)](https://github.com/RostislavDugin/postgresus) [![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macos%20%7C%20windows-lightgrey)](https://github.com/databasus/databasus)
[![Self Hosted](https://img.shields.io/badge/self--hosted-yes-brightgreen)](https://github.com/RostislavDugin/postgresus) [![Self Hosted](https://img.shields.io/badge/self--hosted-yes-brightgreen)](https://github.com/databasus/databasus)
[![Open Source](https://img.shields.io/badge/open%20source-❤️-red)](https://github.com/RostislavDugin/postgresus) [![Open Source](https://img.shields.io/badge/open%20source-❤️-red)](https://github.com/databasus/databasus)
<p> <p>
<a href="#-features">Features</a> • <a href="#-features">Features</a> •
@@ -26,12 +25,12 @@
</p> </p>
<p style="margin-top: 20px; margin-bottom: 20px; font-size: 1.2em;"> <p style="margin-top: 20px; margin-bottom: 20px; font-size: 1.2em;">
<a href="https://postgresus.com" target="_blank"><strong>🌐 Postgresus website</strong></a> <a href="https://databasus.com" target="_blank"><strong>🌐 Databasus website</strong></a>
</p> </p>
<img src="assets/dashboard-dark.svg" alt="Postgresus Dark Dashboard" width="800" style="margin-bottom: 10px;"/> <img src="assets/dashboard-dark.svg" alt="Databasus Dark Dashboard" width="800" style="margin-bottom: 10px;"/>
<img src="assets/dashboard.svg" alt="Postgresus Dashboard" width="800"/> <img src="assets/dashboard.svg" alt="Databasus Dashboard" width="800"/>
</div> </div>
@@ -53,26 +52,26 @@
- **Precise timing**: run backups at specific times (e.g., 4 AM during low traffic) - **Precise timing**: run backups at specific times (e.g., 4 AM during low traffic)
- **Smart compression**: 4-8x space savings with balanced compression (~20% overhead) - **Smart compression**: 4-8x space savings with balanced compression (~20% overhead)
### 🗄️ **Multiple storage destinations** <a href="https://postgresus.com/storages">(view supported)</a> ### 🗄️ **Multiple storage destinations** <a href="https://databasus.com/storages">(view supported)</a>
- **Local storage**: Keep backups on your VPS/server - **Local storage**: Keep backups on your VPS/server
- **Cloud storage**: S3, Cloudflare R2, Google Drive, NAS, Dropbox, SFTP, Rclone and more - **Cloud storage**: S3, Cloudflare R2, Google Drive, NAS, Dropbox, SFTP, Rclone and more
- **Secure**: All data stays under your control - **Secure**: All data stays under your control
### 📱 **Smart notifications** <a href="https://postgresus.com/notifiers">(view supported)</a> ### 📱 **Smart notifications** <a href="https://databasus.com/notifiers">(view supported)</a>
- **Multiple channels**: Email, Telegram, Slack, Discord, webhooks - **Multiple channels**: Email, Telegram, Slack, Discord, webhooks
- **Real-time updates**: Success and failure notifications - **Real-time updates**: Success and failure notifications
- **Team integration**: Perfect for DevOps workflows - **Team integration**: Perfect for DevOps workflows
### 🔒 **Enterprise-grade security** <a href="https://postgresus.com/security">(docs)</a> ### 🔒 **Enterprise-grade security** <a href="https://databasus.com/security">(docs)</a>
- **AES-256-GCM encryption**: Enterprise-grade protection for backup files - **AES-256-GCM encryption**: Enterprise-grade protection for backup files
- **Zero-trust storage**: Backups are encrypted and remain useless to attackers, so you can safely store them in shared storage like S3, Azure Blob Storage, etc. - **Zero-trust storage**: Backups are encrypted and remain useless to attackers, so you can safely store them in shared storage like S3, Azure Blob Storage, etc.
- **Encryption for secrets**: Any sensitive data is encrypted and never exposed, even in logs or error messages - **Encryption for secrets**: Any sensitive data is encrypted and never exposed, even in logs or error messages
- **Read-only user**: Postgresus uses a read-only user by default for backups and never stores anything that can modify your data - **Read-only user**: Databasus uses a read-only user by default for backups and never stores anything that can modify your data
### 👥 **Suitable for teams** <a href="https://postgresus.com/access-management">(docs)</a> ### 👥 **Suitable for teams** <a href="https://databasus.com/access-management">(docs)</a>
- **Workspaces**: Group databases, notifiers and storages for different projects or teams - **Workspaces**: Group databases, notifiers and storages for different projects or teams
- **Access management**: Control who can view or manage specific databases with role-based permissions - **Access management**: Control who can view or manage specific databases with role-based permissions
@@ -87,7 +86,7 @@
### ☁️ **Works with self-hosted & cloud databases** ### ☁️ **Works with self-hosted & cloud databases**
Postgresus works seamlessly with both self-hosted PostgreSQL and cloud-managed databases: Databasus works seamlessly with both self-hosted PostgreSQL and cloud-managed databases:
- **Cloud support**: AWS RDS, Google Cloud SQL, Azure Database for PostgreSQL - **Cloud support**: AWS RDS, Google Cloud SQL, Azure Database for PostgreSQL
- **Self-hosted**: Any PostgreSQL instance you manage yourself - **Self-hosted**: Any PostgreSQL instance you manage yourself
@@ -100,54 +99,54 @@ Postgresus works seamlessly with both self-hosted PostgreSQL and cloud-managed d
- **Privacy-first**: All your data stays on your infrastructure - **Privacy-first**: All your data stays on your infrastructure
- **Open source**: Apache 2.0 licensed, inspect every line of code - **Open source**: Apache 2.0 licensed, inspect every line of code
### 📦 Installation <a href="https://postgresus.com/installation">(docs)</a> ### 📦 Installation <a href="https://databasus.com/installation">(docs)</a>
You have four ways to install Postgresus: You have four ways to install Databasus:
- Automated script (recommended) - Automated script (recommended)
- Simple Docker run - Simple Docker run
- Docker Compose setup - Docker Compose setup
- Kubernetes with Helm - Kubernetes with Helm
<img src="assets/healthchecks.svg" alt="Postgresus Dashboard" width="800"/> <img src="assets/healthchecks.svg" alt="Databasus Dashboard" width="800"/>
--- ---
## 📦 Installation ## 📦 Installation
You have three ways to install Postgresus: automated script (recommended), simple Docker run, or Docker Compose setup. You have three ways to install Databasus: automated script (recommended), simple Docker run, or Docker Compose setup.
### Option 1: Automated installation script (recommended, Linux only) ### Option 1: Automated installation script (recommended, Linux only)
The installation script will: The installation script will:
- ✅ Install Docker with Docker Compose (if not already installed) - ✅ Install Docker with Docker Compose (if not already installed)
- ✅ Set up Postgresus - ✅ Set up Databasus
- ✅ Configure automatic startup on system reboot - ✅ Configure automatic startup on system reboot
```bash ```bash
sudo apt-get install -y curl && \ sudo apt-get install -y curl && \
sudo curl -sSL https://raw.githubusercontent.com/RostislavDugin/postgresus/refs/heads/main/install-postgresus.sh \ sudo curl -sSL https://raw.githubusercontent.com/databasus/databasus/refs/heads/main/install-databasus.sh \
| sudo bash | sudo bash
``` ```
### Option 2: Simple Docker run ### Option 2: Simple Docker run
The easiest way to run Postgresus: The easiest way to run Databasus:
```bash ```bash
docker run -d \ docker run -d \
--name postgresus \ --name databasus \
-p 4005:4005 \ -p 4005:4005 \
-v ./postgresus-data:/postgresus-data \ -v ./databasus-data:/databasus-data \
--restart unless-stopped \ --restart unless-stopped \
rostislavdugin/postgresus:latest databasus/databasus:latest
``` ```
This single command will: This single command will:
- ✅ Start Postgresus - ✅ Start Databasus
- ✅ Store all data in `./postgresus-data` directory - ✅ Store all data in `./databasus-data` directory
- ✅ Automatically restart on system reboot - ✅ Automatically restart on system reboot
### Option 3: Docker Compose setup ### Option 3: Docker Compose setup
@@ -156,13 +155,13 @@ Create a `docker-compose.yml` file with the following configuration:
```yaml ```yaml
services: services:
postgresus: databasus:
container_name: postgresus container_name: databasus
image: rostislavdugin/postgresus:latest image: databasus/databasus:latest
ports: ports:
- "4005:4005" - "4005:4005"
volumes: volumes:
- ./postgresus-data:/postgresus-data - ./databasus-data:/databasus-data
restart: unless-stopped restart: unless-stopped
``` ```
@@ -179,33 +178,33 @@ For Kubernetes deployments, install directly from the OCI registry.
**With ClusterIP + port-forward (development/testing):** **With ClusterIP + port-forward (development/testing):**
```bash ```bash
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus \ helm install databasus oci://ghcr.io/databasus/charts/databasus \
-n postgresus --create-namespace -n databasus --create-namespace
``` ```
```bash ```bash
kubectl port-forward svc/postgresus-service 4005:4005 -n postgresus kubectl port-forward svc/databasus-service 4005:4005 -n databasus
# Access at http://localhost:4005 # Access at http://localhost:4005
``` ```
**With LoadBalancer (cloud environments):** **With LoadBalancer (cloud environments):**
```bash ```bash
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus \ helm install databasus oci://ghcr.io/databasus/charts/databasus \
-n postgresus --create-namespace \ -n databasus --create-namespace \
--set service.type=LoadBalancer --set service.type=LoadBalancer
``` ```
```bash ```bash
kubectl get svc postgresus-service -n postgresus kubectl get svc databasus-service -n databasus
# Access at http://<EXTERNAL-IP>:4005 # Access at http://<EXTERNAL-IP>:4005
``` ```
**With Ingress (domain-based access):** **With Ingress (domain-based access):**
```bash ```bash
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus \ helm install databasus oci://ghcr.io/databasus/charts/databasus \
-n postgresus --create-namespace \ -n databasus --create-namespace \
--set ingress.enabled=true \ --set ingress.enabled=true \
--set ingress.hosts[0].host=backup.example.com --set ingress.hosts[0].host=backup.example.com
``` ```
@@ -222,14 +221,14 @@ For more options (NodePort, TLS, HTTPRoute for Gateway API), see the [Helm chart
4. **Set database connection**: Enter your database credentials and connection details 4. **Set database connection**: Enter your database credentials and connection details
5. **Choose storage**: Select where to store your backups (local, S3, Google Drive, etc.) 5. **Choose storage**: Select where to store your backups (local, S3, Google Drive, etc.)
6. **Add notifications** (optional): Configure email, Telegram, Slack, or webhook notifications 6. **Add notifications** (optional): Configure email, Telegram, Slack, or webhook notifications
7. **Save and start**: Postgresus will validate settings and begin the backup schedule 7. **Save and start**: Databasus will validate settings and begin the backup schedule
### 🔑 Resetting password <a href="https://postgresus.com/password">(docs)</a> ### 🔑 Resetting password <a href="https://databasus.com/password">(docs)</a>
If you need to reset the password, you can use the built-in password reset command: If you need to reset the password, you can use the built-in password reset command:
```bash ```bash
docker exec -it postgresus ./main --new-password="YourNewSecurePassword123" --email="admin" docker exec -it databasus ./main --new-password="YourNewSecurePassword123" --email="admin"
``` ```
Replace `admin` with the actual email address of the user whose password you want to reset. Replace `admin` with the actual email address of the user whose password you want to reset.
@@ -244,4 +243,38 @@ This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENS
## 🤝 Contributing ## 🤝 Contributing
Contributions are welcome! Read the <a href="https://postgresus.com/contribute">contributing guide</a> for more details, priorities and rules. If you want to contribute but don't know where to start, message me on Telegram [@rostislav_dugin](https://t.me/rostislav_dugin) Contributions are welcome! Read the <a href="https://databasus.com/contribute">contributing guide</a> for more details, priorities and rules. If you want to contribute but don't know where to start, message me on Telegram [@rostislav_dugin](https://t.me/rostislav_dugin)
--
## 📖 Migration guide
Databasus is the new name for Postgresus. You can stay with latest version of Postgresus if you wish. If you want to migrate - follow installation steps for Databasus itself.
Just renaming an image is not enough as Postgresus and Databasus use different data folders and internal database naming.
You can put a new Databasus image with updated volume near the old Postgresus and run it (stop Postgresus before):
```
services:
databasus:
container_name: databasus
image: databasus/databasus:latest
ports:
- "4005:4005"
volumes:
- ./databasus-data:/databasus-data
restart: unless-stopped
```
Then manually move databases from Postgresus to Databasus.
### Why was Postgresus renamed to Databasus?
It was an important step for the project to grow. Actually, there are a couple of reasons:
1. Postgresus is no longer a little tool that just adds UI for pg_dump for little projects. It became a tool both for individual users, DevOps, DBAs,teams, companies and even large enterprises. Tens of thousands of users use Postgresus every day. Postgresus grew into a reliable backup management tool. Initial positioning is no longer suitable: the project is not just a UI wrapper, it's a solid backup management system now (despite it's still easy to use).
2. New databases are supported: although the primary focus is PostgreSQL (with 100% support in the most efficient way) and always will be, Databasus added support for MySQL, MariaDB and MongoDB. Later more databases will be supported.
3. Trademark issue: "postgres" is a trademark of PostgreSQL Inc. and cannot be used in the project name. So for safety and legal reasons, we had to rename the project.

View File

@@ -21,7 +21,7 @@ package audit_logs
import ( import (
"net/http" "net/http"
user_models "postgresus/internal/features/users/models" user_models "databasus-backend/internal/features/users/models"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -12,7 +12,7 @@ package audit_logs
import ( import (
"net/http" "net/http"
user_models "postgresus/internal/features/users/models" user_models "databasus-backend/internal/features/users/models"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"
@@ -132,12 +132,12 @@ import (
"testing" "testing"
"time" "time"
user_enums "postgresus/internal/features/users/enums" user_enums "databasus-backend/internal/features/users/enums"
users_middleware "postgresus/internal/features/users/middleware" users_middleware "databasus-backend/internal/features/users/middleware"
users_services "postgresus/internal/features/users/services" users_services "databasus-backend/internal/features/users/services"
users_testing "postgresus/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
"postgresus/internal/storage" "databasus-backend/internal/storage"
test_utils "postgresus/internal/util/testing" test_utils "databasus-backend/internal/util/testing"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"
@@ -268,8 +268,8 @@ func createRouter() *gin.Engine {
package audit_logs package audit_logs
import ( import (
users_services "postgresus/internal/features/users/services" users_services "databasus-backend/internal/features/users/services"
"postgresus/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var auditLogRepository = &AuditLogRepository{} var auditLogRepository = &AuditLogRepository{}
@@ -350,7 +350,7 @@ func (AuditLog) TableName() string {
package audit_logs package audit_logs
import ( import (
"postgresus/internal/storage" "databasus-backend/internal/storage"
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"
@@ -453,8 +453,8 @@ import (
"log/slog" "log/slog"
"time" "time"
user_enums "postgresus/internal/features/users/enums" user_enums "databasus-backend/internal/features/users/enums"
user_models "postgresus/internal/features/users/models" user_models "databasus-backend/internal/features/users/models"
"github.com/google/uuid" "github.com/google/uuid"
) )
@@ -585,8 +585,8 @@ import (
"testing" "testing"
"time" "time"
user_enums "postgresus/internal/features/users/enums" user_enums "databasus-backend/internal/features/users/enums"
users_testing "postgresus/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"

View File

@@ -1,15 +1,15 @@
# docker-compose.yml # docker-compose.yml
DEV_DB_NAME=postgresus DEV_DB_NAME=databasus
DEV_DB_USERNAME=postgres DEV_DB_USERNAME=postgres
DEV_DB_PASSWORD=Q1234567 DEV_DB_PASSWORD=Q1234567
#app #app
ENV_MODE=development ENV_MODE=development
# db # db
DATABASE_DSN=host=dev-db user=postgres password=Q1234567 dbname=postgresus port=5437 sslmode=disable DATABASE_DSN=host=dev-db user=postgres password=Q1234567 dbname=databasus port=5437 sslmode=disable
DATABASE_URL=postgres://postgres:Q1234567@dev-db:5437/postgresus?sslmode=disable DATABASE_URL=postgres://postgres:Q1234567@dev-db:5437/databasus?sslmode=disable
# migrations # migrations
GOOSE_DRIVER=postgres GOOSE_DRIVER=postgres
GOOSE_DBSTRING=postgres://postgres:Q1234567@dev-db:5437/postgresus?sslmode=disable GOOSE_DBSTRING=postgres://postgres:Q1234567@dev-db:5437/databasus?sslmode=disable
GOOSE_MIGRATION_DIR=./migrations GOOSE_MIGRATION_DIR=./migrations
# testing # testing
# to get Google Drive env variables: add storage in UI and copy data from added storage here # to get Google Drive env variables: add storage in UI and copy data from added storage here

View File

@@ -1,13 +1,13 @@
# docker-compose.yml # docker-compose.yml
DEV_DB_NAME=postgresus DEV_DB_NAME=databasus
DEV_DB_USERNAME=postgres DEV_DB_USERNAME=postgres
DEV_DB_PASSWORD=Q1234567 DEV_DB_PASSWORD=Q1234567
#app #app
ENV_MODE=production ENV_MODE=production
# db # db
DATABASE_DSN=host=localhost user=postgres password=Q1234567 dbname=postgresus port=5437 sslmode=disable DATABASE_DSN=host=localhost user=postgres password=Q1234567 dbname=databasus port=5437 sslmode=disable
DATABASE_URL=postgres://postgres:Q1234567@localhost:5437/postgresus?sslmode=disable DATABASE_URL=postgres://postgres:Q1234567@localhost:5437/databasus?sslmode=disable
# migrations # migrations
GOOSE_DRIVER=postgres GOOSE_DRIVER=postgres
GOOSE_DBSTRING=postgres://postgres:Q1234567@localhost:5437/postgresus?sslmode=disable GOOSE_DBSTRING=postgres://postgres:Q1234567@localhost:5437/databasus?sslmode=disable
GOOSE_MIGRATION_DIR=./migrations GOOSE_MIGRATION_DIR=./migrations

1
backend/.gitignore vendored
View File

@@ -12,6 +12,7 @@ swagger/docs.go
swagger/swagger.json swagger/swagger.json
swagger/swagger.yaml swagger/swagger.yaml
postgresus-backend.exe postgresus-backend.exe
databasus-backend.exe
ui/build/* ui/build/*
pgdata-for-restore/ pgdata-for-restore/
temp/ temp/

View File

@@ -1,7 +1,7 @@
# Before run # Before run
Keep in mind: you need to use dev-db from docker-compose.yml in this folder Keep in mind: you need to use dev-db from docker-compose.yml in this folder
instead of postgresus-db from docker-compose.yml in the root folder. instead of databasus-db from docker-compose.yml in the root folder.
> Copy .env.example to .env > Copy .env.example to .env
> Copy docker-compose.yml.example to docker-compose.yml (for development only) > Copy docker-compose.yml.example to docker-compose.yml (for development only)

View File

@@ -12,27 +12,27 @@ import (
"syscall" "syscall"
"time" "time"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
"postgresus-backend/internal/features/audit_logs" "databasus-backend/internal/features/audit_logs"
"postgresus-backend/internal/features/backups/backups" "databasus-backend/internal/features/backups/backups"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/disk" "databasus-backend/internal/features/disk"
"postgresus-backend/internal/features/encryption/secrets" "databasus-backend/internal/features/encryption/secrets"
healthcheck_attempt "postgresus-backend/internal/features/healthcheck/attempt" healthcheck_attempt "databasus-backend/internal/features/healthcheck/attempt"
healthcheck_config "postgresus-backend/internal/features/healthcheck/config" healthcheck_config "databasus-backend/internal/features/healthcheck/config"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"postgresus-backend/internal/features/restores" "databasus-backend/internal/features/restores"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
system_healthcheck "postgresus-backend/internal/features/system/healthcheck" system_healthcheck "databasus-backend/internal/features/system/healthcheck"
users_controllers "postgresus-backend/internal/features/users/controllers" users_controllers "databasus-backend/internal/features/users/controllers"
users_middleware "postgresus-backend/internal/features/users/middleware" users_middleware "databasus-backend/internal/features/users/middleware"
users_services "postgresus-backend/internal/features/users/services" users_services "databasus-backend/internal/features/users/services"
workspaces_controllers "postgresus-backend/internal/features/workspaces/controllers" workspaces_controllers "databasus-backend/internal/features/workspaces/controllers"
env_utils "postgresus-backend/internal/util/env" env_utils "databasus-backend/internal/util/env"
files_utils "postgresus-backend/internal/util/files" files_utils "databasus-backend/internal/util/files"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
_ "postgresus-backend/swagger" // swagger docs _ "databasus-backend/swagger" // swagger docs
"github.com/gin-contrib/cors" "github.com/gin-contrib/cors"
"github.com/gin-contrib/gzip" "github.com/gin-contrib/gzip"
@@ -41,9 +41,9 @@ import (
ginSwagger "github.com/swaggo/gin-swagger" ginSwagger "github.com/swaggo/gin-swagger"
) )
// @title Postgresus Backend API // @title Databasus Backend API
// @version 1.0 // @version 1.0
// @description API for Postgresus // @description API for Databasus
// @termsOfService http://swagger.io/terms/ // @termsOfService http://swagger.io/terms/
// @host localhost:4005 // @host localhost:4005

View File

@@ -1,4 +1,4 @@
module postgresus-backend module databasus-backend
go 1.24.4 go 1.24.4

View File

@@ -1,11 +1,11 @@
package config package config
import ( import (
env_utils "databasus-backend/internal/util/env"
"databasus-backend/internal/util/logger"
"databasus-backend/internal/util/tools"
"os" "os"
"path/filepath" "path/filepath"
env_utils "postgresus-backend/internal/util/env"
"postgresus-backend/internal/util/logger"
"postgresus-backend/internal/util/tools"
"strings" "strings"
"sync" "sync"
@@ -189,10 +189,11 @@ func loadEnvVariables() {
env.MongodbInstallDir = filepath.Join(backendRoot, "tools", "mongodb") env.MongodbInstallDir = filepath.Join(backendRoot, "tools", "mongodb")
tools.VerifyMongodbInstallation(log, env.EnvMode, env.MongodbInstallDir) tools.VerifyMongodbInstallation(log, env.EnvMode, env.MongodbInstallDir)
dataRootFolder := detectDataFolder(filepath.Dir(backendRoot)) // Store the data and temp folders one level below the root
env.DataFolder = filepath.Join(dataRootFolder, "backups") // (projectRoot/databasus-data -> /databasus-data)
env.TempFolder = filepath.Join(dataRootFolder, "temp") env.DataFolder = filepath.Join(filepath.Dir(backendRoot), "databasus-data", "backups")
env.SecretKeyPath = filepath.Join(dataRootFolder, "secret.key") env.TempFolder = filepath.Join(filepath.Dir(backendRoot), "databasus-data", "temp")
env.SecretKeyPath = filepath.Join(filepath.Dir(backendRoot), "databasus-data", "secret.key")
if env.IsTesting { if env.IsTesting {
if env.TestPostgres12Port == "" { if env.TestPostgres12Port == "" {
@@ -256,12 +257,3 @@ func loadEnvVariables() {
log.Info("Environment variables loaded successfully!") log.Info("Environment variables loaded successfully!")
} }
func detectDataFolder(projectRoot string) string {
legacyFolder := filepath.Join(projectRoot, "postgresus-data")
if _, err := os.Stat(legacyFolder); err == nil {
return legacyFolder
}
return filepath.Join(projectRoot, "databasus-data")
}

View File

@@ -3,7 +3,7 @@ package audit_logs
import ( import (
"net/http" "net/http"
user_models "postgresus-backend/internal/features/users/models" user_models "databasus-backend/internal/features/users/models"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -6,11 +6,11 @@ import (
"testing" "testing"
"time" "time"
user_enums "postgresus-backend/internal/features/users/enums" user_enums "databasus-backend/internal/features/users/enums"
users_middleware "postgresus-backend/internal/features/users/middleware" users_middleware "databasus-backend/internal/features/users/middleware"
users_services "postgresus-backend/internal/features/users/services" users_services "databasus-backend/internal/features/users/services"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
test_utils "postgresus-backend/internal/util/testing" test_utils "databasus-backend/internal/util/testing"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -1,8 +1,8 @@
package audit_logs package audit_logs
import ( import (
users_services "postgresus-backend/internal/features/users/services" users_services "databasus-backend/internal/features/users/services"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var auditLogRepository = &AuditLogRepository{} var auditLogRepository = &AuditLogRepository{}

View File

@@ -1,7 +1,7 @@
package audit_logs package audit_logs
import ( import (
"postgresus-backend/internal/storage" "databasus-backend/internal/storage"
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -5,8 +5,8 @@ import (
"log/slog" "log/slog"
"time" "time"
user_enums "postgresus-backend/internal/features/users/enums" user_enums "databasus-backend/internal/features/users/enums"
user_models "postgresus-backend/internal/features/users/models" user_models "databasus-backend/internal/features/users/models"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -4,8 +4,8 @@ import (
"testing" "testing"
"time" "time"
user_enums "postgresus-backend/internal/features/users/enums" user_enums "databasus-backend/internal/features/users/enums"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"

View File

@@ -1,12 +1,12 @@
package backups package backups
import ( import (
"databasus-backend/internal/config"
backups_config "databasus-backend/internal/features/backups/config"
"databasus-backend/internal/features/storages"
"databasus-backend/internal/util/encryption"
"databasus-backend/internal/util/period"
"log/slog" "log/slog"
"postgresus-backend/internal/config"
backups_config "postgresus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/storages"
"postgresus-backend/internal/util/encryption"
"postgresus-backend/internal/util/period"
"time" "time"
) )

View File

@@ -1,15 +1,15 @@
package backups package backups
import ( import (
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/intervals" "databasus-backend/internal/features/intervals"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
users_enums "postgresus-backend/internal/features/users/enums" users_enums "databasus-backend/internal/features/users/enums"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
"postgresus-backend/internal/util/period" "databasus-backend/internal/util/period"
"testing" "testing"
"time" "time"

View File

@@ -1,11 +1,11 @@
package backups package backups
import ( import (
"databasus-backend/internal/features/databases"
users_middleware "databasus-backend/internal/features/users/middleware"
"fmt" "fmt"
"io" "io"
"net/http" "net/http"
"postgresus-backend/internal/features/databases"
users_middleware "postgresus-backend/internal/features/users/middleware"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -15,21 +15,21 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
audit_logs "postgresus-backend/internal/features/audit_logs" audit_logs "databasus-backend/internal/features/audit_logs"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/databases/databases/postgresql" "databasus-backend/internal/features/databases/databases/postgresql"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
local_storage "postgresus-backend/internal/features/storages/models/local" local_storage "databasus-backend/internal/features/storages/models/local"
users_dto "postgresus-backend/internal/features/users/dto" users_dto "databasus-backend/internal/features/users/dto"
users_enums "postgresus-backend/internal/features/users/enums" users_enums "databasus-backend/internal/features/users/enums"
users_services "postgresus-backend/internal/features/users/services" users_services "databasus-backend/internal/features/users/services"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
workspaces_models "postgresus-backend/internal/features/workspaces/models" workspaces_models "databasus-backend/internal/features/workspaces/models"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
test_utils "postgresus-backend/internal/util/testing" test_utils "databasus-backend/internal/util/testing"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
func Test_GetBackups_PermissionsEnforced(t *testing.T) { func Test_GetBackups_PermissionsEnforced(t *testing.T) {

View File

@@ -3,16 +3,16 @@ package backups
import ( import (
"time" "time"
audit_logs "postgresus-backend/internal/features/audit_logs" audit_logs "databasus-backend/internal/features/audit_logs"
"postgresus-backend/internal/features/backups/backups/usecases" "databasus-backend/internal/features/backups/backups/usecases"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
encryption_secrets "postgresus-backend/internal/features/encryption/secrets" encryption_secrets "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var backupRepository = &BackupRepository{} var backupRepository = &BackupRepository{}

View File

@@ -1,8 +1,8 @@
package backups package backups
import ( import (
"databasus-backend/internal/features/backups/backups/encryption"
"io" "io"
"postgresus-backend/internal/features/backups/backups/encryption"
) )
type GetBackupsRequest struct { type GetBackupsRequest struct {

View File

@@ -3,11 +3,11 @@ package backups
import ( import (
"context" "context"
usecases_common "postgresus-backend/internal/features/backups/backups/usecases/common" usecases_common "databasus-backend/internal/features/backups/backups/usecases/common"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,7 +1,7 @@
package backups package backups
import ( import (
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"
) )

View File

@@ -1,7 +1,7 @@
package backups package backups
import ( import (
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -1,8 +1,8 @@
package backups package backups
import ( import (
"databasus-backend/internal/storage"
"errors" "errors"
"postgresus-backend/internal/storage"
"time" "time"

View File

@@ -11,16 +11,16 @@ import (
"strings" "strings"
"time" "time"
audit_logs "postgresus-backend/internal/features/audit_logs" audit_logs "databasus-backend/internal/features/audit_logs"
"postgresus-backend/internal/features/backups/backups/encryption" "databasus-backend/internal/features/backups/backups/encryption"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
encryption_secrets "postgresus-backend/internal/features/encryption/secrets" encryption_secrets "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
users_models "postgresus-backend/internal/features/users/models" users_models "databasus-backend/internal/features/users/models"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
util_encryption "postgresus-backend/internal/util/encryption" util_encryption "databasus-backend/internal/util/encryption"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -7,18 +7,18 @@ import (
"testing" "testing"
"time" "time"
"postgresus-backend/internal/features/backups/backups/usecases/common" "databasus-backend/internal/features/backups/backups/usecases/common"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
encryption_secrets "postgresus-backend/internal/features/encryption/secrets" encryption_secrets "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
users_enums "postgresus-backend/internal/features/users/enums" users_enums "databasus-backend/internal/features/users/enums"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"

View File

@@ -1,10 +1,10 @@
package backups package backups
import ( import (
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
workspaces_controllers "postgresus-backend/internal/features/workspaces/controllers" workspaces_controllers "databasus-backend/internal/features/workspaces/controllers"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@@ -1,6 +1,6 @@
package common package common
import backups_config "postgresus-backend/internal/features/backups/config" import backups_config "databasus-backend/internal/features/backups/config"
type BackupMetadata struct { type BackupMetadata struct {
EncryptionSalt *string EncryptionSalt *string

View File

@@ -4,14 +4,14 @@ import (
"context" "context"
"errors" "errors"
usecases_common "postgresus-backend/internal/features/backups/backups/usecases/common" usecases_common "databasus-backend/internal/features/backups/backups/usecases/common"
usecases_mariadb "postgresus-backend/internal/features/backups/backups/usecases/mariadb" usecases_mariadb "databasus-backend/internal/features/backups/backups/usecases/mariadb"
usecases_mongodb "postgresus-backend/internal/features/backups/backups/usecases/mongodb" usecases_mongodb "databasus-backend/internal/features/backups/backups/usecases/mongodb"
usecases_mysql "postgresus-backend/internal/features/backups/backups/usecases/mysql" usecases_mysql "databasus-backend/internal/features/backups/backups/usecases/mysql"
usecases_postgresql "postgresus-backend/internal/features/backups/backups/usecases/postgresql" usecases_postgresql "databasus-backend/internal/features/backups/backups/usecases/postgresql"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,10 +1,10 @@
package usecases package usecases
import ( import (
usecases_mariadb "postgresus-backend/internal/features/backups/backups/usecases/mariadb" usecases_mariadb "databasus-backend/internal/features/backups/backups/usecases/mariadb"
usecases_mongodb "postgresus-backend/internal/features/backups/backups/usecases/mongodb" usecases_mongodb "databasus-backend/internal/features/backups/backups/usecases/mongodb"
usecases_mysql "postgresus-backend/internal/features/backups/backups/usecases/mysql" usecases_mysql "databasus-backend/internal/features/backups/backups/usecases/mysql"
usecases_postgresql "postgresus-backend/internal/features/backups/backups/usecases/postgresql" usecases_postgresql "databasus-backend/internal/features/backups/backups/usecases/postgresql"
) )
var createBackupUsecase = &CreateBackupUsecase{ var createBackupUsecase = &CreateBackupUsecase{

View File

@@ -17,16 +17,16 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/klauspost/compress/zstd" "github.com/klauspost/compress/zstd"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
backup_encryption "postgresus-backend/internal/features/backups/backups/encryption" backup_encryption "databasus-backend/internal/features/backups/backups/encryption"
usecases_common "postgresus-backend/internal/features/backups/backups/usecases/common" usecases_common "databasus-backend/internal/features/backups/backups/usecases/common"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
mariadbtypes "postgresus-backend/internal/features/databases/databases/mariadb" mariadbtypes "databasus-backend/internal/features/databases/databases/mariadb"
encryption_secrets "postgresus-backend/internal/features/encryption/secrets" encryption_secrets "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
const ( const (

View File

@@ -1,9 +1,9 @@
package usecases_mariadb package usecases_mariadb
import ( import (
"postgresus-backend/internal/features/encryption/secrets" "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var createMariadbBackupUsecase = &CreateMariadbBackupUsecase{ var createMariadbBackupUsecase = &CreateMariadbBackupUsecase{

View File

@@ -14,16 +14,16 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
backup_encryption "postgresus-backend/internal/features/backups/backups/encryption" backup_encryption "databasus-backend/internal/features/backups/backups/encryption"
usecases_common "postgresus-backend/internal/features/backups/backups/usecases/common" usecases_common "databasus-backend/internal/features/backups/backups/usecases/common"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
mongodbtypes "postgresus-backend/internal/features/databases/databases/mongodb" mongodbtypes "databasus-backend/internal/features/databases/databases/mongodb"
encryption_secrets "postgresus-backend/internal/features/encryption/secrets" encryption_secrets "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
const ( const (

View File

@@ -1,9 +1,9 @@
package usecases_mongodb package usecases_mongodb
import ( import (
encryption_secrets "postgresus-backend/internal/features/encryption/secrets" encryption_secrets "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var createMongodbBackupUsecase = &CreateMongodbBackupUsecase{ var createMongodbBackupUsecase = &CreateMongodbBackupUsecase{

View File

@@ -17,16 +17,16 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/klauspost/compress/zstd" "github.com/klauspost/compress/zstd"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
backup_encryption "postgresus-backend/internal/features/backups/backups/encryption" backup_encryption "databasus-backend/internal/features/backups/backups/encryption"
usecases_common "postgresus-backend/internal/features/backups/backups/usecases/common" usecases_common "databasus-backend/internal/features/backups/backups/usecases/common"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
mysqltypes "postgresus-backend/internal/features/databases/databases/mysql" mysqltypes "databasus-backend/internal/features/databases/databases/mysql"
encryption_secrets "postgresus-backend/internal/features/encryption/secrets" encryption_secrets "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
const ( const (

View File

@@ -1,9 +1,9 @@
package usecases_mysql package usecases_mysql
import ( import (
"postgresus-backend/internal/features/encryption/secrets" "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var createMysqlBackupUsecase = &CreateMysqlBackupUsecase{ var createMysqlBackupUsecase = &CreateMysqlBackupUsecase{

View File

@@ -14,16 +14,16 @@ import (
"strings" "strings"
"time" "time"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
backup_encryption "postgresus-backend/internal/features/backups/backups/encryption" backup_encryption "databasus-backend/internal/features/backups/backups/encryption"
usecases_common "postgresus-backend/internal/features/backups/backups/usecases/common" usecases_common "databasus-backend/internal/features/backups/backups/usecases/common"
backups_config "postgresus-backend/internal/features/backups/config" backups_config "databasus-backend/internal/features/backups/config"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
pgtypes "postgresus-backend/internal/features/databases/databases/postgresql" pgtypes "databasus-backend/internal/features/databases/databases/postgresql"
encryption_secrets "postgresus-backend/internal/features/encryption/secrets" encryption_secrets "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,9 +1,9 @@
package usecases_postgresql package usecases_postgresql
import ( import (
"postgresus-backend/internal/features/encryption/secrets" "databasus-backend/internal/features/encryption/secrets"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var createPostgresqlBackupUsecase = &CreatePostgresqlBackupUsecase{ var createPostgresqlBackupUsecase = &CreatePostgresqlBackupUsecase{

View File

@@ -1,8 +1,8 @@
package backups_config package backups_config
import ( import (
users_middleware "databasus-backend/internal/features/users/middleware"
"net/http" "net/http"
users_middleware "postgresus-backend/internal/features/users/middleware"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -9,17 +9,17 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/databases/databases/postgresql" "databasus-backend/internal/features/databases/databases/postgresql"
"postgresus-backend/internal/features/intervals" "databasus-backend/internal/features/intervals"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
users_enums "postgresus-backend/internal/features/users/enums" users_enums "databasus-backend/internal/features/users/enums"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
workspaces_controllers "postgresus-backend/internal/features/workspaces/controllers" workspaces_controllers "databasus-backend/internal/features/workspaces/controllers"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
"postgresus-backend/internal/util/period" "databasus-backend/internal/util/period"
test_utils "postgresus-backend/internal/util/testing" test_utils "databasus-backend/internal/util/testing"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
func createTestRouter() *gin.Engine { func createTestRouter() *gin.Engine {

View File

@@ -1,9 +1,9 @@
package backups_config package backups_config
import ( import (
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
) )
var backupConfigRepository = &BackupConfigRepository{} var backupConfigRepository = &BackupConfigRepository{}

View File

@@ -1,10 +1,10 @@
package backups_config package backups_config
import ( import (
"databasus-backend/internal/features/intervals"
"databasus-backend/internal/features/storages"
"databasus-backend/internal/util/period"
"errors" "errors"
"postgresus-backend/internal/features/intervals"
"postgresus-backend/internal/features/storages"
"postgresus-backend/internal/util/period"
"strings" "strings"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -1,8 +1,8 @@
package backups_config package backups_config
import ( import (
"databasus-backend/internal/storage"
"errors" "errors"
"postgresus-backend/internal/storage"
"github.com/google/uuid" "github.com/google/uuid"
"gorm.io/gorm" "gorm.io/gorm"

View File

@@ -3,12 +3,12 @@ package backups_config
import ( import (
"errors" "errors"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/intervals" "databasus-backend/internal/features/intervals"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
users_models "postgresus-backend/internal/features/users/models" users_models "databasus-backend/internal/features/users/models"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
"postgresus-backend/internal/util/period" "databasus-backend/internal/util/period"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,9 +1,9 @@
package backups_config package backups_config
import ( import (
"postgresus-backend/internal/features/intervals" "databasus-backend/internal/features/intervals"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
"postgresus-backend/internal/util/period" "databasus-backend/internal/util/period"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,10 +1,10 @@
package databases package databases
import ( import (
users_middleware "databasus-backend/internal/features/users/middleware"
users_services "databasus-backend/internal/features/users/services"
workspaces_services "databasus-backend/internal/features/workspaces/services"
"net/http" "net/http"
users_middleware "postgresus-backend/internal/features/users/middleware"
users_services "postgresus-backend/internal/features/users/services"
workspaces_services "postgresus-backend/internal/features/workspaces/services"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -11,16 +11,16 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"postgresus-backend/internal/features/databases/databases/mariadb" "databasus-backend/internal/features/databases/databases/mariadb"
"postgresus-backend/internal/features/databases/databases/mongodb" "databasus-backend/internal/features/databases/databases/mongodb"
"postgresus-backend/internal/features/databases/databases/postgresql" "databasus-backend/internal/features/databases/databases/postgresql"
users_enums "postgresus-backend/internal/features/users/enums" users_enums "databasus-backend/internal/features/users/enums"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
workspaces_controllers "postgresus-backend/internal/features/workspaces/controllers" workspaces_controllers "databasus-backend/internal/features/workspaces/controllers"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
test_utils "postgresus-backend/internal/util/testing" test_utils "databasus-backend/internal/util/testing"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
func createTestRouter() *gin.Engine { func createTestRouter() *gin.Engine {

View File

@@ -10,8 +10,8 @@ import (
"strings" "strings"
"time" "time"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -14,8 +14,8 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
func Test_IsUserReadOnly_AdminUser_ReturnsFalse(t *testing.T) { func Test_IsUserReadOnly_AdminUser_ReturnsFalse(t *testing.T) {

View File

@@ -8,8 +8,8 @@ import (
"regexp" "regexp"
"time" "time"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
"github.com/google/uuid" "github.com/google/uuid"
"go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson"
@@ -284,7 +284,7 @@ func (m *MongodbDatabase) CreateReadOnlyUser(
maxRetries := 3 maxRetries := 3
for attempt := range maxRetries { for attempt := range maxRetries {
newUsername := fmt.Sprintf("postgresus-%s", uuid.New().String()[:8]) newUsername := fmt.Sprintf("databasus-%s", uuid.New().String()[:8])
newPassword := uuid.New().String() newPassword := uuid.New().String()
adminDB := client.Database(authDB) adminDB := client.Database(authDB)

View File

@@ -15,8 +15,8 @@ import (
"go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/options"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
func Test_IsUserReadOnly_AdminUser_ReturnsFalse(t *testing.T) { func Test_IsUserReadOnly_AdminUser_ReturnsFalse(t *testing.T) {
@@ -95,7 +95,7 @@ func Test_CreateReadOnlyUser_UserCanReadButNotWrite(t *testing.T) {
assert.NoError(t, err) assert.NoError(t, err)
assert.NotEmpty(t, username) assert.NotEmpty(t, username)
assert.NotEmpty(t, password) assert.NotEmpty(t, password)
assert.True(t, strings.HasPrefix(username, "postgresus-")) assert.True(t, strings.HasPrefix(username, "databasus-"))
if err != nil { if err != nil {
return return

View File

@@ -9,8 +9,8 @@ import (
"regexp" "regexp"
"time" "time"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
"github.com/google/uuid" "github.com/google/uuid"
@@ -258,7 +258,7 @@ func (m *MysqlDatabase) CreateReadOnlyUser(
maxRetries := 3 maxRetries := 3
for attempt := range maxRetries { for attempt := range maxRetries {
newUsername := fmt.Sprintf("postgresus-%s", uuid.New().String()[:8]) newUsername := fmt.Sprintf("databasus-%s", uuid.New().String()[:8])
newPassword := uuid.New().String() newPassword := uuid.New().String()
tx, err := db.BeginTx(ctx, nil) tx, err := db.BeginTx(ctx, nil)

View File

@@ -14,8 +14,8 @@ import (
"github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
func Test_IsUserReadOnly_AdminUser_ReturnsFalse(t *testing.T) { func Test_IsUserReadOnly_AdminUser_ReturnsFalse(t *testing.T) {
@@ -97,7 +97,7 @@ func Test_CreateReadOnlyUser_UserCanReadButNotWrite(t *testing.T) {
assert.NoError(t, err) assert.NoError(t, err)
assert.NotEmpty(t, username) assert.NotEmpty(t, username)
assert.NotEmpty(t, password) assert.NotEmpty(t, password)
assert.True(t, strings.HasPrefix(username, "postgresus-")) assert.True(t, strings.HasPrefix(username, "databasus-"))
readOnlyModel := &MysqlDatabase{ readOnlyModel := &MysqlDatabase{
Version: mysqlModel.Version, Version: mysqlModel.Version,
@@ -242,7 +242,7 @@ func Test_CreateReadOnlyUser_DatabaseNameWithDash_Success(t *testing.T) {
assert.NoError(t, err) assert.NoError(t, err)
assert.NotEmpty(t, username) assert.NotEmpty(t, username)
assert.NotEmpty(t, password) assert.NotEmpty(t, password)
assert.True(t, strings.HasPrefix(username, "postgresus-")) assert.True(t, strings.HasPrefix(username, "databasus-"))
readOnlyDSN := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?parseTime=true", readOnlyDSN := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?parseTime=true",
username, password, container.Host, container.Port, dashDbName) username, password, container.Host, container.Port, dashDbName)

View File

@@ -2,11 +2,11 @@ package postgresql
import ( import (
"context" "context"
"databasus-backend/internal/util/encryption"
"databasus-backend/internal/util/tools"
"errors" "errors"
"fmt" "fmt"
"log/slog" "log/slog"
"postgresus-backend/internal/util/encryption"
"postgresus-backend/internal/util/tools"
"regexp" "regexp"
"strings" "strings"
"time" "time"
@@ -319,7 +319,7 @@ func (p *PostgresqlDatabase) IsUserReadOnly(
// 5. Sets default privileges for future tables and sequences // 5. Sets default privileges for future tables and sequences
// //
// Security features: // Security features:
// - Username format: "postgresus-{8-char-uuid}" for uniqueness // - Username format: "databasus-{8-char-uuid}" for uniqueness
// - Password: Full UUID (36 characters) for strong entropy // - Password: Full UUID (36 characters) for strong entropy
// - Transaction safety: All operations rollback on any failure // - Transaction safety: All operations rollback on any failure
// - Retry logic: Up to 3 attempts if username collision occurs // - Retry logic: Up to 3 attempts if username collision occurs
@@ -365,7 +365,7 @@ func (p *PostgresqlDatabase) CreateReadOnlyUser(
maxRetries := 3 maxRetries := 3
for attempt := range maxRetries { for attempt := range maxRetries {
// Generate base username for PostgreSQL user creation // Generate base username for PostgreSQL user creation
baseUsername := fmt.Sprintf("postgresus-%s", uuid.New().String()[:8]) baseUsername := fmt.Sprintf("databasus-%s", uuid.New().String()[:8])
// For Supabase session pooler, the username format for connection is "username.projectid" // For Supabase session pooler, the username format for connection is "username.projectid"
// but the actual PostgreSQL user must be created with just the base name. // but the actual PostgreSQL user must be created with just the base name.

View File

@@ -14,8 +14,8 @@ import (
_ "github.com/lib/pq" _ "github.com/lib/pq"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
func Test_IsUserReadOnly_AdminUser_ReturnsFalse(t *testing.T) { func Test_IsUserReadOnly_AdminUser_ReturnsFalse(t *testing.T) {
@@ -93,7 +93,7 @@ func Test_CreateReadOnlyUser_UserCanReadButNotWrite(t *testing.T) {
assert.NoError(t, err) assert.NoError(t, err)
assert.NotEmpty(t, username) assert.NotEmpty(t, username)
assert.NotEmpty(t, password) assert.NotEmpty(t, password)
assert.True(t, strings.HasPrefix(username, "postgresus-")) assert.True(t, strings.HasPrefix(username, "databasus-"))
readOnlyModel := &PostgresqlDatabase{ readOnlyModel := &PostgresqlDatabase{
Version: pgModel.Version, Version: pgModel.Version,
@@ -295,7 +295,7 @@ func Test_CreateReadOnlyUser_DatabaseNameWithDash_Success(t *testing.T) {
assert.NoError(t, err) assert.NoError(t, err)
assert.NotEmpty(t, username) assert.NotEmpty(t, username)
assert.NotEmpty(t, password) assert.NotEmpty(t, password)
assert.True(t, strings.HasPrefix(username, "postgresus-")) assert.True(t, strings.HasPrefix(username, "databasus-"))
readOnlyDSN := fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable", readOnlyDSN := fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable",
container.Host, container.Port, username, password, dashDbName) container.Host, container.Port, username, password, dashDbName)
@@ -378,7 +378,7 @@ func Test_CreateReadOnlyUser_Supabase_UserCanReadButNotWrite(t *testing.T) {
assert.NoError(t, err) assert.NoError(t, err)
assert.NotEmpty(t, connectionUsername) assert.NotEmpty(t, connectionUsername)
assert.NotEmpty(t, newPassword) assert.NotEmpty(t, newPassword)
assert.True(t, strings.HasPrefix(connectionUsername, "postgresus-")) assert.True(t, strings.HasPrefix(connectionUsername, "databasus-"))
baseUsername := connectionUsername baseUsername := connectionUsername
if idx := strings.Index(connectionUsername, "."); idx != -1 { if idx := strings.Index(connectionUsername, "."); idx != -1 {

View File

@@ -1,12 +1,12 @@
package databases package databases
import ( import (
audit_logs "postgresus-backend/internal/features/audit_logs" audit_logs "databasus-backend/internal/features/audit_logs"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
users_services "postgresus-backend/internal/features/users/services" users_services "databasus-backend/internal/features/users/services"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var databaseRepository = &DatabaseRepository{} var databaseRepository = &DatabaseRepository{}

View File

@@ -1,8 +1,8 @@
package databases package databases
import ( import (
"databasus-backend/internal/util/encryption"
"log/slog" "log/slog"
"postgresus-backend/internal/util/encryption"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,14 +1,14 @@
package databases package databases
import ( import (
"databasus-backend/internal/features/databases/databases/mariadb"
"databasus-backend/internal/features/databases/databases/mongodb"
"databasus-backend/internal/features/databases/databases/mysql"
"databasus-backend/internal/features/databases/databases/postgresql"
"databasus-backend/internal/features/notifiers"
"databasus-backend/internal/util/encryption"
"errors" "errors"
"log/slog" "log/slog"
"postgresus-backend/internal/features/databases/databases/mariadb"
"postgresus-backend/internal/features/databases/databases/mongodb"
"postgresus-backend/internal/features/databases/databases/mysql"
"postgresus-backend/internal/features/databases/databases/postgresql"
"postgresus-backend/internal/features/notifiers"
"postgresus-backend/internal/util/encryption"
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -1,12 +1,12 @@
package databases package databases
import ( import (
"databasus-backend/internal/features/databases/databases/mariadb"
"databasus-backend/internal/features/databases/databases/mongodb"
"databasus-backend/internal/features/databases/databases/mysql"
"databasus-backend/internal/features/databases/databases/postgresql"
"databasus-backend/internal/storage"
"errors" "errors"
"postgresus-backend/internal/features/databases/databases/mariadb"
"postgresus-backend/internal/features/databases/databases/mongodb"
"postgresus-backend/internal/features/databases/databases/mysql"
"postgresus-backend/internal/features/databases/databases/postgresql"
"postgresus-backend/internal/storage"
"github.com/google/uuid" "github.com/google/uuid"
"gorm.io/gorm" "gorm.io/gorm"

View File

@@ -7,15 +7,15 @@ import (
"log/slog" "log/slog"
"time" "time"
audit_logs "postgresus-backend/internal/features/audit_logs" audit_logs "databasus-backend/internal/features/audit_logs"
"postgresus-backend/internal/features/databases/databases/mariadb" "databasus-backend/internal/features/databases/databases/mariadb"
"postgresus-backend/internal/features/databases/databases/mongodb" "databasus-backend/internal/features/databases/databases/mongodb"
"postgresus-backend/internal/features/databases/databases/mysql" "databasus-backend/internal/features/databases/databases/mysql"
"postgresus-backend/internal/features/databases/databases/postgresql" "databasus-backend/internal/features/databases/databases/postgresql"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
users_models "postgresus-backend/internal/features/users/models" users_models "databasus-backend/internal/features/users/models"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,10 +1,10 @@
package databases package databases
import ( import (
"postgresus-backend/internal/features/databases/databases/postgresql" "databasus-backend/internal/features/databases/databases/postgresql"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"os" "os"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
user_models "postgresus-backend/internal/features/users/models" user_models "databasus-backend/internal/features/users/models"
"postgresus-backend/internal/storage" "databasus-backend/internal/storage"
"github.com/google/uuid" "github.com/google/uuid"
"gorm.io/gorm" "gorm.io/gorm"

View File

@@ -1,9 +1,9 @@
package healthcheck_attempt package healthcheck_attempt
import ( import (
"databasus-backend/internal/config"
healthcheck_config "databasus-backend/internal/features/healthcheck/config"
"log/slog" "log/slog"
"postgresus-backend/internal/config"
healthcheck_config "postgresus-backend/internal/features/healthcheck/config"
"time" "time"
) )

View File

@@ -1,12 +1,12 @@
package healthcheck_attempt package healthcheck_attempt
import ( import (
"databasus-backend/internal/features/databases"
healthcheck_config "databasus-backend/internal/features/healthcheck/config"
"databasus-backend/internal/util/logger"
"errors" "errors"
"fmt" "fmt"
"log/slog" "log/slog"
"postgresus-backend/internal/features/databases"
healthcheck_config "postgresus-backend/internal/features/healthcheck/config"
"postgresus-backend/internal/util/logger"
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -6,13 +6,13 @@ import (
"testing" "testing"
"time" "time"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
healthcheck_config "postgresus-backend/internal/features/healthcheck/config" healthcheck_config "databasus-backend/internal/features/healthcheck/config"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"postgresus-backend/internal/features/storages" "databasus-backend/internal/features/storages"
users_enums "postgresus-backend/internal/features/users/enums" users_enums "databasus-backend/internal/features/users/enums"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"

View File

@@ -1,8 +1,8 @@
package healthcheck_attempt package healthcheck_attempt
import ( import (
users_middleware "databasus-backend/internal/features/users/middleware"
"net/http" "net/http"
users_middleware "postgresus-backend/internal/features/users/middleware"
"time" "time"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"

View File

@@ -11,14 +11,14 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/databases/databases/postgresql" "databasus-backend/internal/features/databases/databases/postgresql"
users_enums "postgresus-backend/internal/features/users/enums" users_enums "databasus-backend/internal/features/users/enums"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
workspaces_controllers "postgresus-backend/internal/features/workspaces/controllers" workspaces_controllers "databasus-backend/internal/features/workspaces/controllers"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
test_utils "postgresus-backend/internal/util/testing" test_utils "databasus-backend/internal/util/testing"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
func createTestRouter() *gin.Engine { func createTestRouter() *gin.Engine {

View File

@@ -1,11 +1,11 @@
package healthcheck_attempt package healthcheck_attempt
import ( import (
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
healthcheck_config "postgresus-backend/internal/features/healthcheck/config" healthcheck_config "databasus-backend/internal/features/healthcheck/config"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var healthcheckAttemptRepository = &HealthcheckAttemptRepository{} var healthcheckAttemptRepository = &HealthcheckAttemptRepository{}

View File

@@ -1,8 +1,8 @@
package healthcheck_attempt package healthcheck_attempt
import ( import (
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,8 +1,8 @@
package healthcheck_attempt package healthcheck_attempt
import ( import (
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/notifiers" "databasus-backend/internal/features/notifiers"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"

View File

@@ -1,7 +1,7 @@
package healthcheck_attempt package healthcheck_attempt
import ( import (
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -1,7 +1,7 @@
package healthcheck_attempt package healthcheck_attempt
import ( import (
"postgresus-backend/internal/storage" "databasus-backend/internal/storage"
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -1,10 +1,10 @@
package healthcheck_attempt package healthcheck_attempt
import ( import (
"databasus-backend/internal/features/databases"
users_models "databasus-backend/internal/features/users/models"
workspaces_services "databasus-backend/internal/features/workspaces/services"
"errors" "errors"
"postgresus-backend/internal/features/databases"
users_models "postgresus-backend/internal/features/users/models"
workspaces_services "postgresus-backend/internal/features/workspaces/services"
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -1,8 +1,8 @@
package healthcheck_config package healthcheck_config
import ( import (
users_middleware "databasus-backend/internal/features/users/middleware"
"net/http" "net/http"
users_middleware "postgresus-backend/internal/features/users/middleware"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -9,14 +9,14 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
"postgresus-backend/internal/features/databases/databases/postgresql" "databasus-backend/internal/features/databases/databases/postgresql"
users_enums "postgresus-backend/internal/features/users/enums" users_enums "databasus-backend/internal/features/users/enums"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
workspaces_controllers "postgresus-backend/internal/features/workspaces/controllers" workspaces_controllers "databasus-backend/internal/features/workspaces/controllers"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
test_utils "postgresus-backend/internal/util/testing" test_utils "databasus-backend/internal/util/testing"
"postgresus-backend/internal/util/tools" "databasus-backend/internal/util/tools"
) )
func createTestRouter() *gin.Engine { func createTestRouter() *gin.Engine {

View File

@@ -1,10 +1,10 @@
package healthcheck_config package healthcheck_config
import ( import (
"postgresus-backend/internal/features/audit_logs" "databasus-backend/internal/features/audit_logs"
"postgresus-backend/internal/features/databases" "databasus-backend/internal/features/databases"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var healthcheckConfigRepository = &HealthcheckConfigRepository{} var healthcheckConfigRepository = &HealthcheckConfigRepository{}

View File

@@ -1,8 +1,8 @@
package healthcheck_config package healthcheck_config
import ( import (
"databasus-backend/internal/storage"
"errors" "errors"
"postgresus-backend/internal/storage"
"github.com/google/uuid" "github.com/google/uuid"
"gorm.io/gorm" "gorm.io/gorm"

View File

@@ -1,13 +1,13 @@
package healthcheck_config package healthcheck_config
import ( import (
"databasus-backend/internal/features/audit_logs"
"databasus-backend/internal/features/databases"
users_models "databasus-backend/internal/features/users/models"
workspaces_services "databasus-backend/internal/features/workspaces/services"
"errors" "errors"
"fmt" "fmt"
"log/slog" "log/slog"
"postgresus-backend/internal/features/audit_logs"
"postgresus-backend/internal/features/databases"
users_models "postgresus-backend/internal/features/users/models"
workspaces_services "postgresus-backend/internal/features/workspaces/services"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,9 +1,9 @@
package notifiers package notifiers
import ( import (
users_middleware "databasus-backend/internal/features/users/middleware"
workspaces_services "databasus-backend/internal/features/workspaces/services"
"net/http" "net/http"
users_middleware "postgresus-backend/internal/features/users/middleware"
workspaces_services "postgresus-backend/internal/features/workspaces/services"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -5,21 +5,21 @@ import (
"net/http" "net/http"
"testing" "testing"
"postgresus-backend/internal/config" "databasus-backend/internal/config"
audit_logs "postgresus-backend/internal/features/audit_logs" audit_logs "databasus-backend/internal/features/audit_logs"
discord_notifier "postgresus-backend/internal/features/notifiers/models/discord" discord_notifier "databasus-backend/internal/features/notifiers/models/discord"
email_notifier "postgresus-backend/internal/features/notifiers/models/email_notifier" email_notifier "databasus-backend/internal/features/notifiers/models/email_notifier"
slack_notifier "postgresus-backend/internal/features/notifiers/models/slack" slack_notifier "databasus-backend/internal/features/notifiers/models/slack"
teams_notifier "postgresus-backend/internal/features/notifiers/models/teams" teams_notifier "databasus-backend/internal/features/notifiers/models/teams"
telegram_notifier "postgresus-backend/internal/features/notifiers/models/telegram" telegram_notifier "databasus-backend/internal/features/notifiers/models/telegram"
webhook_notifier "postgresus-backend/internal/features/notifiers/models/webhook" webhook_notifier "databasus-backend/internal/features/notifiers/models/webhook"
users_enums "postgresus-backend/internal/features/users/enums" users_enums "databasus-backend/internal/features/users/enums"
users_middleware "postgresus-backend/internal/features/users/middleware" users_middleware "databasus-backend/internal/features/users/middleware"
users_services "postgresus-backend/internal/features/users/services" users_services "databasus-backend/internal/features/users/services"
users_testing "postgresus-backend/internal/features/users/testing" users_testing "databasus-backend/internal/features/users/testing"
workspaces_controllers "postgresus-backend/internal/features/workspaces/controllers" workspaces_controllers "databasus-backend/internal/features/workspaces/controllers"
workspaces_testing "postgresus-backend/internal/features/workspaces/testing" workspaces_testing "databasus-backend/internal/features/workspaces/testing"
test_utils "postgresus-backend/internal/util/testing" test_utils "databasus-backend/internal/util/testing"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -1,10 +1,10 @@
package notifiers package notifiers
import ( import (
audit_logs "postgresus-backend/internal/features/audit_logs" audit_logs "databasus-backend/internal/features/audit_logs"
workspaces_services "postgresus-backend/internal/features/workspaces/services" workspaces_services "databasus-backend/internal/features/workspaces/services"
"postgresus-backend/internal/util/encryption" "databasus-backend/internal/util/encryption"
"postgresus-backend/internal/util/logger" "databasus-backend/internal/util/logger"
) )
var notifierRepository = &NotifierRepository{} var notifierRepository = &NotifierRepository{}

View File

@@ -1,8 +1,8 @@
package notifiers package notifiers
import ( import (
"databasus-backend/internal/util/encryption"
"log/slog" "log/slog"
"postgresus-backend/internal/util/encryption"
) )
type NotificationSender interface { type NotificationSender interface {

View File

@@ -1,15 +1,15 @@
package notifiers package notifiers
import ( import (
discord_notifier "databasus-backend/internal/features/notifiers/models/discord"
"databasus-backend/internal/features/notifiers/models/email_notifier"
slack_notifier "databasus-backend/internal/features/notifiers/models/slack"
teams_notifier "databasus-backend/internal/features/notifiers/models/teams"
telegram_notifier "databasus-backend/internal/features/notifiers/models/telegram"
webhook_notifier "databasus-backend/internal/features/notifiers/models/webhook"
"databasus-backend/internal/util/encryption"
"errors" "errors"
"log/slog" "log/slog"
discord_notifier "postgresus-backend/internal/features/notifiers/models/discord"
"postgresus-backend/internal/features/notifiers/models/email_notifier"
slack_notifier "postgresus-backend/internal/features/notifiers/models/slack"
teams_notifier "postgresus-backend/internal/features/notifiers/models/teams"
telegram_notifier "postgresus-backend/internal/features/notifiers/models/telegram"
webhook_notifier "postgresus-backend/internal/features/notifiers/models/webhook"
"postgresus-backend/internal/util/encryption"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -2,13 +2,13 @@ package discord_notifier
import ( import (
"bytes" "bytes"
"databasus-backend/internal/util/encryption"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"io" "io"
"log/slog" "log/slog"
"net/http" "net/http"
"postgresus-backend/internal/util/encryption"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -2,12 +2,12 @@ package email_notifier
import ( import (
"crypto/tls" "crypto/tls"
"databasus-backend/internal/util/encryption"
"errors" "errors"
"fmt" "fmt"
"log/slog" "log/slog"
"net" "net"
"net/smtp" "net/smtp"
"postgresus-backend/internal/util/encryption"
"time" "time"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -2,13 +2,13 @@ package slack_notifier
import ( import (
"bytes" "bytes"
"databasus-backend/internal/util/encryption"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"io" "io"
"log/slog" "log/slog"
"net/http" "net/http"
"postgresus-backend/internal/util/encryption"
"strconv" "strconv"
"strings" "strings"
"time" "time"

View File

@@ -2,13 +2,13 @@ package teams_notifier
import ( import (
"bytes" "bytes"
"databasus-backend/internal/util/encryption"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"log/slog" "log/slog"
"net/http" "net/http"
"net/url" "net/url"
"postgresus-backend/internal/util/encryption"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -1,13 +1,13 @@
package telegram_notifier package telegram_notifier
import ( import (
"databasus-backend/internal/util/encryption"
"errors" "errors"
"fmt" "fmt"
"io" "io"
"log/slog" "log/slog"
"net/http" "net/http"
"net/url" "net/url"
"postgresus-backend/internal/util/encryption"
"strconv" "strconv"
"strings" "strings"

View File

@@ -2,6 +2,7 @@ package webhook_notifier
import ( import (
"bytes" "bytes"
"databasus-backend/internal/util/encryption"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
@@ -9,7 +10,6 @@ import (
"log/slog" "log/slog"
"net/http" "net/http"
"net/url" "net/url"
"postgresus-backend/internal/util/encryption"
"strings" "strings"
"github.com/google/uuid" "github.com/google/uuid"

View File

@@ -1,7 +1,7 @@
package notifiers package notifiers
import ( import (
"postgresus-backend/internal/storage" "databasus-backend/internal/storage"
"github.com/google/uuid" "github.com/google/uuid"
"gorm.io/gorm" "gorm.io/gorm"

Some files were not shown because too many files have changed in this diff Show More