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,16 @@
|
||||
package infra
|
||||
|
||||
import "fmt"
|
||||
|
||||
// MetabaseDeleteDashboard elimina permanentemente un dashboard de Metabase.
|
||||
// Para soft-delete, usar MetabaseUpdateDashboard con archived: true.
|
||||
func MetabaseDeleteDashboard(client MetabaseClient, dashboardID int) error {
|
||||
path := fmt.Sprintf("/api/dashboard/%d", dashboardID)
|
||||
|
||||
_, err := metabaseRequest("DELETE", client.BaseURL, client.Token, path, nil)
|
||||
if err != nil {
|
||||
return fmt.Errorf("metabase delete dashboard %d: %w", dashboardID, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user