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