FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(deps): Update module github.com/DataDog/datadog-api-client-go/v2 to v2.6.1 by cq-bot · Pull Request #6185 · cloudquery/cloudquery · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .go  (6) .mod  (1) .sum  (1) .tpl  (1) No extension  (1) All 5 file types selected
Only manifest files
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 2 additions & 7 deletions plugins/source/datadog/Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
# Generate mocks for mock/unit testing
.PHONY: generate-mocks
generate-mocks:
go install github.com/golang/mock/mockgen@v1.7.0-rc.1
go generate ./client/services/...

# Test unit
.PHONY: test
test:
go test -timeout 3m ./...

# Install tools
.PHONY: install-tools
install-tools:
@echo Installing tools from tools/tool.go
@cat tools/tool.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % go install %

.PHONY: gen-docs
gen-docs:
rm -rf ./docs/tables/*
Expand All @@ -30,4 +25,4 @@ gen-code:

# All gen targets
.PHONY: gen
gen: gen-code gen-docs
gen: gen-code generate-mocks gen-docs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions plugins/source/datadog/client/mocks/synthetics_api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions plugins/source/datadog/codegen/services/generate.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func shouldInclude(name string) bool {
}

type serviceInfo struct {
Import string
Imports []string
Alias string
CreateFunctionName string
Name string
Expand All @@ -98,6 +98,7 @@ func getServiceInfo(client any) serviceInfo {
v := reflect.ValueOf(client)
t := v.Type()
pkgPath := t.Elem().PkgPath()
imports := []string{pkgPath}
csr := caser.New()
alias := pkgPath[strings.LastIndex(pkgPath, "/")+1:]
pkgName := csr.ToSnake(t.Elem().Name())
Expand All @@ -108,11 +109,17 @@ func getServiceInfo(client any) serviceInfo {
method := t.Method(i)
if shouldInclude(method.Name) {
sig := signature(method.Name, v.Method(i).Interface())
signatures = append(signatures, sig)
// The following handles generic types in the signature
cleanSign := strings.Replace(sig, pkgPath, alias, 1)
// Add the import for pagination result
if strings.Contains(cleanSign, "datadog.PaginationResult") {
imports = append(imports, "github.com/DataDog/datadog-api-client-go/v2/api/datadog")
}
signatures = append(signatures, cleanSign)
}
}
return serviceInfo{
Import: pkgPath,
Imports: imports,
Alias: alias,
CreateFunctionName: t.Elem().Name(),
Name: name,
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import (
"context"
"net/http"

"{{ $.Import }}"
{{ range .Imports }}
"{{ . }}"
{{ end }}
)

//go:generate mockgen -package=mocks -destination=../mocks/{{$.PackageName}}.go -source={{$.PackageName}}.go {{$.ClientName}}
Expand Down
2 changes: 1 addition & 1 deletion plugins/source/datadog/go.mod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/datadog
go 1.19

require (
github.com/DataDog/datadog-api-client-go/v2 v2.5.0
github.com/DataDog/datadog-api-client-go/v2 v2.6.1
github.com/cloudquery/plugin-sdk v1.16.0
github.com/golang/mock v1.6.0
github.com/pkg/errors v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions plugins/source/datadog/go.sum
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/datadog-api-client-go/v2 v2.5.0 h1:+FRtNnR+IZ4D5lGqEk+f0+dSP7XhKtrlHvdcnTdyny8=
github.com/DataDog/datadog-api-client-go/v2 v2.5.0/go.mod h1:98b/MtTwSAr/yhTfhCR1oxAqQ/4tMkdrgKH7fYiDA0g=
github.com/DataDog/datadog-api-client-go/v2 v2.6.1 h1:THstTY4UQUFbojIoOOKjWdomc6Q0Gl1bAoCY0UOo2XY=
github.com/DataDog/datadog-api-client-go/v2 v2.6.1/go.mod h1:sHt3EuVMN8PSYJu065qwp3pZxCwR3RZP4sJnYwj/ZQY=
github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/avast/retry-go/v4 v4.3.1 h1:Mtg11F9PdAIMkMiio2RKcYauoVHjl2aB3zQJJlzD4cE=
Expand Down
8 changes: 0 additions & 8 deletions plugins/source/datadog/tools/tool.go

This file was deleted.


Back | FazBrowse Home | New Git URL