2026-03-31 14:23:12 +00:00
|
|
|
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
|
|
|
|
|
package agentic
|
|
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
2026-04-01 21:37:50 +00:00
|
|
|
func Example_parseAgentApiKey() {
|
|
|
|
|
key := parseAgentApiKey(map[string]any{
|
2026-03-31 14:23:12 +00:00
|
|
|
"id": 7,
|
|
|
|
|
"name": "codex local",
|
|
|
|
|
"prefix": "ak_live",
|
|
|
|
|
"permissions": []any{"plans:read", "plans:write"},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
fmt.Println(key.ID, key.Name, key.Prefix, len(key.Permissions))
|
|
|
|
|
// Output: 7 codex local ak_live 2
|
|
|
|
|
}
|