Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Google Cloud Platform integration #184

Merged
merged 4 commits into from
Oct 17, 2018

Conversation

dragon3
Copy link
Contributor

@dragon3 dragon3 commented Oct 16, 2018

This pull request adds Google Cloud Platform Integration. ( #183 )
In addition, fix a compile error in integration/screen_widgets_test.go.

@dragon3 dragon3 changed the title Add gcp integration Add Google Cloud Platform integration Oct 16, 2018
integration/screen_widgets_test.go Show resolved Hide resolved
integrations.go Outdated
return list, nil
}

// CreateIntegrationGCP creates new Google Cloud Platform Integrations.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about making that singular instead of plural? ie: "creates a new Google Cloud Platform Integration"

Copy link
Contributor Author

@dragon3 dragon3 Oct 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it!
Comments for UpdateIntegrationGCP and DeleteIntegrationGCP had same issue, fixed them as well.

integrations.go Show resolved Hide resolved
integrations.go Outdated
TokenURI *string `json:"token_uri"` // Should be https://accounts.google.com/o/oauth2/token
AuthProviderX509CertURL *string `json:"auth_provider_x509_cert_url"` // Should be https://www.googleapis.com/oauth2/v1/certs
ClientX509CertURL *string `json:"client_x509_cert_url"` // https://www.googleapis.com/robot/v1/metadata/x509/<CLIENT_EMAIL>
HostFilters *string `json:"host_filters"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HostFilters is optional, json:"host_filters,omitempty" seems appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added omitempty!

integrations.go Outdated
type IntegrationGCPUpdateRequest struct {
ProjectID *string `json:"project_id"`
ClientEmail *string `json:"client_email"`
HostFilters *string `json:"host_filters"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

json:"host_filters,omitempty"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added omitempty as well.

Copy link
Collaborator

@ojongerius ojongerius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ojongerius ojongerius merged commit b4afa10 into zorkian:master Oct 17, 2018
@ojongerius
Copy link
Collaborator

Thanks @dragon3! Would you like me to cut a release for this?

@dragon3
Copy link
Contributor Author

dragon3 commented Oct 18, 2018

@ojongerius Thank you for merging!
Yes, it would be great 👍

@ojongerius
Copy link
Collaborator

No worries at all, cut https:/zorkian/go-datadog-api/releases/tag/v2.17.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants