9e6bea681f
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.
52 lines
1.3 KiB
Markdown
52 lines
1.3 KiB
Markdown
---
|
|
name: metabase_get_user
|
|
kind: function
|
|
lang: go
|
|
domain: infra
|
|
version: "1.0.0"
|
|
purity: impure
|
|
signature: "func MetabaseGetUser(client MetabaseClient, userID int) (map[string]any, error)"
|
|
description: "Obtiene los detalles de un usuario de Metabase por su ID numerico. Endpoint: GET /api/user/:id."
|
|
tags: [metabase, user, get, 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_get_user.go"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```go
|
|
user, err := MetabaseGetUser(client, 1)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
fmt.Println(user["email"], user["first_name"])
|
|
```
|
|
|
|
## Notas
|
|
|
|
Retorna el objeto usuario completo como map. Error 404 si el ID no existe.
|
|
|
|
### Campos del usuario retornado
|
|
|
|
| Campo | Tipo | Descripcion |
|
|
|-------|------|-------------|
|
|
| id | float64 | ID numerico |
|
|
| email | string | Email |
|
|
| first_name | string | Nombre |
|
|
| last_name | string | Apellido |
|
|
| is_superuser | bool | Es admin |
|
|
| is_active | bool | Esta activo |
|
|
| common_name | string | Nombre completo |
|
|
| date_joined | string | Fecha de creacion |
|
|
| last_login | string | Ultimo login |
|
|
| group_ids | []float64 | IDs de grupos |
|
|
| locale | string | Locale del usuario |
|