Exemple #1
0
func (helloController *HelloController) Register(server server.Server) {
	fmt.Println("Registering HelloController")
	server.HandleFunc("/", handleHello).Methods("GET")
}
Exemple #2
0
func (helloDep *HelloDep) Register(server server.Server) {
	fmt.Println("Registering HelloDepController")
	server.HandleFunc("/hellodep", handleHelloDep).Methods("GET")
}
Exemple #3
0
// Register registers this plugin in the server
func (t *Todos) Register(server server.Server) {
	server.HandleFunc("/todos", handleGet).Methods("GET")
	server.HandleFunc("/todos", handlePOST).Methods("POST")
	server.HandleFunc("/todos/{id}", handlePOST).Methods("PATCH")
	server.HandleFunc("/todos/{id}", handleDELETE).Methods("DELETE")
}