mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-12 16:36:18 -06:00
Update go-datadog-api vendored dependency
This commit is contained in:
parent
4548e2430e
commit
982a065863
2
vendor/github.com/zorkian/go-datadog-api/.gitignore
generated
vendored
2
vendor/github.com/zorkian/go-datadog-api/.gitignore
generated
vendored
@ -1,2 +0,0 @@
|
||||
*.sublime*
|
||||
cmd
|
21
vendor/github.com/zorkian/go-datadog-api/.travis.yml
generated
vendored
21
vendor/github.com/zorkian/go-datadog-api/.travis.yml
generated
vendored
@ -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
|
3
vendor/github.com/zorkian/go-datadog-api/README.md
generated
vendored
3
vendor/github.com/zorkian/go-datadog-api/README.md
generated
vendored
@ -12,6 +12,7 @@ mostly used for automating dashboards/alerting and retrieving data (events, etc)
|
||||
|
||||
The source API documentation is here: <http://docs.datadoghq.com/api/>
|
||||
|
||||
|
||||
## 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)
|
||||
|
22
vendor/github.com/zorkian/go-datadog-api/checks_test.go
generated
vendored
22
vendor/github.com/zorkian/go-datadog-api/checks_test.go
generated
vendored
@ -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")
|
||||
}
|
||||
}
|
21
vendor/github.com/zorkian/go-datadog-api/dashboards.go
generated
vendored
21
vendor/github.com/zorkian/go-datadog-api/dashboards.go
generated
vendored
@ -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"`
|
||||
}
|
||||
|
||||
|
19
vendor/github.com/zorkian/go-datadog-api/users.go
generated
vendored
19
vendor/github.com/zorkian/go-datadog-api/users.go
generated
vendored
@ -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"`
|
||||
|
4
vendor/vendor.json
vendored
4
vendor/vendor.json
vendored
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user