- sogoctl: supervisor avec health checks et restart auto - sogoway: gateway HTTP, auth JWT, routing par hostname - sogoms-db: microservice MariaDB avec pool par application - Protocol IPC Unix socket JSON length-prefixed - Config YAML multi-application (prokov) - Deploy script pour container Alpine gw3 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
96 lines
2.3 KiB
YAML
96 lines
2.3 KiB
YAML
# Scénario: Créer un projet
|
|
name: projects_create
|
|
version: "1.0"
|
|
description: Crée un nouveau projet
|
|
|
|
input:
|
|
required:
|
|
- name
|
|
optional:
|
|
- description
|
|
- parent_id
|
|
- position
|
|
- tags
|
|
defaults:
|
|
position: 0
|
|
validation:
|
|
name:
|
|
type: string
|
|
min_length: 1
|
|
max_length: 100
|
|
description:
|
|
type: string
|
|
max_length: 65535
|
|
parent_id:
|
|
type: int
|
|
position:
|
|
type: int
|
|
|
|
steps:
|
|
- id: check_parent
|
|
service: db
|
|
action: query_one
|
|
condition: "{{input.parent_id != null}}"
|
|
params:
|
|
query: "SELECT id FROM projects WHERE id = ? AND user_id = ?"
|
|
args: ["{{input.parent_id}}", "{{auth.user_id}}"]
|
|
on_error: abort
|
|
error_message: "Projet parent non trouvé"
|
|
error_status: 422
|
|
|
|
- id: insert_project
|
|
service: db
|
|
action: insert
|
|
params:
|
|
table: projects
|
|
data:
|
|
user_id: "{{auth.user_id}}"
|
|
parent_id: "{{input.parent_id}}"
|
|
name: "{{input.name}}"
|
|
description: "{{input.description}}"
|
|
position: "{{input.position}}"
|
|
|
|
- id: sync_tags
|
|
service: db
|
|
action: exec
|
|
condition: "{{input.tags != null && input.tags | length > 0}}"
|
|
foreach: "{{input.tags}}"
|
|
foreach_as: tag_id
|
|
params:
|
|
query: |
|
|
INSERT INTO project_tags (project_id, tag_id)
|
|
SELECT ?, id FROM tags WHERE id = ? AND user_id = ?
|
|
args: ["{{steps.insert_project.insert_id}}", "{{tag_id}}", "{{auth.user_id}}"]
|
|
|
|
- id: get_project
|
|
service: db
|
|
action: query_one
|
|
params:
|
|
query: "SELECT * FROM projects WHERE id = ?"
|
|
args: ["{{steps.insert_project.insert_id}}"]
|
|
|
|
- id: get_tags
|
|
service: db
|
|
action: query
|
|
params:
|
|
query: |
|
|
SELECT t.id, t.name, t.color
|
|
FROM tags t
|
|
JOIN project_tags pt ON t.id = pt.tag_id
|
|
WHERE pt.project_id = ?
|
|
args: ["{{steps.insert_project.insert_id}}"]
|
|
|
|
output:
|
|
status: 201
|
|
body:
|
|
success: true
|
|
message: "Projet créé"
|
|
data:
|
|
id: "{{steps.get_project.result.id}}"
|
|
name: "{{steps.get_project.result.name}}"
|
|
description: "{{steps.get_project.result.description}}"
|
|
parent_id: "{{steps.get_project.result.parent_id}}"
|
|
position: "{{steps.get_project.result.position}}"
|
|
created_at: "{{steps.get_project.result.created_at}}"
|
|
tags: "{{steps.get_tags.result}}"
|