Skip to content

Commit

Permalink
fix: s3gw lists
Browse files Browse the repository at this point in the history
Signed-off-by: Mateusz Urbanek <mateusz.urbanek.98@gmail.com>
  • Loading branch information
shanduur committed Apr 12, 2024
1 parent e45f8b5 commit 7aad2ec
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 11 deletions.
5 changes: 5 additions & 0 deletions docs/projects/s3gw/auth-api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Auth API
weight: 99
---

# Auth API

[![Stoplight Elements](https://img.shields.io/badge/Stoplight_Elements-S3GW_Auth-blue)](https://elements-demo.stoplight.io/?spec=https://raw.githubusercontent.com/miriady/infrastructure/main/resources/auth/openapi.yaml#/)
Expand Down
5 changes: 5 additions & 0 deletions docs/projects/s3gw/aws-s3-api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: AWS S3 API
weight: 99
---

# AWS S3 API

[![Stoplight Elements](https://img.shields.io/badge/Stoplight_Elements-Amazon_Simple_Storage_Service-blue)](https://elements-demo.stoplight.io/?spec=https://api.apis.guru/v2/specs/amazonaws.com/s3/2006-03-01/openapi.json#/)
Expand Down
27 changes: 17 additions & 10 deletions docs/projects/s3gw/s3gw.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: S3 Gateway
weight: 0
---

# S3 Gateway

The S3 Gateway is a service designed to interact with a storage system (likely an S3-compatible storage) and a PostgreSQL database. It facilitates operations such as retrieving data from storage and managing API keys for accessing the system.
Expand Down Expand Up @@ -44,18 +49,20 @@ sequenceDiagram
### Relations

This class diagram represents the database schema of the project. It includes the following entities:
- **Users**: Represents users of the system with attributes such as `user_id`, `username`, `password_hash`, and `created_at`.
- **API_Keys**: Represents API keys associated with users, including attributes such as `api_key_id`, `user_id`, `api_key_hash`, and `created_at`.
- **Buckets**: Represents storage buckets with attributes such as `bucket_id`, `bucket_name`, and `created_at`.
- **Objects**: Represents objects stored within buckets with attributes such as `object_id`, `bucket_id`, `object_version`, `object_key`, `object_data`, `object_data_checksum`, and `created_at`.
- **Authorisations**: Represents authorizations for accessing buckets with attributes such as `auth_id`, `api_key_id`, `bucket_id`, and `created_at`.

* **Users**: Represents users of the system with attributes such as `user_id`, `username`, `password_hash`, and `created_at`.
* **API_Keys**: Represents API keys associated with users, including attributes such as `api_key_id`, `user_id`, `api_key_hash`, and `created_at`.
* **Buckets**: Represents storage buckets with attributes such as `bucket_id`, `bucket_name`, and `created_at`.
* **Objects**: Represents objects stored within buckets with attributes such as `object_id`, `bucket_id`, `object_version`, `object_key`, `object_data`, `object_data_checksum`, and `created_at`.
* **Authorisations**: Represents authorizations for accessing buckets with attributes such as `auth_id`, `api_key_id`, `bucket_id`, and `created_at`.

The relationships between these entities are depicted as follows:
- Users can have multiple API keys (`One [User] to Many [API_Keys]`).
- Users can be associated with multiple buckets, and buckets can be associated with multiple users (`Many [Users] to Many [Buckets]`).
- Each bucket can contain multiple objects (`One [Bucket] to Many [Objects]`).
- Each API key can have multiple authorizations (`One [API_Key] to Many [Authorizations]`).
- Many authorizations can be associated with one bucket (`Many [Authorizations] to One [Bucket]`).

* Users can have multiple API keys (`One [User] to Many [API_Keys]`).
* Users can be associated with multiple buckets, and buckets can be associated with multiple users (`Many [Users] to Many [Buckets]`).
* Each bucket can contain multiple objects (`One [Bucket] to Many [Objects]`).
* Each API key can have multiple authorizations (`One [API_Key] to Many [Authorizations]`).
* Many authorizations can be associated with one bucket (`Many [Authorizations] to One [Bucket]`).

```mermaid
classDiagram
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ mkdocs-material
mkdocs-macros-plugin
mkdocs-swagger-ui-tag
mkdocs-mermaid2-plugin
mkdocs-nav-weight
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ build-docs VERSION:
version="{{VERSION}}"

# Determine if this is a prerelease version
if echo "${version}" | grep -E -- "-(alpha|beta|rc)\.[0-9]+" > /dev/null; then
if echo "${version}" | grep -E -- "(-(alpha|beta|rc)\.[0-9]+)|(^main$)" > /dev/null; then
prerelease="true"
else
prerelease="false"
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ plugins:
- search
- mermaid2
- swagger-ui-tag
- mkdocs-nav-weight
- macros:
module_name: docs/macros

Expand Down

0 comments on commit 7aad2ec

Please sign in to comment.