this checks if a rune is supported in tenant IDs (according to https://cortexmetrics.io/docs/guides/limitations/#tenant-id-naming)
(c rune)
| 110 | // this checks if a rune is supported in tenant IDs (according to |
| 111 | // https://cortexmetrics.io/docs/guides/limitations/#tenant-id-naming) |
| 112 | func isSupported(c rune) bool { |
| 113 | // characters |
| 114 | if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') { |
| 115 | return true |
| 116 | } |
| 117 | |
| 118 | // digits |
| 119 | if '0' <= c && c <= '9' { |
| 120 | return true |
| 121 | } |
| 122 | |
| 123 | // special |
| 124 | return c == '!' || |
| 125 | c == '-' || |
| 126 | c == '_' || |
| 127 | c == '.' || |
| 128 | c == '*' || |
| 129 | c == '\'' || |
| 130 | c == '(' || |
| 131 | c == ')' |
| 132 | } |
| 133 | |
| 134 | // TenantIDsFromOrgID extracts different tenants from an orgID string value |
| 135 | // |