Skip to content

Commit 5a40c42

Browse files
committed
CR comments
1 parent 7d741e9 commit 5a40c42

File tree

4 files changed

+21
-33
lines changed

4 files changed

+21
-33
lines changed

libs/go-kibana-rest/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ services:
2424
condition: service_started
2525
kibana:
2626
image: docker.elastic.co/kibana/kibana:8.14.3
27-
volumes:
28-
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
2927
environment:
3028
ELASTICSEARCH_HOSTS: http://es:9200
3129
ELASTICSEARCH_USERNAME: kibana_system
3230
ELASTICSEARCH_PASSWORD: changeme
3331
xpack.security.http.ssl.enabled: false
3432
xpack.license.self_generated.type: trial
33+
XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: min-32-byte-long-strong-encryption-key
3534
links:
3635
- elasticsearch:es
3736
ports:

libs/go-kibana-rest/kbapi/api.kibana_synthetics.go

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ type KibanaSyntheticsPrivateLocationAPI struct {
7373
Get KibanaSyntheticsPrivateLocationGet
7474
}
7575

76+
type SyntheticsStatusConfig struct {
77+
Enabled *bool `json:"enabled,omitempty"`
78+
}
79+
7680
type MonitorAlertConfig struct {
77-
Status struct {
78-
Enabled *bool `json:"enabled,omitempty"`
79-
} `json:"status,omitempty"`
80-
Tls struct {
81-
Enabled *bool `json:"enabled,omitempty"`
82-
} `json:"tls,omitempty"`
81+
Status SyntheticsStatusConfig `json:"status,omitempty"`
82+
Tls SyntheticsStatusConfig `json:"tls,omitempty"`
8383
}
8484

8585
type HTTPMonitorFields struct {
@@ -119,14 +119,16 @@ type MonitorScheduleConfig struct {
119119
Unit string `json:"unit"`
120120
}
121121

122+
type SyntheticGeoConfig struct {
123+
Lat float64 `json:"lat"`
124+
Lon float64 `json:"lon"`
125+
}
126+
122127
type MonitorLocationConfig struct {
123-
Id string `json:"id"`
124-
Label string `json:"label"`
125-
Geo struct {
126-
Lat float64 `json:"lat"`
127-
Lon float64 `json:"lon"`
128-
} `json:"geo"`
129-
IsServiceManaged bool `json:"isServiceManaged"`
128+
Id string `json:"id"`
129+
Label string `json:"label"`
130+
Geo *SyntheticGeoConfig `json:"geo,omitempty"`
131+
IsServiceManaged bool `json:"isServiceManaged"`
130132
}
131133

132134
type SyntheticsMonitor struct {
@@ -161,16 +163,11 @@ type SyntheticsMonitor struct {
161163
} `json:"__ui,omitempty"`
162164
}
163165

164-
type Geo struct {
165-
Lat float32 `json:"lat"`
166-
Lon float32 `json:"lon"`
167-
}
168-
169166
type PrivateLocationConfig struct {
170-
Label string `json:"label"`
171-
AgentPolicyId string `json:"agentPolicyId"`
172-
Tags []string `json:"tags,omitempty"`
173-
Geo Geo `json:"geo,omitempty"`
167+
Label string `json:"label"`
168+
AgentPolicyId string `json:"agentPolicyId"`
169+
Tags []string `json:"tags,omitempty"`
170+
Geo *SyntheticGeoConfig `json:"geo,omitempty"`
174171
}
175172

176173
type PrivateLocation struct {

libs/go-kibana-rest/kbapi/api.kibana_synthetics_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (s *KBAPITestSuite) TestKibanaSyntheticsPrivateLocationAPI() {
123123
Label: fmt.Sprintf("TestKibanaSyntheticsPrivateLocationAPI %s", testUuid),
124124
AgentPolicyId: policyId,
125125
Tags: []string{"a", "b"},
126-
Geo: Geo{
126+
Geo: &SyntheticGeoConfig{
127127
Lat: 12.12,
128128
Lon: -42.42,
129129
},

libs/go-kibana-rest/kibana.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)