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

Implement batch operations for dictionary items #125

Merged
merged 10 commits into from
Jul 22, 2019

Conversation

trentrosenbaum
Copy link
Contributor

@trentrosenbaum trentrosenbaum commented Jul 16, 2019

The primary focus of this PR is to introduce batch operations, (Create, Update, Upsert and delete) covering dictionary items.
The dictionary item function BatchModifyDictionaryItems executes a list of BatchDictionaryItem against the FASTLY API endpoint PATCH/service/service_id/dictionary/dictionary_id/items

The Batch Operations have been placed in a common location, (fastly.go) because they are also used with the Batch endpoint for ACLS, (coming in a separate PR after this has been merged).

The tests around the dictionary, dictionary items and dictionary items batch have been refactored to aid reading. The tests covering dictionary items and the batches set up their own services for the test and the tear them down. The fixtures have been updated to reflect the current request/response accepted by the Fastly API above.

fastly/fastly.go Outdated Show resolved Hide resolved
Copy link
Member

@philippschulte philippschulte left a comment

Choose a reason for hiding this comment

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

👍 LGTM

fastly/dictionary_item.go Show resolved Hide resolved
Copy link
Member

@phamann phamann left a comment

Choose a reason for hiding this comment

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

LGTM other than minor comment

fastly/fastly.go Outdated Show resolved Hide resolved
@trentrosenbaum trentrosenbaum merged commit 38e14ce into master Jul 22, 2019
@philippschulte philippschulte deleted the implement-batch-operations-for-dictionary-items branch July 23, 2019 06:42
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.

4 participants