gddo-server: replace globals with struct

This is intended to simplify the number of stages of initialization in
gddo-server.  Before this CL, globals and the config may or may not be
correctly initialized at various points of executing methods during
main().  While this largely does not come up because the handlers are
not used until appengine.Main, it can be problematic for background
tasks.  After this CL, handlers (being methods on the server struct) can
depend on server being completely initialized, and the server can depend
on the config being completely initialized.

Change-Id: I1a83a2337a2cdb4d98ec00b26d5e0498ed7e4edd
Reviewed-by: Tuo Shan <>
6 files changed