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

feature(Ruleset): Export fields of DeleteRulesetRuleParams #2886

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

tlimoncelli
Copy link
Contributor

@tlimoncelli tlimoncelli commented Aug 13, 2024

Fixes #2885

Description

Export the fields of DeleteRulesetRuleParams to make it usable outside the module.

Has your change been tested?

yes (used in Dnscontrol)

Screenshots (if appropriate):

$ git diff main -- providers/cloudflare/rest.go 
diff --git a/providers/cloudflare/rest.go b/providers/cloudflare/rest.go
index 6280c239..59f4a02e 100644
--- a/providers/cloudflare/rest.go
+++ b/providers/cloudflare/rest.go
@@ -388,7 +388,12 @@ func (c *cloudflareProvider) deleteSingleRedirects(domainID string, cfr models.C
        // }
        //printer.Printf("DEBUG: CALLING API DeleteRulesetRule: SRRRulesetID=%v, cfr.SRRRulesetRuleID=%v\n", cfr.SRRRulesetID, cfr.SRRRulesetRuleID)
 
-       err := c.cfClient.DeleteRulesetRule(context.Background(), cloudflare.ZoneIdentifier(domainID), cfr.SRRRulesetID, cfr.SRRRulesetRuleID)
+       err := c.cfClient.DeleteRulesetRule(context.Background(),
+               cloudflare.ZoneIdentifier(domainID), cloudflare.DeleteRulesetRuleParams{
+                       RulesetID:     cfr.SRRRulesetID,
+                       RulesetRuleID: cfr.SRRRulesetRuleID,
+               })
+

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented in cloudflare/api-schemas
    and relies on stable APIs.

Copy link
Contributor

github-actions bot commented Aug 13, 2024

changelog detected ✅

@jacobbednarz jacobbednarz merged commit 2ddd86b into cloudflare:master Aug 13, 2024
3 checks passed
@github-actions github-actions bot added this to the v0.102.0 milestone Aug 13, 2024
Copy link
Contributor

This functionality has been released in v0.102.0.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to fill a DeleteRulesetRuleParams
2 participants