diff --git a/vendor/github.com/zorkian/go-datadog-api/.gitignore b/vendor/github.com/zorkian/go-datadog-api/.gitignore deleted file mode 100644 index d2631dc6b..000000000 --- a/vendor/github.com/zorkian/go-datadog-api/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.sublime* -cmd diff --git a/vendor/github.com/zorkian/go-datadog-api/.travis.yml b/vendor/github.com/zorkian/go-datadog-api/.travis.yml deleted file mode 100644 index 09e2201d4..000000000 --- a/vendor/github.com/zorkian/go-datadog-api/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: go - -go: - - 1.5 - - 1.6 - - tip - -env: - - "PATH=/home/travis/gopath/bin:$PATH" -script: - - go get -u github.com/golang/lint/golint - - golint ./... - - test `gofmt -l . | wc -l` = 0 - - make test - -install: - - go get -v -t . && make updatedeps - -matrix: - allow_failures: - - go: tip diff --git a/vendor/github.com/zorkian/go-datadog-api/README.md b/vendor/github.com/zorkian/go-datadog-api/README.md index 89cd20d10..d3d95d29e 100644 --- a/vendor/github.com/zorkian/go-datadog-api/README.md +++ b/vendor/github.com/zorkian/go-datadog-api/README.md @@ -12,6 +12,7 @@ mostly used for automating dashboards/alerting and retrieving data (events, etc) The source API documentation is here: + ## USAGE To use this project, include it in your code like: @@ -24,7 +25,7 @@ Then, you can work with it: ``` go client := datadog.NewClient("api key", "application key") - + dash, err := client.GetDashboard(10880) if err != nil { log.Fatalf("fatal: %s\n", err) diff --git a/vendor/github.com/zorkian/go-datadog-api/checks_test.go b/vendor/github.com/zorkian/go-datadog-api/checks_test.go deleted file mode 100644 index 135ee5def..000000000 --- a/vendor/github.com/zorkian/go-datadog-api/checks_test.go +++ /dev/null @@ -1,22 +0,0 @@ -package datadog_test - -import ( - "testing" - - "github.com/zorkian/go-datadog-api" -) - -func TestCheckStatus(T *testing.T) { - if datadog.OK != 0 { - T.Error("status OK must be 0 to satisfy Datadog's API") - } - if datadog.WARNING != 1 { - T.Error("status WARNING must be 1 to satisfy Datadog's API") - } - if datadog.CRITICAL != 2 { - T.Error("status CRITICAL must be 2 to satisfy Datadog's API") - } - if datadog.UNKNOWN != 3 { - T.Error("status UNKNOWN must be 3 to satisfy Datadog's API") - } -} diff --git a/vendor/github.com/zorkian/go-datadog-api/dashboards.go b/vendor/github.com/zorkian/go-datadog-api/dashboards.go index 25985ba20..5da7332cf 100644 --- a/vendor/github.com/zorkian/go-datadog-api/dashboards.go +++ b/vendor/github.com/zorkian/go-datadog-api/dashboards.go @@ -12,18 +12,25 @@ import ( "fmt" ) +// GraphDefinitionRequest represents the requests passed into each graph. +type GraphDefinitionRequest struct { + Query string `json:"q"` + Stacked bool `json:"stacked"` + Aggregator string + ConditionalFormats []DashboardConditionalFormat `json:"conditional_formats,omitempty"` + Type string `json:"type,omitempty"` + Style struct { + Palette string `json:"palette,omitempty"` + } `json:"style,omitempty"` +} + // Graph represents a graph that might exist on a dashboard. type Graph struct { Title string `json:"title"` Events []struct{} `json:"events"` Definition struct { - Viz string `json:"viz"` - Requests []struct { - Query string `json:"q"` - Stacked bool `json:"stacked"` - Aggregator string - ConditionalFormats []DashboardConditionalFormat `json:"conditional_formats,omitempty"` - } `json:"requests"` + Viz string `json:"viz"` + Requests []GraphDefinitionRequest `json:"requests"` } `json:"definition"` } diff --git a/vendor/github.com/zorkian/go-datadog-api/users.go b/vendor/github.com/zorkian/go-datadog-api/users.go index 76b4da573..ba7f69571 100644 --- a/vendor/github.com/zorkian/go-datadog-api/users.go +++ b/vendor/github.com/zorkian/go-datadog-api/users.go @@ -29,6 +29,25 @@ func (self *Client) InviteUsers(emails []string) error { reqInviteUsers{Emails: emails}, nil) } +// CreateUser creates an user account for an email address +func (self *Client) CreateUser(handle, name string) (*User, error) { + in := struct { + Handle string `json:"handle"` + Name string `json:"name"` + }{ + Handle: handle, + Name: name, + } + + out := struct { + *User `json:"user"` + }{} + if err := self.doJsonRequest("POST", "/v1/user", in, &out); err != nil { + return nil, err + } + return out.User, nil +} + // internal type to retrieve users from the api type usersData struct { Users []User `json:"users"` diff --git a/vendor/vendor.json b/vendor/vendor.json index 4767aaaa9..0c8389337 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1951,8 +1951,10 @@ "revision": "75ce5fbba34b1912a3641adbd58cf317d7315821" }, { + "checksumSHA1": "jBiNbkwHKwnuGfkaccnLc/1rzto=", "path": "github.com/zorkian/go-datadog-api", - "revision": "af9919d4fd020eba6daada1cbba9310f5d7b44a8" + "revision": "f9f89391f35f5c8eafed4b75b5797b9b23851908", + "revisionTime": "2016-10-04T18:54:04Z" }, { "path": "golang.org/x/crypto/curve25519",