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

Adds support for functions trigger API #583

Merged
merged 5 commits into from
Nov 29, 2022

Conversation

ddebarros
Copy link
Contributor

@ddebarros ddebarros commented Nov 21, 2022

  • Adds support Functions trigger APIs (ListTriggers, GetTrigger, CreateTrigger, UpdateTrigger, DeleteTrigger)

https://docs.digitalocean.com/reference/api/api-reference/#operation/functions_list_triggers

functions.go Outdated Show resolved Hide resolved
piyush0101
piyush0101 previously approved these changes Nov 21, 2022
Copy link

@piyush0101 piyush0101 left a comment

Choose a reason for hiding this comment

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

looks good overall!

functions.go Show resolved Hide resolved
functions.go Show resolved Hide resolved
functions.go Outdated
}

type FunctionsTriggerUpdateRequest struct {
IsEnabled bool `json:"is_enabled"`
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a pointer? Do we support updating scheduled_details without sending is_enabled? Does the API differentiate between not sending is_enabled and sending is_enabled: false? Without making this a pointer, Go will default to setting this false if excluded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Andrew, yes the API does allow changing scheduled_details without changing is_enabled , I changed the FunctionsTriggerUpdateRequest.IsEnabled to be a *bool.

Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

👍 LGTM!

@andrewsomething andrewsomething merged commit c7d7923 into digitalocean:main Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants