Preface
- Who is the eBook for?
- Acknowledgements
- How to Use This eBook
- Using Code Examples
- Getting the Code
- How to Contact Me
- Thanks
1.Go Code Organization
- 1.1Workspaces
- 1.2The GOPATH environment variable
- 1.3Package paths
- Tip
2.A basic Go web app
- Exercise
3.Static Sites with Go
4.Using a Web Service - JSON with Go
- 4.1hosttip.info service
5.Package template
- 5.1struct
- 5.2array
- 5.3slice
- 5.4text/template
- 5.4.1Variables
- 5.5html/template
- 5.5.1Modify dosasite.go to use templates
- 5.6Handling Forms
- 5.7Web app stringupper
6.Using Google Geocoding and Street View Image APIs
- 6.1APIs to be used
- 6.2Create folders
- 6.3File goview.css
- 6.4Program geoweb.go
- 6.4.1User Form
- 6.4.2QueryEscape
- 6.4.3defer
- 6.4.4Using Google Geocoding and Street View Image APIs
- 6.4.4.1Required parameters
7.Go and MongoDB on MongoLab
- 7.1What’s NoSQL?
- 7.2What’s MongoDB?
- 7.2.1MongoDB Core Concepts
- 7.3MongoLab - The Fully-managed MongoDB-as-a-Service
- 7.3.1Sign Up
- 7.3.2Create a database subscription
- 7.3.3Database User
- 7.3.4mgo
- 7.3.5JSON Recap
- 7.3.6package mgo
- 7.3.6.1Function Close
- 7.3.6.2Function SetSafe
- 7.3.6.3Function Safe
- 7.3.6.4Function DB
- 7.3.6.5Function C
- 7.3.6.6Function Insert
- 7.3.6.7Function Find
- 7.3.6.8Function One
- 7.3.7package bson
- 7.3.7.1type M
- 7.3.8Program mongohqconnect.go
- 7.3.9Web app trails.go
8.Go and Gmail
9.A Fun, Weather Forecast Go Web App
- 9.1Register for an account at Forecast for Developers
- 9.1.1Study the API documentation
- 9.1.1.1The Forecast Call
- 9.1.1.2Data Points
- 9.1.2Our app weather.go
- 9.1.2.1Concurrent Queries
- 9.1.2.2Run the program
- Exercise
10.Deploying Go Web Apps to Heroku
- 10.1Cloud Computing Service Levels
- 10.1.1SaaS
- 10.1.2IaaS
- 10.1.3PaaS
- 10.2Create an account on Heroku
- 10.3Install the Heroku Toolbelt
- 10.4Prepare a web app
- 10.5Use Git
- 10.6Create a Procfile
- 10.7Install Godep
- 10.8Declare app dependencies
- 10.9Using godep with our project
- 10.10Add these new files to git
- 10.11Deploy the app
- Exercises
- 10.12Program gomongohq.go
- Exercise
- Exercise
11.Deploying Go Web Apps to Google App Engine
- 11.1Google App Engine
- 11.1.1Sandbox
- This is a Warning
- 11.1.2Services
- 11.1.3The Administration Console
- 11.1.4Applications (web and non-web)
- 11.1.5DataStore
- 11.2The Go runtime environment
- 11.3Download and Install the App Engine SDK
- Tip
- 11.4Let us build a small app (mytext.go) locally
- 11.4.1Program mytext.go
- 11.4.2Create the Configuration File
- 11.4.3Test the App
- 11.4.4Iterative Development
- 11.5Uploading Your App to Google’s App Engine
- 11.5.1Registering the App
- 11.5.2Upload and Access the app
- Access the app
- 11.6Web app upperstring.go
- Access the app
- 11.7Web app EXIF Map - blobstrex.go
- 11.7.1Program blobstrex.go
- 11.7.1.1File app.yaml
- 11.7.2Blobstore Go API
- Information
- 11.7.2.1The appengine package
- 11.7.2.1.1NewContext
- 11.7.2.2The blobstore package
- 11.7.2.2.1UploadUrl
- 11.7.3Uploading a photo (blob)
- 11.7.3.1Create an upload URL
- 11.7.3.2Create an upload form
- 11.7.4Using goexif
- 11.7.5Google Static Maps API
- 11.8Modifying geoweb.go for Google App Engine
- This is a Tip
- 11.9Check out
12.Web Toolkits and App Frameworks for Go
- 12.1Martini
- 12.2Installation of Martini
- 12.2.1Check whether Martini works
- 12.2.2Classic Martini
- 12.2.3Handlers
- 12.2.3.1Return Values
- 12.2.4Routing
- 12.2.5Serving Static Files
- 12.2.6Middleware Handlers
- 12.3Upload a Martini app to Google App Engine
- 12.4What next?