Download this file
| 1 | package mail |
| 2 | |
| 3 | import ( |
| 4 | "errors" |
| 5 | |
| 6 | "github.com/carlosframework/platform/internal/release" |
| 7 | ) |
| 8 | |
| 9 | // ConsoleMailApp is the referrer the console's own sending domain hangs off |
| 10 | // in the ops account (internal/console/consolemail.go). It is not a real app: |
| 11 | // the console claims the domain under this name so that no app's estate |
| 12 | // owns it. The console refuses to create or rename an app onto it, and the |
| 13 | // release walks here refuse to tear its domain down, so an app that reaches |
| 14 | // the name some other way still cannot take the console's identity with it. |
| 15 | const ConsoleMailApp = "console-mail" |
| 16 | |
| 17 | // ErrConsoleMailReserved is RemoveDomain's refusal of the console's own |
| 18 | // sending domain: the ops account's ConsoleMailApp referrer, or a claim that |
| 19 | // referrer made. |
| 20 | var ErrConsoleMailReserved = errors.New("mail: the console's own sending domain cannot be removed") |
| 21 | |
| 22 | // isConsoleMail reports whether acct/app is the console's own referrer. |
| 23 | func isConsoleMail(acct, app string) bool { |
| 24 | return acct == release.OpsAccount && app == ConsoleMailApp |
| 25 | } |
| 26 | |