Ejemplo n.º 1
0
func init() {

	http.HandleFunc("/guest-entry", util_appengine.Adapter(guestEntry))
	http.HandleFunc("/guest-save", util_appengine.Adapter(guestSave))
	http.HandleFunc("/guest-view", util_appengine.Adapter(guestView))

}
Ejemplo n.º 2
0
func init() {

	http.HandleFunc("/image/base64-from-file", util_appengine.Adapter(imagefileAsBase64))
	http.HandleFunc("/image/base64-from-var", util_appengine.Adapter(imagevariAsBase64))
	http.HandleFunc("/image/base64-from-datastore", util_appengine.Adapter(datastoreAsBase64))

	http.HandleFunc("/image/img-from-datastore", util_appengine.Adapter(imageFromDatastore))

}
Ejemplo n.º 3
0
func init() {

	// InstanceId := appengine.InstanceID() // does not during init, only after a few seconds

	http.HandleFunc("/instance-info/view", util_appengine.Adapter(view))
	http.HandleFunc("/instance-info/collect", util_appengine.Adapter(collectInfo))

	http.HandleFunc("/_ah/start", onStart)
	http.HandleFunc("/_ah/stop", onStop)

	go func() {
		for i := 0; i < 22222; i++ {
			// s := fmt.Sprintf("%v - %#v\n", util.TimeMarker(), info)
			_, ok := m1["info"]
			if ok {
				s := fmt.Sprintf("%v", m1["info"].Hostname)
				log.Print(s)
			}
			time.Sleep(12000 * time.Millisecond)
		}

	}()

}
Ejemplo n.º 4
0
func view(w http.ResponseWriter, r *http.Request, m map[string]interface{}) {

	c := appengine.NewContext(r)
	_ = c

	// CIRCULAR DEPENDENCY PROBLEM

	// path := m["dir"].(string) + m["base"].(string)

	// err := sc.Increment(c, path)
	// util_err.Err_http(w, r, err, false)

	// cntr, err := sc.Count(w, r, path)
	// util_err.Err_http(w, r, err, false)
	cntr := 1

	tplAdder, tplExec := tpl_html.FuncTplBuilder(w, r)
	tplAdder("n_html_title", "Application, Module and Instance Info", nil)
	tplAdder("n_cont_1", "<pre>{{.}}</pre>", ii.String())
	tplAdder("n_cont_2", "<p>{{.}} views</p>", cntr)
	tplAdder("n_cont_0", `
		<p>On the development server, call 
		<a href='/instance-info/collect' 
		target='collect' >collect</a> first.</p>

		<p><a href='/instance-info/`+ii.InstanceID+`'>specific url</a></p>
		
		`, "")

	tplExec(w, r)

	/*
	 Requests are routed randomly accross instances

	 Following is just a futile try to register
	 an instance specific handler.
	 It is only useful, when we request an instance
	 specifically via specific hostname
	*/
	util_err.SuppressPanicUponDoubleRegistration(w, r, "/instance-info/"+ii.InstanceID,
		util_appengine.Adapter(view))

}
Ejemplo n.º 5
0
func init() {
	http.HandleFunc("/tpl/demo1", util_appengine.Adapter(templatesCompileDemo))
}
Ejemplo n.º 6
0
func init() {
	http.HandleFunc("/img-serve-example-3", util_appengine.Adapter(imgServingExample3))
}
Ejemplo n.º 7
0
func init() {
	http.HandleFunc("/image/analyze", util_appengine.Adapter(imageAnalyze))
	http.HandleFunc("/image/draw-lines-example", util_appengine.Adapter(drawLinesOverGrid))
}
Ejemplo n.º 8
0
func init() {
	http.HandleFunc("/backend2", util_appengine.Adapter(backend2))

}
Ejemplo n.º 9
0
func init() {
	http.HandleFunc("/big-query/query-into-datastore", util_appengine.Adapter(queryIntoDatastore))
	http.HandleFunc("/big-query/mock-data-into-datastore", util_appengine.Adapter(mockDateIntoDatastore))
	http.HandleFunc("/big-query/regroup-data-01", util_appengine.Adapter(regroupFromDatastore01))
	http.HandleFunc("/big-query/regroup-data-02", util_appengine.Adapter(regroupFromDatastore02))
}
Ejemplo n.º 10
0
func init() {
	http.HandleFunc("/tpl/demo2", util_appengine.Adapter(templatesDemo2))
}
func init() {
	http.HandleFunc("/big-query/legend", util_appengine.Adapter(legendAsHTML))
}
Ejemplo n.º 12
0
func init() {
	prepareLayout(myB0)
	http.HandleFunc("/backend3", util_appengine.Adapter(backend3))
}
Ejemplo n.º 13
0
func init() {

	http.HandleFunc("/guest-view-cursor", util_appengine.Adapter(guestViewCursor))

}
Ejemplo n.º 14
0
func init() {
	http.HandleFunc("/big-query/html", util_appengine.Adapter(ViewHTML))
	http.HandleFunc("/big-query/test-gob-codec", testGobDecodeEncode)
}
Ejemplo n.º 15
0
func init() {
	http.HandleFunc("/big-query/show-chart", util_appengine.Adapter(showAsChart))
	http.HandleFunc("/big-query/show-table", util_appengine.Adapter(showAsTable))
}