feat: funciones Go para API Metabase y tipo MetabaseClient
Añade funciones Go stub para la API de Metabase en dominio infra: auth, CRUD de cards, dashboards y users, execute_query y execute_card. Incluye tipo MetabaseClient y helper HTTP compartido. Todas las funciones son impuras con stubs not-implemented.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: metabase_delete_card
|
||||
kind: function
|
||||
lang: go
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
purity: impure
|
||||
signature: "func MetabaseDeleteCard(client MetabaseClient, cardID int) error"
|
||||
description: "Elimina permanentemente una card/pregunta de Metabase. Accion irreversible. Para soft-delete usar MetabaseUpdateCard con archived:true. Endpoint: DELETE /api/card/:id."
|
||||
tags: [metabase, card, question, delete, api]
|
||||
uses_functions: []
|
||||
uses_types: [MetabaseClient_go_infra]
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt]
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "functions/infra/metabase_delete_card.go"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```go
|
||||
// Eliminar permanentemente
|
||||
err := MetabaseDeleteCard(client, 42)
|
||||
|
||||
// Preferir soft-delete cuando sea posible:
|
||||
// MetabaseUpdateCard(client, 42, map[string]any{"archived": true})
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
**ATENCION**: Esta operacion es irreversible. La card se elimina permanentemente.
|
||||
|
||||
Para un borrado seguro, preferir archivar con `MetabaseUpdateCard(client, cardID, map[string]any{"archived": true})` que permite recuperar la card despues.
|
||||
Reference in New Issue
Block a user