当前位置: 首页>>代码示例>>Golang>>正文


Golang loghttp.Adapter函数代码示例

本文整理汇总了Golang中github.com/pbberlin/tools/net/http/loghttp.Adapter函数的典型用法代码示例。如果您正苦于以下问题:Golang Adapter函数的具体用法?Golang Adapter怎么用?Golang Adapter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Adapter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: InitHandlers

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))
}
开发者ID:aarzilli,项目名称:tools,代码行数:7,代码来源:register_handlers.go

示例2: init

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))

}
开发者ID:aarzilli,项目名称:tools,代码行数:8,代码来源:view.go

示例3: init

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))

}
开发者ID:aarzilli,项目名称:tools,代码行数:8,代码来源:namespace+taskqueue+ioWriteString.go

示例4: init

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))

}
开发者ID:aarzilli,项目名称:tools,代码行数:9,代码来源:img+direct+or+base64.go

示例5: init

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))

}
开发者ID:aarzilli,项目名称:tools,代码行数:15,代码来源:foscam.go

示例6: prepare

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

}
开发者ID:aarzilli,项目名称:tools,代码行数:26,代码来源:t_parsing_test.go

示例7: view

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))

}
开发者ID:aarzilli,项目名称:tools,代码行数:32,代码来源:view.go

示例8: init

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))
}
开发者ID:aarzilli,项目名称:tools,代码行数:9,代码来源:upload2.go

示例9: init

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))

}
开发者ID:aarzilli,项目名称:tools,代码行数:9,代码来源:http+handlers.go

示例10: InitHandlers

// 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))
}
开发者ID:aarzilli,项目名称:tools,代码行数:7,代码来源:coinbase.go

示例11: init

func init() {
	http.HandleFunc("/guest-entry", loghttp.Adapter(guestEntry))
	http.HandleFunc("/guest-save", loghttp.Adapter(guestSave))
	http.HandleFunc("/guest-view", loghttp.Adapter(guestView))
}
开发者ID:aarzilli,项目名称:tools,代码行数:5,代码来源:http+handlers.go

示例12: init

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))
}
开发者ID:aarzilli,项目名称:tools,代码行数:6,代码来源:get_data.go

示例13: init

func init() {
	http.HandleFunc("/_ah/mail/", loghttp.Adapter(emailReceiveAndStore))
	//http.HandleFunc("/_ah/mail/"  , loghttp.Adapter(emailReceiveSimple))
}
开发者ID:aarzilli,项目名称:tools,代码行数:4,代码来源:email_receive.go

示例14: init

func init() {
	http.HandleFunc("/img-serve-example-3", loghttp.Adapter(imgServingExample3))
}
开发者ID:aarzilli,项目名称:tools,代码行数:3,代码来源:base+examples+3.go

示例15: init

func init() {
	http.HandleFunc("/big-query/html", loghttp.Adapter(ViewHTML))
	http.HandleFunc("/big-query/test-gob-codec", loghttp.Adapter(testGobDecodeEncode))
}
开发者ID:aarzilli,项目名称:tools,代码行数:4,代码来源:register_handlers.go


注:本文中的github.com/pbberlin/tools/net/http/loghttp.Adapter函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。