Updated Developer documentation (markdown)

This commit is contained in:
Bendegúz Gyönki 2020-11-29 17:26:38 +01:00
parent 363d39b56e
commit 3f10b238d2

View File

@ -30,7 +30,11 @@ Each error type must have a status code that is unique in the whole program. The
## Memory allocation ## Memory allocation
The module provides its own memory allocation library called **MagicMemory**. The library can be used to create MagicMemory contexts. All memory allocation calls must be performed through this library. If a function allocates memory, it has to take a MagicMemory context (that has the type `mm_ctx`) as its first parameter and perform the memory allocation inside that context. Before the program exits, all of the contexts must be freed up. The module provides its own memory allocation library called **MagicMemory**.
The library can be used to create MagicMemory contexts. All memory allocation calls must be performed through this library. If a function allocates memory, it has to take a MagicMemory context (that has the type `mm_ctx`) as its first parameter and perform the memory allocation inside that context.
Before the program exits, all of the contexts must be freed up.
## Data validation ## Data validation
@ -44,10 +48,20 @@ It is not unusual for a parser function to call a validator function to validate
# CAFF previewer wrapper # CAFF previewer wrapper
This module makes communication between the previewer and the web client possible. This module makes communication between the previewer and the web client possible.
## Endpoint
The module provides only one endpoint:
**POST** `/preview`
**Request:** The endpoint expects a single CAFF file to be sent. The content of the CAFF file is expected to be senr in a raw binary format without any extra encapsulation. The content type must be set to `application/octet-stream`.
**Response:** If the preview extraction is successful, the response contains a single PNG image. The content type is set to `image/png`.
# Web application # Web application
This module provides the web UI for the users. This module provides the web UI for the users.
## Trying out our webshop ## Trying out our webshop
Since our webshop is a modern web application it has quite a few dependencies. To make trying it out easier we deployed to our own secure Kubernetes cluster. It is available at https://unstablevortex.kmlabz.com/ . Since our webshop is a modern web application, it has quite a few dependencies. To make trying it out easier, we deployed the web application to our own secure Kubernetes cluster. It is available at [unstablevortex.kmlabz.com](https://unstablevortex.kmlabz.com).
The application connects to every dependency (Minio, Caff Previewer Wrapper, SMTP and PostgreSQL server) over TLS and the configuration environment variables are stored in Vault. The application connects to every dependency (Minio, CAFF previewer wrapper, SMTP and PostgreSQL server) over TLS and the configuration environment variables are stored in [Vault](https://www.vaultproject.io/docs/what-is-vault).