Hobo
Login: kormie Password: dkormie
Admin Routes
GET /tags/trending/:id # Get trending tag
POST /tags/trending # Create a trending tag
PATCH /tags/trending # Update a trending tag
PATCH /tags/trendings/batch # Update a trending tag in batch
DELETE /tags/trending/:id # Delete a trending tag
POST /accounts/:id/blocks # Block user
POST /accounts # Create User
- Install gcloud tool
- Install app engine SDK
goapp serve -host 0.0.0.0 -port 8080 -admin_port 8000 app/app-staging.yaml
- Login:
gcloud auth login
- Deploy to AppEngine
goapp deploy -application staging-api-getunseen app/app-<environment>.yaml
- Query the Datastore you have to use the namespace 'hobo' Click here:
http://localhost:8000/datastore?kind=Account&namespace=hobo
Snap CI pipeline uses the scripts under bin
to configure go
environment and automatically performs the following steps:
- Build the project resolving dependencies with
goapp get ...
and run any tests in the project. - Deploys the app to
Staging
environment inAppEngine
using the toolappcfg.py
in the appengine SDK.
There is a manual step to deploy the build resulted from the previous steps in to production
environment in AppEngine
.
AppEngine allows developers to build multitenancy applications by applying namespaces to their data.
Some of the APIs supporting Namespaces
are: Datastore
, memcache
, taskqueue
.
Exemple of Namespace
usage with Datastore
:
gae := appengine.NewContext(c.Request)
gaeNamespace := appengine.ModuleName(gae)
namespacedContext, _ := appengine.Namespace(gae, gaeNamespace)
apiInfo := struct { Endpoint, Namespace, Version string }{
Endpoint: "/v1/hobo",
Namespace: gaeNamespace,
}
key := datastore.NewKey(namespacedContext, "ApiInfo", "ApiInfo", 0, nil)
datastore.Put(namespacedContext, key, &apiInfo)
Need to introduce a Smoke Tests
step in the pipeline after each deploy to each environment.