Download this file
| 1 | package directorydata |
| 2 | |
| 3 | // CanonicalOrigin is a closed registry of the existing suite instances. It |
| 4 | // does not authorize a write: only a confirmed operator adoption may bind one. |
| 5 | func CanonicalOrigin(app string) string { |
| 6 | switch app { |
| 7 | case "docs", "sheets", "slides", "memoria", "calendar", "calls", "equipo", "base": |
| 8 | return "https://" + app + ".oficina.works" |
| 9 | } |
| 10 | return "" |
| 11 | } |
| 12 | |
| 13 | // CanonicalBinding pins all parts of an existing instance's directory route. |
| 14 | func CanonicalBinding(label, app, consumer, origin string) bool { |
| 15 | return label == "oficina" && consumer == app && CanonicalOrigin(app) != "" && origin == CanonicalOrigin(app) |
| 16 | } |
| 17 | |