コード例 #1
0
ファイル: register_handlers.go プロジェクト: aarzilli/tools
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))
}
コード例 #2
0
ファイル: view.go プロジェクト: aarzilli/tools
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))

}
コード例 #3
0
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))

}
コード例 #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))

}
コード例 #5
0
ファイル: foscam.go プロジェクト: aarzilli/tools
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))

}
コード例 #6
0
ファイル: t_parsing_test.go プロジェクト: aarzilli/tools
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

}
コード例 #7
0
ファイル: view.go プロジェクト: aarzilli/tools
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))

}
コード例 #8
0
ファイル: upload2.go プロジェクト: aarzilli/tools
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))
}
コード例 #9
0
ファイル: http handlers.go プロジェクト: aarzilli/tools
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))

}
コード例 #10
0
ファイル: register_handlers.go プロジェクト: aarzilli/tools
// 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))

}
コード例 #11
0
ファイル: coinbase.go プロジェクト: aarzilli/tools
// 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))
}
コード例 #12
0
ファイル: http handlers.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc("/guest-entry", loghttp.Adapter(guestEntry))
	http.HandleFunc("/guest-save", loghttp.Adapter(guestSave))
	http.HandleFunc("/guest-view", loghttp.Adapter(guestView))
}
コード例 #13
0
ファイル: get_data.go プロジェクト: aarzilli/tools
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))
}
コード例 #14
0
ファイル: email_receive.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc("/_ah/mail/", loghttp.Adapter(emailReceiveAndStore))
	//http.HandleFunc("/_ah/mail/"  , loghttp.Adapter(emailReceiveSimple))
}
コード例 #15
0
ファイル: base examples 3.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc("/img-serve-example-3", loghttp.Adapter(imgServingExample3))
}
コード例 #16
0
ファイル: register_handlers.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc("/big-query/html", loghttp.Adapter(ViewHTML))
	http.HandleFunc("/big-query/test-gob-codec", loghttp.Adapter(testGobDecodeEncode))
}
コード例 #17
0
ファイル: register_handlers.go プロジェクト: aarzilli/tools
func InitHandlers() {
	http.HandleFunc("/tpl/demo1", loghttp.Adapter(templatesCompileDemo))
	http.HandleFunc("/tpl/demo2", loghttp.Adapter(templatesDemo2))
	http.HandleFunc("/tpl/reset", loghttp.Adapter(TemplateFromHugoReset))
}
コード例 #18
0
ファイル: backend2.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc("/backend2", loghttp.Adapter(backend2))

}
コード例 #19
0
func init() {
	http.HandleFunc("/big-query/show-chart", loghttp.Adapter(showAsChart))
	http.HandleFunc("/big-query/show-table", loghttp.Adapter(showAsTable))
}
コード例 #20
0
func init() {
	http.HandleFunc("/big-query/legend", loghttp.Adapter(legendAsHTML))
}
コード例 #21
0
ファイル: fetch_and_display.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc(routes.ProxifyURI, loghttp.Adapter(handleFetchURL))
}
コード例 #22
0
ファイル: blockchain.go プロジェクト: aarzilli/tools
// InitHandlers is called from outside,
// and makes the EndPoints available.
func InitHandlers() {
	http.HandleFunc(uriRequestPayment, loghttp.Adapter(requestPay))
	http.HandleFunc(uriConfirmPayment, loghttp.Adapter(confirmPay))
}
コード例 #23
0
ファイル: register_handlers.go プロジェクト: aarzilli/tools
// InitHandlers is called from outside,
// and makes the EndPoints available.
func InitHandlers() {
	http.HandleFunc(routes.DedupURI, loghttp.Adapter(dedupHTTP))
}
コード例 #24
0
ファイル: register_handlers.go プロジェクト: aarzilli/tools
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))
}
コード例 #25
0
ファイル: form_redirector.go プロジェクト: aarzilli/tools
func init() {
	http.Handle(routes.FormRedirector, loghttp.Adapter(formRedirector))
}
コード例 #26
0
ファイル: twilio.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc("/send-sms", loghttp.Adapter(sendSMS))
	http.HandleFunc("/call", loghttp.Adapter(call))
	http.HandleFunc("/twiml", loghttp.Adapter(twilioResponse))
}
コード例 #27
0
ファイル: backend3.go プロジェクト: aarzilli/tools
func init() {
	prepareLayout(myB0)
	http.HandleFunc("/backend3", loghttp.Adapter(backend3))
}
コード例 #28
0
ファイル: write methods.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc("/write-methods", loghttp.Adapter(writeMethods))
	http.HandleFunc("/write-methods-read", loghttp.Adapter(writeMethodsResponder))
}
コード例 #29
0
ファイル: query with cursor.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc("/guest-view-cursor", loghttp.Adapter(guestViewCursor))
}
コード例 #30
0
ファイル: img.go プロジェクト: aarzilli/tools
func init() {
	http.HandleFunc("/image/analyze", loghttp.Adapter(imageAnalyze))
	http.HandleFunc("/image/draw-lines-example", loghttp.Adapter(drawLinesOverGrid))
}