-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathservice_now_integration.go
54 lines (42 loc) · 1.48 KB
/
service_now_integration.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
52
53
54
/*
* Integrations API for ServiceNow
*
* https://dev.splunk.com/observability/reference/api/integrations/latest
* https://docs.splunk.com/Observability/admin/notif-services/servicenow.html
*/
package signalfx
import (
"context"
"github.com/signalfx/signalfx-go/integration"
)
// CreateServiceNowIntegration creates SNOW integration.
func (c *Client) CreateServiceNowIntegration(ctx context.Context, in *integration.ServiceNowIntegration) (*integration.ServiceNowIntegration, error) {
out := integration.ServiceNowIntegration{}
err := c.createIntegration(ctx, in, &out)
if err != nil {
return nil, err
}
return &out, nil
}
// GetServiceNowIntegration retrieves SNOW integration.
func (c *Client) GetServiceNowIntegration(ctx context.Context, id string) (*integration.ServiceNowIntegration, error) {
out := integration.ServiceNowIntegration{}
err := c.getIntegration(ctx, id, &out)
if err != nil {
return nil, err
}
return &out, nil
}
// UpdateServiceNowIntegration updates SNOW integration.
func (c *Client) UpdateServiceNowIntegration(ctx context.Context, id string, in *integration.ServiceNowIntegration) (*integration.ServiceNowIntegration, error) {
out := integration.ServiceNowIntegration{}
err := c.updateIntegration(ctx, id, in, &out)
if err != nil {
return nil, err
}
return &out, nil
}
// DeleteServiceNowIntegration deletes SNOW integration.
func (c *Client) DeleteServiceNowIntegration(ctx context.Context, id string) error {
return c.DeleteIntegration(ctx, id)
}