Esempio n. 1
0
func InitHandlers() {
	http.HandleFunc(UrlUploadSend, loghttp.Adapter(sendUpload))
	http.HandleFunc(UrlUploadReceive, loghttp.Adapter(receiveUpload))
	http.HandleFunc("/mnt00/", loghttp.Adapter(ServeDsFsFile))
	http.HandleFunc("/mnt01/", loghttp.Adapter(ServeDsFsFile))
	http.HandleFunc("/mnt02/", loghttp.Adapter(ServeDsFsFile))
}
Esempio n. 2
0
func init() {

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

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

}
func init() {
	http.HandleFunc("/namespaced-counters/increment", loghttp.Adapter(incrementBothNamespaces))
	http.HandleFunc("/namespaced-counters/read", loghttp.Adapter(readBothNamespaces))

	http.HandleFunc("/_ah/namespaced-counters/queue-pop", loghttp.Adapter(queuePop))
	http.HandleFunc("/namespaced-counters/queue-push", loghttp.Adapter(queuePush))

}
Esempio n. 4
0
func init() {

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

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

}
Esempio n. 5
0
func init() {

	if util_appengine.IsLocalEnviron() {
		dns_router = "192.168.1.1"
		dns_cam = "192.168.1.4:8081"
	} else {
		dns_router = "ds7934.myfoscam.org"
		dns_cam = "ds7934.myfoscam.org:8081"
	}

	http.HandleFunc("/foscam-status", loghttp.Adapter(foscamStatus))
	http.HandleFunc("/foscam-toggle", loghttp.Adapter(foscamToggle))
	http.HandleFunc("/foscam-watch", loghttp.Adapter(foscamWatch))

}
Esempio n. 6
0
func prepare(t *testing.T) aetest.Context {

	lg, lge := loghttp.Logger(nil, nil)
	_ = lg

	c, err := aetest.NewContext(nil)
	if err != nil {
		lge(err)
		t.Fatal(err)
	}

	serveFile := func(w http.ResponseWriter, r *http.Request, m map[string]interface{}) {
		fs1 := repo.GetFS(c)
		fileserver.FsiFileServer(w, r, fileserver.Options{FS: fs1, Prefix: repo.UriMountNameY})
	}
	http.HandleFunc(repo.UriMountNameY, loghttp.Adapter(serveFile))

	go func() {
		log.Fatal(
			http.ListenAndServe(cTestHostOwn, nil),
		)
	}()

	return c

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

	cntr := 1

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

		<p><a href='/instance-info/`+instance_mgt.GetStatic().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
	*/
	SuppressPanicUponDoubleRegistration(
		w, r, "/instance-info/"+instance_mgt.GetStatic().InstanceID, loghttp.Adapter(view))

}
Esempio n. 8
0
func init() {
	http.HandleFunc("/print", loghttp.Adapter(blobList))
	http.HandleFunc("/blob2", loghttp.Adapter(blobList))
	http.HandleFunc("/blob2/upload", loghttp.Adapter(submitUpload))
	http.HandleFunc("/blob2/processing-new-upload", loghttp.Adapter(processUpload))
	http.HandleFunc("/blob2/serve-full", loghttp.Adapter(serveFull))
	http.HandleFunc("/blob2/thumb", loghttp.Adapter(serveThumb))
	http.HandleFunc("/blob2/rename-delete", loghttp.Adapter(renameOrDelete))
}
Esempio n. 9
0
func init() {
	http.HandleFunc("/save-url/save-no-anc", loghttp.Adapter(saveURLNoAnc))
	http.HandleFunc("/save-url/save-wi-anc", loghttp.Adapter(saveURLWithAncestor))
	http.HandleFunc("/save-url/view-no-anc", loghttp.Adapter(listURLNoAnc))
	http.HandleFunc("/save-url/view-wi-anc", loghttp.Adapter(listURLWithAncestors))
	http.HandleFunc("/save-url/backend", loghttp.Adapter(backend))
	http.HandleFunc("/save-url/", loghttp.Adapter(backend))

}
Esempio n. 10
0
// InitHandlers is called from outside,
// and makes the EndPoints available.
func InitHandlers() {
	http.HandleFunc(uriSetType, loghttp.Adapter(setFSType))

	http.HandleFunc("/fetch/request-static", loghttp.Adapter(staticFetchDirect))

	http.HandleFunc(uriFetchCommandSender, loghttp.Adapter(staticFetchViaPosting2Receiver))
	http.HandleFunc(uriFetchCommandReceiver, loghttp.Adapter(fetchCommandReceiver))

	http.HandleFunc(UriMountNameY, loghttp.Adapter(serveFile))

	// working only for memfs
	http.Handle("/fetch/reservoire/static/", http.StripPrefix("/fetch/reservoire/static/", fileserver1))

	http.Handle(routes.FetchSimilarURI, loghttp.Adapter(FetchSimilar))
	http.Handle("/fetch/similiar/form/", loghttp.Adapter(fetchSimForm))

}
Esempio n. 11
0
// InitHandlers is called from outside,
// and makes the EndPoints available.
func InitHandlers() {
	http.HandleFunc(uriRequestPayment, loghttp.Adapter(requestPay))
	http.HandleFunc(uriConfirmPayment, loghttp.Adapter(confirmPay))
	http.HandleFunc(uriRedirectSuccess, loghttp.Adapter(paymentSuccess))
}
Esempio n. 12
0
func init() {
	http.HandleFunc("/guest-entry", loghttp.Adapter(guestEntry))
	http.HandleFunc("/guest-save", loghttp.Adapter(guestSave))
	http.HandleFunc("/guest-view", loghttp.Adapter(guestView))
}
Esempio n. 13
0
func init() {
	http.HandleFunc("/big-query/query-into-datastore", loghttp.Adapter(queryIntoDatastore))
	http.HandleFunc("/big-query/mock-data-into-datastore", loghttp.Adapter(mockDateIntoDatastore))
	http.HandleFunc("/big-query/regroup-data-01", loghttp.Adapter(regroupFromDatastore01))
	http.HandleFunc("/big-query/regroup-data-02", loghttp.Adapter(regroupFromDatastore02))
}
Esempio n. 14
0
func init() {
	http.HandleFunc("/_ah/mail/", loghttp.Adapter(emailReceiveAndStore))
	//http.HandleFunc("/_ah/mail/"  , loghttp.Adapter(emailReceiveSimple))
}
Esempio n. 15
0
func init() {
	http.HandleFunc("/img-serve-example-3", loghttp.Adapter(imgServingExample3))
}
Esempio n. 16
0
func init() {
	http.HandleFunc("/big-query/html", loghttp.Adapter(ViewHTML))
	http.HandleFunc("/big-query/test-gob-codec", loghttp.Adapter(testGobDecodeEncode))
}
Esempio n. 17
0
func InitHandlers() {
	http.HandleFunc("/tpl/demo1", loghttp.Adapter(templatesCompileDemo))
	http.HandleFunc("/tpl/demo2", loghttp.Adapter(templatesDemo2))
	http.HandleFunc("/tpl/reset", loghttp.Adapter(TemplateFromHugoReset))
}
Esempio n. 18
0
func init() {
	http.HandleFunc("/backend2", loghttp.Adapter(backend2))

}
Esempio n. 19
0
func init() {
	http.HandleFunc("/big-query/show-chart", loghttp.Adapter(showAsChart))
	http.HandleFunc("/big-query/show-table", loghttp.Adapter(showAsTable))
}
Esempio n. 20
0
func init() {
	http.HandleFunc("/big-query/legend", loghttp.Adapter(legendAsHTML))
}
Esempio n. 21
0
func init() {
	http.HandleFunc(routes.ProxifyURI, loghttp.Adapter(handleFetchURL))
}
Esempio n. 22
0
// InitHandlers is called from outside,
// and makes the EndPoints available.
func InitHandlers() {
	http.HandleFunc(uriRequestPayment, loghttp.Adapter(requestPay))
	http.HandleFunc(uriConfirmPayment, loghttp.Adapter(confirmPay))
}
Esempio n. 23
0
// InitHandlers is called from outside,
// and makes the EndPoints available.
func InitHandlers() {
	http.HandleFunc(routes.DedupURI, loghttp.Adapter(dedupHTTP))
}
Esempio n. 24
0
func InitHandlers() {
	http.HandleFunc(UriSetFSType, loghttp.Adapter(setFSType))
	http.HandleFunc("/fsi/create-objects", loghttp.Adapter(createSys))
	http.HandleFunc("/fsi/retrieve-by-query", loghttp.Adapter(retrieveByQuery))
	http.HandleFunc("/fsi/retrieve-by-read-dir", loghttp.Adapter(retrieveByReadDir))
	http.HandleFunc("/fsi/walk", loghttp.Adapter(walkH))
	http.HandleFunc("/fsi/remove", loghttp.Adapter(removeSubtree))

	http.HandleFunc("/fsi/delete-all", loghttp.Adapter(deleteAll))
	http.HandleFunc(UriDeleteSubtree, loghttp.Adapter(DeleteSubtree))

	http.HandleFunc("/fsi/cntr/last", loghttp.Adapter(lastMountPoint))
	http.HandleFunc("/fsi/cntr/reset", loghttp.Adapter(resetMountPoint))
	http.HandleFunc("/fsi/cntr/incr", loghttp.Adapter(incrMountPoint))
	http.HandleFunc("/fsi/cntr/decr", loghttp.Adapter(decrMountPoint))
}
Esempio n. 25
0
func init() {
	http.Handle(routes.FormRedirector, loghttp.Adapter(formRedirector))
}
Esempio n. 26
0
func init() {
	http.HandleFunc("/send-sms", loghttp.Adapter(sendSMS))
	http.HandleFunc("/call", loghttp.Adapter(call))
	http.HandleFunc("/twiml", loghttp.Adapter(twilioResponse))
}
Esempio n. 27
0
func init() {
	prepareLayout(myB0)
	http.HandleFunc("/backend3", loghttp.Adapter(backend3))
}
Esempio n. 28
0
func init() {
	http.HandleFunc("/write-methods", loghttp.Adapter(writeMethods))
	http.HandleFunc("/write-methods-read", loghttp.Adapter(writeMethodsResponder))
}
Esempio n. 29
0
func init() {
	http.HandleFunc("/guest-view-cursor", loghttp.Adapter(guestViewCursor))
}
Esempio n. 30
0
func init() {
	http.HandleFunc("/image/analyze", loghttp.Adapter(imageAnalyze))
	http.HandleFunc("/image/draw-lines-example", loghttp.Adapter(drawLinesOverGrid))
}