Skip to content

Commit fcbea79

Browse files
committed
Notification center re-exports
1 parent f38de46 commit fcbea79

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

go/cxsdk.go

+11-4
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ type ClientSet struct {
105105
saml *SamlClient
106106
dataUsage *DataUsageClient
107107
roles *RolesClient
108+
notifications *NotificationsClient
108109
}
109110

110111
// RuleGroups gets a RuleGroupsClient from the ClientSet.
@@ -221,6 +222,11 @@ func (c *ClientSet) Roles() *RolesClient {
221222
return c.roles
222223
}
223224

225+
// Notifications gets a NotificationsClient from the ClientSet.
226+
func (c *ClientSet) Notifications() *NotificationsClient {
227+
return c.notifications
228+
}
229+
224230
// NewClientSet Creates a new ClientSet.
225231
func NewClientSet(targetURL, teamsLevelAPIKey string, userLevelAPIKey string) *ClientSet {
226232
authContext := NewAuthContext(teamsLevelAPIKey, userLevelAPIKey)
@@ -246,10 +252,11 @@ func NewClientSet(targetURL, teamsLevelAPIKey string, userLevelAPIKey string) *C
246252
scopes: NewScopesClient(apikeyCPC),
247253
roles: NewRolesClient(apikeyCPC),
248254
// dahboardsFolders: NewDashboardsFoldersClient(apikeyCPC),
249-
apiKeys: NewAPIKeysClient(apikeyCPC),
250-
groups: NewGroupsClient(apikeyCPC),
251-
saml: NewSamlClient(apikeyCPC),
252-
users: NewUsersClient(apikeyCPC),
255+
apiKeys: NewAPIKeysClient(apikeyCPC),
256+
groups: NewGroupsClient(apikeyCPC),
257+
saml: NewSamlClient(apikeyCPC),
258+
users: NewUsersClient(apikeyCPC),
259+
notifications: NewNotificationsClient(apikeyCPC),
253260
}
254261
}
255262

go/examples/notifications_test.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
)
2424

2525
func TestConnectors(t *testing.T) {
26-
t.Skip("Connectors are not supported in the current version of the SDK")
26+
//t.Skip("Connectors are not supported in the current version of the SDK")
2727
region, err := cxsdk.CoralogixRegionFromEnv()
2828
assertNilAndPrintError(t, err)
2929
authContext, err := cxsdk.AuthContextFromEnv()
@@ -73,7 +73,7 @@ func TestConnectors(t *testing.T) {
7373
}
7474

7575
func TestPresets(t *testing.T) {
76-
t.Skip("Presets are not supported in the current version of the SDK")
76+
//t.Skip("Presets are not supported in the current version of the SDK")
7777
region, err := cxsdk.CoralogixRegionFromEnv()
7878
assertNilAndPrintError(t, err)
7979
authContext, err := cxsdk.AuthContextFromEnv()
@@ -82,15 +82,15 @@ func TestPresets(t *testing.T) {
8282

8383
c := cxsdk.NewNotificationsClient(creator)
8484
presetType := cxsdk.PresetTypeCustom
85-
parentId := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
85+
parentUserFacingId := "preset_system_generic_https_alerts_empty"
8686
createRes, err := c.CreateCustomPreset(context.Background(), &cxsdk.CreateCustomPresetRequest{
8787
Preset: &cxsdk.Preset{
8888
Name: "TestPreset",
8989
Description: "This is the preset to use for Notification Center testing.",
9090
PresetType: &presetType,
9191
EntityType: "alerts",
9292
Parent: &cxsdk.Preset{
93-
Id: &parentId,
93+
UserFacingId: &parentUserFacingId,
9494
},
9595
ConnectorType: cxsdk.ConnectorTypeGenericHTTPS,
9696
ConfigOverrides: []*cxsdk.ConfigOverrides{
@@ -131,6 +131,7 @@ func TestPresets(t *testing.T) {
131131
},
132132
},
133133
})
134+
134135
if err != nil {
135136
t.Fatal(err)
136137
}

go/notifications-client.go

+9
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ type Connector = connectores.Connector
7272
// ConnectorConfig represents a connector configuration.
7373
type ConnectorConfig = connectores.ConnectorConfig
7474

75+
// EntityTypeConfigOverrides represents a connector configuration overrides.
76+
type EntityTypeConfigOverrides = connectores.EntityTypeConfigOverrides
77+
7578
// ConnectorConfigField represents a connector configuration field.
7679
type ConnectorConfigField = commonv1.ConnectorConfigField
7780

@@ -161,6 +164,12 @@ type ConditionTypeMatchEntityType = common.ConditionType_MatchEntityType
161164
// MatchEntityTypeCondition is a match entity type condition.
162165
type MatchEntityTypeCondition = common.MatchEntityTypeCondition
163166

167+
// ConditionTypeMatchEntityTypeAndSubType is a match entity type and sub-type condition type.
168+
type ConditionTypeMatchEntityTypeAndSubType = common.ConditionType_MatchEntityTypeAndSubType
169+
170+
// MatchEntityTypeAndSubTypeCondition is a match entity type and sub-type condition.
171+
type MatchEntityTypeAndSubTypeCondition = common.MatchEntityTypeAndSubTypeCondition
172+
164173
// PresetType is a preset type.
165174
type PresetType = presets.PresetType
166175

0 commit comments

Comments
 (0)