/
attribute_descriptions.go
51 lines (47 loc) · 1.24 KB
/
attribute_descriptions.go
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
41
42
43
44
45
46
47
48
49
50
51
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2023 Steadybit GmbH
package utils
import (
"github.com/steadybit/discovery-kit/go/discovery_kit_api"
"github.com/steadybit/extension-kit/exthttp"
)
func RegisterCommonDiscoveryHandlers() {
exthttp.RegisterHttpHandler("/common/discovery/attribute-descriptions", exthttp.GetterAsHandler(getCommonAttributeDescriptions))
}
func getCommonAttributeDescriptions() discovery_kit_api.AttributeDescriptions {
return discovery_kit_api.AttributeDescriptions{
Attributes: []discovery_kit_api.AttributeDescription{
{
Attribute: "aws.account",
Label: discovery_kit_api.PluralLabel{
One: "AWS account",
Other: "AWS accounts",
},
}, {
Attribute: "aws.region",
Label: discovery_kit_api.PluralLabel{
One: "AWS region",
Other: "AWS regions",
},
}, {
Attribute: "aws.zone",
Label: discovery_kit_api.PluralLabel{
One: "AWS zone",
Other: "AWS zones",
},
}, {
Attribute: "aws.zone.id",
Label: discovery_kit_api.PluralLabel{
One: "AWS zone ID",
Other: "AWS zone IDs",
},
}, {
Attribute: "aws.arn",
Label: discovery_kit_api.PluralLabel{
One: "AWS ARN",
Other: "AWS ARNs",
},
},
},
}
}