-
Notifications
You must be signed in to change notification settings - Fork 303
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
Adds support for functions trigger API #583
Conversation
There was a problem hiding this 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
Outdated
} | ||
|
||
type FunctionsTriggerUpdateRequest struct { | ||
IsEnabled bool `json:"is_enabled"` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
… go defaulting to false.
…godo into functions-trigger-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM!
https://docs.digitalocean.com/reference/api/api-reference/#operation/functions_list_triggers