Beispiel #1
0
func init() {
	xmpp.Handle(handleChat)

	http.HandleFunc("/", mainHandler)
	http.HandleFunc("/send", sendHandler)
	http.HandleFunc("/_ah/xmpp/subscription/subscribe", aHandler)
	http.HandleFunc("/_ah/xmpp/subscription/subscribed", aHandler)
	http.HandleFunc("/_ah/xmpp/subscription/unsubscribe", aHandler)
	http.HandleFunc("/_ah/xmpp/subscription/unsubscribed", aHandler)
	http.HandleFunc("/_ah/xmpp/presence/available", aHandler)
	http.HandleFunc("/_ah/xmpp/presence/unavailable", aHandler)
	http.HandleFunc("/_ah/xmpp/presence/probe", aHandler)
	http.HandleFunc("/_ah/xmpp/error", aHandler)
}
Beispiel #2
0
func init() {
	r := mux.NewRouter()

	r.HandleFunc("/", controllers.Index).Methods("GET")
	r.HandleFunc("/guest-book", controllers.Index).Methods("GET")
	r.HandleFunc("/guest-book/sign", controllers.GuestSign).Methods("POST")

	r.HandleFunc("/admin/show-runtime", controllers.ShowRuntime).Methods("GET")
	r.HandleFunc("/admin/counter", controllers.Counter).Methods("GET")

	r.HandleFunc("/user/login", controllers.LoginHandler).Methods("GET")
	r.HandleFunc("/user/logout", controllers.LogoutHandler).Methods("GET")

	r.HandleFunc("/memo", controllers.MemoAdd).Methods("POST")
	r.HandleFunc("/memo/{key}", controllers.MemoShow).Methods("GET")
	r.HandleFunc("/memo/{key}", controllers.MemoRemove).Methods("DELETE")

	r.HandleFunc("/mail-send/{email}", controllers.SendMail).Methods("GET")
	r.HandleFunc("/_ah/mail/{email}", controllers.ReceiveMail).Methods("POST")

	r.HandleFunc("/task/sign", controllers.TaskAddMemo).Methods("GET")
	r.HandleFunc("/task/sign/{name}", controllers.TaskRemove).Methods("DELETE")
	r.HandleFunc("/task/auto-sign", controllers.TaskBackend).Methods("POST")
	r.HandleFunc("/task/delay", controllers.DelayFunc).Methods("GET")

	r.HandleFunc("/xmpp/send", controllers.SendXMPP).Methods("GET")

	r.HandleFunc("/fetch/github/{user}", controllers.GitHubFetch).Methods("GET")

	r.HandleFunc("/capabilities", controllers.Capabilities).Methods("GET")

	r.HandleFunc("/blob", controllers.BlobPage).Methods("GET")
	r.HandleFunc("/blob/upload", controllers.BlobUpload).Methods("POST")
	r.HandleFunc("/blob/store", controllers.BlobStore).Methods("GET")

	http.Handle("/", r)

	xmpp.Handle(controllers.ReceiveXMPP)
}
Beispiel #3
0
func init() {
	http.HandleFunc("/send", sendHandler)
	http.HandleFunc("/see", seeHandler)
	xmpp.Handle(handleChat)
}