blob: b77cefdce0240511602d65ed1bacd5cfa0daf470 [file] [log] [blame]
Samuel A. Falvo II0262e972014-01-24 16:06:56 -08001package notificationPlans
2
3import (
4 "fmt"
5 "github.com/rackspace/gophercloud/rackspace/monitoring"
6 "github.com/racker/perigee"
7)
8
9var ErrNotImplemented = fmt.Errorf("notificationPlans feature not yet implemented")
10
11type Client struct {
12 options monitoring.Options
13}
14
15type DeleteResults map[string]interface{}
16
17func NewClient(mo monitoring.Options) *Client {
18 return &Client{
19 options: mo,
20 }
21}
22
23func (c *Client) Delete(id string) (DeleteResults, error) {
24 var dr DeleteResults
25
26 url := fmt.Sprintf("%s/notification_plans/%s", c.options.Endpoint, id)
27 err := perigee.Delete(url, perigee.Options{
28 Results: &dr,
29 OkCodes: []int{204},
30 })
31 return dr, err
32}