mirror of
https://github.com/restic/restic.git
synced 2026-10-22 00:48:12 +00:00
Update dependencies
Among others, this updates minio-go, so that the new "eu-west-3" zone for AWS is supported.
This commit is contained in:
1 parent
b63de7c798
commit
2b39f9f4b2
3435 files changed
+1317989
-315639
No files matched your search
+10
-4
@@ -2,9 +2,15 @@
|
||||
|
||||
SHELL=/bin/bash
|
||||
|
||||
../doc.go: doc-snippets.go doc.template snipdoc.awk
|
||||
../doc.go: build doc-snippets.go doc.template snipdoc.awk
|
||||
@tmp=$$(mktemp) && \
|
||||
awk -f snipdoc.awk doc-snippets.go doc.template > $$tmp && \
|
||||
chmod +w ../doc.go && \
|
||||
mv $$tmp ../doc.go && \
|
||||
chmod -w ../doc.go
|
||||
chmod +w $@ && \
|
||||
mv $$tmp $@ && \
|
||||
chmod -w $@
|
||||
@echo "wrote $@"
|
||||
|
||||
.PHONY: build
|
||||
|
||||
build:
|
||||
go build doc-snippets.go
|
||||
+8
-11
@@ -89,6 +89,10 @@ func f1() {
|
||||
})
|
||||
//]
|
||||
|
||||
//[ docref.Update
|
||||
_, err = ca.Update(ctx, []firestore.Update{{Path: "capital", Value: "Sacramento"}})
|
||||
//]
|
||||
|
||||
//[ docref.Delete
|
||||
_, err = ny.Delete(ctx)
|
||||
//]
|
||||
@@ -98,21 +102,15 @@ func f1() {
|
||||
if err != nil {
|
||||
// TODO: Handle error.
|
||||
}
|
||||
_, err = ca.UpdateStruct(ctx, []string{"capital"}, State{Capital: "Sacramento"},
|
||||
_, err = ca.Update(ctx,
|
||||
[]firestore.Update{{Path: "capital", Value: "Sacramento"}},
|
||||
firestore.LastUpdateTime(docsnap.UpdateTime))
|
||||
//]
|
||||
|
||||
//[ docref.UpdateMap
|
||||
_, err = ca.UpdateMap(ctx, map[string]interface{}{"pop": 39.2})
|
||||
//]
|
||||
//[ docref.UpdateStruct
|
||||
_, err = ca.UpdateStruct(ctx, []string{"pop"}, State{Population: 39.2})
|
||||
//]
|
||||
|
||||
//[ WriteBatch
|
||||
writeResults, err := client.Batch().
|
||||
Create(ny, State{Capital: "Albany"}).
|
||||
UpdateStruct(ca, []string{"capital"}, State{Capital: "Sacramento"}).
|
||||
Update(ca, []firestore.Update{{Path: "capital", Value: "Sacramento"}}).
|
||||
Delete(client.Doc("States/WestDakota")).
|
||||
Commit(ctx)
|
||||
//]
|
||||
@@ -154,8 +152,7 @@ func txn() {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return tx.UpdateStruct(ny, []string{"pop"},
|
||||
State{Population: pop.(float64) + 0.2})
|
||||
return tx.Update(ny, []firestore.Update{{Path: "pop", Value: pop.(float64) + 0.2}})
|
||||
})
|
||||
if err != nil {
|
||||
// TODO: Handle error.
|
||||
|
||||
+4
-10
@@ -16,7 +16,7 @@
|
||||
|
||||
/*
|
||||
Package firestore provides a client for reading and writing to a Cloud Firestore
|
||||
database.
|
||||
database.
|
||||
|
||||
See https://cloud.google.com/firestore/docs for an introduction
|
||||
to Cloud Firestore and additional help on using the Firestore API.
|
||||
@@ -80,16 +80,10 @@ document or creates a new one.
|
||||
|
||||
[docref.Set]
|
||||
|
||||
To update some fields of an existing document, use UpdateMap, UpdateStruct or
|
||||
UpdatePaths. For UpdateMap, the keys of the map specify which fields to change. The
|
||||
others are untouched.
|
||||
To update some fields of an existing document, use Update. It takes a list of
|
||||
paths to update and their corresponding values.
|
||||
|
||||
[docref.UpdateMap]
|
||||
|
||||
For UpdateStruct, you must explicitly provide the fields to update. The field names
|
||||
must match exactly.
|
||||
|
||||
[docref.UpdateStruct]
|
||||
[docref.Update]
|
||||
|
||||
Use DocumentRef.Delete to delete a document.
|
||||
|
||||
|
||||
Reference in new issue
Block a user