Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a new Refs API, which can be (arguably counter-intuitively) used to delete documents.
Notable changes:
CreateRef
lets you create a Ref blob for a given account + path. Currently only tombstone targets are implemented.GetRef
lets you get an existing Ref. Not sure why would you want it, but it's there.GetDocument
has a newignore_deleted
flag, which can be used to get the latest version of the document even if it's deleted.ListDocuments
has a newdeleted_only
flag which lets only list deleted documents in a given account.So, if you'd want to delete a document, you'd create a tombstone Ref. This will make the document disappear from the list request (unless
deleted_only
is specified). A get request would return an error withFailedPrecondition
GRPC error code, unlessignore_deleted
flag is specified.I still need to test if it will let you publish something again on the same path after deletion or not.