Skip to content
Permalink
Browse files

getting-started/bookshelf: initial rewrite (#951)

* Switch to GAE Standard (go112).
* Close() returns an error.
* Booskshelf methods take a context.
* Remove Datastore and replace it with Firestore.
* Remove auth/login.
* Remove databases other than Firestore and Memory.
* Remove GCE and GKE deployments.
* Add a go.mod and go.sum.
* Move webtest into this directory to avoid depending on golang-samples.
* Move all Go code into a root directory package main.
* Make handlers methods on Bookshelf, rather than standalone functions.
* Always initialize storage (see config.go) and give runtime error on
  image upload.
* Firestore doc IDs stored as part of the Book in Firestore, rather than
  assigned during editing and listing.
  • Loading branch information...
tbpg committed Sep 10, 2019
1 parent f4dcd69 commit 0e0de939565b6bbebf327599ad2db9060fc7d892
Showing with 658 additions and 2,241 deletions.
  1. +1 −15 getting-started/bookshelf/{pubsub_worker → }/app.yaml
  2. +0 −30 getting-started/bookshelf/app/app.yaml
  3. +0 −155 getting-started/bookshelf/app/app_test.go
  4. +0 −200 getting-started/bookshelf/app/auth.go
  5. +0 −28 getting-started/bookshelf/app/index.yaml
  6. +0 −68 getting-started/bookshelf/book.go
  7. +0 −40 getting-started/bookshelf/book_test.go
  8. +50 −172 getting-started/bookshelf/config.go
  9. +0 −147 getting-started/bookshelf/db_datastore.go
  10. +115 −0 getting-started/bookshelf/db_firestore.go
  11. +24 −48 getting-started/bookshelf/db_memory.go
  12. +0 −122 getting-started/bookshelf/db_mongo.go
  13. +0 −350 getting-started/bookshelf/db_mysql.go
  14. +21 −46 getting-started/bookshelf/db_test.go
  15. +0 −16 getting-started/bookshelf/doc.go
  16. +0 −49 getting-started/bookshelf/gce_deployment/deploy-binary.sh
  17. +0 −155 getting-started/bookshelf/gce_deployment/deploy.sh
  18. +0 −62 getting-started/bookshelf/gce_deployment/startup-script.sh
  19. +0 −42 getting-started/bookshelf/gce_deployment/teardown.sh
  20. +0 −21 getting-started/bookshelf/gke_deployment/Dockerfile
  21. +0 −49 getting-started/bookshelf/gke_deployment/bookshelf-frontend.yaml
  22. +0 −36 getting-started/bookshelf/gke_deployment/bookshelf-service.yaml
  23. +0 −45 getting-started/bookshelf/gke_deployment/bookshelf-worker.yaml
  24. +11 −0 getting-started/bookshelf/go.mod
  25. +125 −0 getting-started/bookshelf/go.sum
  26. 0 { → getting-started/bookshelf}/internal/webtest/webtest.go
  27. +95 −136 getting-started/bookshelf/{app/app.go → main.go}
  28. +212 −0 getting-started/bookshelf/main_test.go
  29. +0 −164 getting-started/bookshelf/pubsub_worker/worker.go
  30. +4 −19 getting-started/bookshelf/{app → }/template.go
  31. +0 −23 getting-started/bookshelf/{app → }/templates/base.html
  32. +0 −1 getting-started/bookshelf/{app → }/templates/detail.html
  33. +0 −2 getting-started/bookshelf/{app → }/templates/edit.html
  34. 0 getting-started/bookshelf/{app → }/templates/list.html
@@ -12,18 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

runtime: go
env: flex
service: worker

resources:
cpu: .5
memory_gb: 1.3
disk_size_gb: 10

automatic_scaling:
min_num_instances: 1
max_num_instances: 2
cool_down_period_sec: 60
cpu_utilization:
target_utilization: 0.75
runtime: go112

This file was deleted.

This file was deleted.

0 comments on commit 0e0de93

Please sign in to comment.
You can’t perform that action at this time.