diff options
| author | 2026-03-25 14:31:16 +0000 | |
|---|---|---|
| committer | 2026-03-25 14:31:16 +0000 | |
| commit | 48ff647cf4a8bb8f23fcd6b8616f56a8ef72b980 (patch) | |
| tree | ae199c38042adaa544d5f7d31351661d5831381e /ref/store/files/batch_queue_ops.go | |
| parent | *: objectstore -> object/store (diff) | |
| signature | No signature | |
*: refstore -> ref/store
Diffstat (limited to 'ref/store/files/batch_queue_ops.go')
| -rw-r--r-- | ref/store/files/batch_queue_ops.go | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ref/store/files/batch_queue_ops.go b/ref/store/files/batch_queue_ops.go new file mode 100644 index 00000000..7434b0c3 --- /dev/null +++ b/ref/store/files/batch_queue_ops.go @@ -0,0 +1,35 @@ +package files + +import objectid "codeberg.org/lindenii/furgit/object/id" + +func (batch *Batch) Create(name string, newID objectid.ObjectID) { + batch.queue(queuedUpdate{name: name, kind: updateCreate, newID: newID}) +} + +func (batch *Batch) Update(name string, newID, oldID objectid.ObjectID) { + batch.queue(queuedUpdate{name: name, kind: updateReplace, newID: newID, oldID: oldID}) +} + +func (batch *Batch) Delete(name string, oldID objectid.ObjectID) { + batch.queue(queuedUpdate{name: name, kind: updateDelete, oldID: oldID}) +} + +func (batch *Batch) Verify(name string, oldID objectid.ObjectID) { + batch.queue(queuedUpdate{name: name, kind: updateVerify, oldID: oldID}) +} + +func (batch *Batch) CreateSymbolic(name, newTarget string) { + batch.queue(queuedUpdate{name: name, kind: updateCreateSymbolic, newTarget: newTarget}) +} + +func (batch *Batch) UpdateSymbolic(name, newTarget, oldTarget string) { + batch.queue(queuedUpdate{name: name, kind: updateReplaceSymbolic, newTarget: newTarget, oldTarget: oldTarget}) +} + +func (batch *Batch) DeleteSymbolic(name, oldTarget string) { + batch.queue(queuedUpdate{name: name, kind: updateDeleteSymbolic, oldTarget: oldTarget}) +} + +func (batch *Batch) VerifySymbolic(name, oldTarget string) { + batch.queue(queuedUpdate{name: name, kind: updateVerifySymbolic, oldTarget: oldTarget}) +} |
