-
Notifications
You must be signed in to change notification settings - Fork 610
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 support for Get/Post/Delete operations in API Shield Endpoint Management #1397
Conversation
changelog detected ✅ |
Codecov Report
@@ Coverage Diff @@
## master #1397 +/- ##
==========================================
+ Coverage 48.33% 48.45% +0.12%
==========================================
Files 133 141 +8
Lines 13023 13878 +855
==========================================
+ Hits 6295 6725 +430
- Misses 5201 5486 +285
- Partials 1527 1667 +140
|
102f406
to
f61df55
Compare
…Endpoint Management
f61df55
to
0e8b154
Compare
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
api_shield_operations.go
Outdated
) | ||
|
||
// APIShieldCreateOperation should be used when creating an operation in API Shield Endpoint Management. | ||
type APIShieldCreateOperation struct { |
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.
check out the conventions for naming CRUD operation params - https://github.com/cloudflare/cloudflare-go/blob/master/docs/conventions.md#methods.
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.
fixed in 2c4380c
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.
note this struct is used as part of CreateAPIShieldOperationsParams
- it's basically what the user is expected to set when creating an operation, the CreateAPIShieldOperationsParams
accepts a slice of these.
I've update the name of this to APIShieldBasicOperation
to (hopefully?) make this clearer
solid first pass -- only some conventions/consistency based updates here to get it inline with the existing library. thanks! |
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.
The logic itself looks good to me, cannot comment on the integration of this to cloudflare-go
@jacobbednarz have resolved the comments, fixes are in this commit 2c4380c |
…o follow library conventions - Using `github.com/goccy/go-json` over `encoding/json` - Renamed `*GetOperations` to `*ListOperations` - Changed methods to accept 3 parameters only, and used method specific `*Params` structs - Renamed `*Param` structs to be paired with the methods they are associated with (e.g. `GetAPIShieldOperationParam`) - Use `buildURI` method + added struct tags so query parameters are encoded using go-queryparams (removed custom `Encode` methods)
583a0d2
to
2c4380c
Compare
thanks @djhworld 👏 you rock. |
This functionality has been released in v0.78.0. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
This change adds support for the following API Shield related endpoints related to endpoint management:
Description
This change adds support for API Shield related endpoints related to managing operations in API Shield Endpoint Management. This is so they can be used from the library and will enable this feature to be added to terraform in the future.
Has your change been tested?
Types of changes
What sort of change does your code introduce/modify?
Checklist:
and relies on stable APIs.
Supersedes #1054