Download this file
| 1 | // Command memoria-contract exports the live agent operation schemas as JSON. |
| 2 | package main |
| 3 | |
| 4 | import ( |
| 5 | "encoding/json" |
| 6 | "fmt" |
| 7 | "os" |
| 8 | |
| 9 | "amadan.net/oficina/memoria/internal/memoria" |
| 10 | ) |
| 11 | |
| 12 | func main() { |
| 13 | ops, err := memoria.AgentContracts() |
| 14 | if err != nil { |
| 15 | fmt.Fprintln(os.Stderr, "Could not export operation contracts.") |
| 16 | os.Exit(1) |
| 17 | } |
| 18 | encoder := json.NewEncoder(os.Stdout) |
| 19 | encoder.SetIndent("", " ") |
| 20 | if encoder.Encode(ops) != nil { |
| 21 | os.Exit(1) |
| 22 | } |
| 23 | } |
| 24 | |