-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathservices.go
More file actions
40 lines (36 loc) · 1.18 KB
/
services.go
File metadata and controls
40 lines (36 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package services
// Service is a type for the service part of a scope and/or role.
type Service string
// The list of registered services that publish scopes and/or roles.
const (
Amp Service = "amp"
CodyGateway Service = "cody_gateway"
Dotcom Service = "dotcom"
SAMS Service = "sams"
TelemetryGateway Service = "telemetry_gateway"
EnterprisePortal Service = "enterprise_portal"
MailGatekeeper Service = "mail_gatekeeper"
Workspaces Service = "workspaces"
SSC Service = "ssc"
Analytics Service = "analytics"
CloudAPI Service = "cloud_api"
)
var serviceNames = map[Service]string{
Amp: "Amp",
CodyGateway: "Cody Gateway",
Dotcom: "Sourcegraph Dotcom",
SAMS: "Sourcegraph Accounts Management System",
TelemetryGateway: "Telemetry Gateway",
EnterprisePortal: "Enterprise Portal",
MailGatekeeper: "Mail Gatekeeper",
Workspaces: "Workspaces",
SSC: "Self Serve Cody",
Analytics: "Sourcegraph Analytics",
CloudAPI: "Cloud API",
}
func (s Service) DisplayName() string {
if v, ok := serviceNames[s]; ok {
return v
}
return string(s)
}