func packageApp(args []string) { if len(args) == 0 { fmt.Fprint(os.Stderr, cmdPackage.Long) return } // Determine the run mode. mode := "dev" if len(args) >= 2 { mode = args[1] } appImportPath := args[0] revel.Init(mode, appImportPath, "") // Remove the archive if it already exists. destFile := filepath.Base(revel.BasePath) + ".tar.gz" os.Remove(destFile) // Collect stuff in a temp directory. tmpDir, err := ioutil.TempDir("", filepath.Base(revel.BasePath)) panicOnError(err, "Failed to get temp dir") buildApp([]string{args[0], tmpDir, mode}) // Create the zip file. archiveName := mustTarGzDir(destFile, tmpDir) fmt.Println("Your archive is ready:", archiveName) }
func main() { // go run main.go // 生成routes.go, main.go revel.Init("", "github.com/leanote/leanote", "") _, err := harness.Build() // ok, err if err != nil { panic(err) } fmt.Println("Ok") // panicOnError(reverr, "Failed to build") }
func BenchmarkProcessBookingSource(b *testing.B) { revel.Init("", "github.com/revel/revel/samples/booking", "") revel.TRACE = log.New(ioutil.Discard, "", 0) b.ResetTimer() for i := 0; i < b.N; i++ { _, err := ProcessSource(revel.CodePaths) if err != nil { b.Error("Unexpected error:", err) } } }
func generateFiles(args []string) { if len(args) != 2 { fmt.Fprintf(os.Stderr, "%s\n%s", cmdBuild.UsageLine, cmdBuild.Long) return } appImportPath, destPath := args[0], args[1] if !revel.Initialized { revel.Init("", appImportPath, "") } reverr := harness.Generate(destPath, true) panicOnError(reverr, "Failed to build") }
func runApp(args []string) { if len(args) == 0 { errorf("No import path given.\nRun 'revel help run' for usage.\n") } // Determine the run mode. mode := "dev" if len(args) >= 2 { mode = args[1] } // Find and parse app.conf revel.Init(mode, args[0], "") revel.LoadMimeConfig() // Determine the override port, if any. port := revel.HttpPort if len(args) == 3 { var err error if port, err = strconv.Atoi(args[2]); err != nil { errorf("Failed to parse port as integer: %s", args[2]) } } revel.INFO.Printf("Running %s (%s) in %s mode\n", revel.AppName, revel.ImportPath, mode) revel.TRACE.Println("Base path:", revel.BasePath) // If the app is run in "watched" mode, use the harness to run it. if revel.Config.BoolDefault("watch", true) && revel.Config.BoolDefault("watch.code", true) { revel.TRACE.Println("Running in watched mode.") revel.HttpPort = port harness.NewHarness().Run() // Never returns. } // Else, just build and run the app. revel.TRACE.Println("Running in live build mode.") app, err := harness.Build() if err != nil { errorf("Failed to build app: %s", err) } app.Port = port app.Cmd().Run() }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 10: []string{}, }, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{} testing.TestSuites = []interface{}{} revel.Run(*port) }
func TestProcessBookingSource(t *testing.T) { revel.Init("prod", "github.com/revel/revel/samples/booking", "") sourceInfo, err := ProcessSource([]string{revel.AppPath}) if err != nil { t.Fatal("Failed to process booking source with error:", err) } CONTROLLER_PKG := "github.com/revel/revel/samples/booking/app/controllers" expectedControllerSpecs := []*TypeInfo{ {"GorpController", CONTROLLER_PKG, "controllers", nil, nil}, {"Application", CONTROLLER_PKG, "controllers", nil, nil}, {"Hotels", CONTROLLER_PKG, "controllers", nil, nil}, } if len(sourceInfo.ControllerSpecs()) != len(expectedControllerSpecs) { t.Errorf("Unexpected number of controllers found. Expected %d, Found %d", len(expectedControllerSpecs), len(sourceInfo.ControllerSpecs())) } NEXT_TEST: for _, expected := range expectedControllerSpecs { for _, actual := range sourceInfo.ControllerSpecs() { if actual.StructName == expected.StructName { if actual.ImportPath != expected.ImportPath { t.Errorf("%s expected to have import path %s, actual %s", actual.StructName, expected.ImportPath, actual.ImportPath) } if actual.PackageName != expected.PackageName { t.Errorf("%s expected to have package name %s, actual %s", actual.StructName, expected.PackageName, actual.PackageName) } continue NEXT_TEST } } t.Errorf("Expected to find controller %s, but did not. Actuals: %s", expected.StructName, sourceInfo.ControllerSpecs()) } }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 55: []string{ "title", }, }, }, &revel.MethodType{ Name: "Main", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 106: []string{ "title", "admin_info", "system_info", "panel_list", }, 108: []string{ "title", }, }, }, }) revel.RegisterController((*controllers0.Category)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{ 27: []string{ "title", "categorys", }, 29: []string{ "title", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{ 51: []string{ "title", "categorys", "Id", }, 55: []string{ "title", "categorys", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{ 217: []string{ "title", "categorys", "category_info", }, 223: []string{ "title", "categorys", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Content)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 19: []string{ "title", }, }, }, &revel.MethodType{ Name: "Left", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 30: []string{ "title", "categorys", }, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 59: []string{ "title", "cid", "categorys", "article_list", "where", "pages", }, 63: []string{ "title", "cid", "categorys", "article_list", "where", "pages", }, }, }, &revel.MethodType{ Name: "Keywords", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CateNameSearch", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Push", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 122: []string{ "title", }, }, }, &revel.MethodType{ Name: "Remove", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 132: []string{ "title", }, }, }, &revel.MethodType{ Name: "Comment", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 175: []string{ "title", }, }, }, &revel.MethodType{ Name: "Relationlist", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 204: []string{ "title", "cid", "category_info", "article_list", "pages", "where", }, }, }, &revel.MethodType{ Name: "AddContent", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 229: []string{ "title", "cid", "category_info", "article_info", }, 232: []string{ "title", "cid", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 347: []string{ "title", "cid", "category_info", "copyfrom_list", }, 350: []string{ "title", "cid", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 591: []string{ "title", "cid", "category_info", "article_info", "copyfrom_list", }, 594: []string{ "title", "cid", }, }, }, }) revel.RegisterController((*controllers1.Copyfrom)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "copyfrom", Type: reflect.TypeOf((**models.Copyfrom)(nil))}, }, RenderArgNames: map[int][]string{ 50: []string{ "title", "copyfrom_list", "sitedomain", "pages", }, 54: []string{ "title", "copyfrom_list", "sitedomain", "pages", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "copyfrom", Type: reflect.TypeOf((**models.Copyfrom)(nil))}, }, RenderArgNames: map[int][]string{ 66: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "copyfrom", Type: reflect.TypeOf((**models.Copyfrom)(nil))}, }, RenderArgNames: map[int][]string{ 213: []string{ "title", "copyfrom_info", "Id", }, 215: []string{ "title", }, }, }, }) revel.RegisterController((*controllers1.Extend)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 13: []string{ "title", }, }, }, }) revel.RegisterController((*controllers2.Announce)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "announce", Type: reflect.TypeOf((**models.Announce)(nil))}, }, RenderArgNames: map[int][]string{ 25: []string{ "title", "announce_list", "pages", }, 29: []string{ "title", "announce_list", "pages", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "announce", Type: reflect.TypeOf((**models.Announce)(nil))}, }, RenderArgNames: map[int][]string{ 41: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "announce", Type: reflect.TypeOf((**models.Announce)(nil))}, }, RenderArgNames: map[int][]string{ 139: []string{ "title", "announce_info", }, 141: []string{ "title", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "announce", Type: reflect.TypeOf((**models.Announce)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers2.Module)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 13: []string{ "title", }, }, }, }) revel.RegisterController((*controllers3.Panel)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 13: []string{ "title", }, }, }, }) revel.RegisterController((*controllers4.Plugin)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 13: []string{ "title", }, }, }, }) revel.RegisterController((*controllers5.Ajax)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "GetCaptcha", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Pos", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetPanel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin_panel", Type: reflect.TypeOf((**models.Admin_Panel)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DelPanel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin_panel", Type: reflect.TypeOf((**models.Admin_Panel)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "AddPanel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin_panel", Type: reflect.TypeOf((**models.Admin_Panel)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetMessage", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ScreenLock", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ScreenUnlock", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers5.Captcha)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetCaptchaId", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers5.Kindeditor)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Manager", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "upload", Type: reflect.TypeOf((**models.Upload)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "TitleImage", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "upload", Type: reflect.TypeOf((**models.Upload)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Upload", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "upload", Type: reflect.TypeOf((**models.Upload)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "AnnounceImage", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "upload", Type: reflect.TypeOf((**models.Upload)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers5.Public)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Map", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 28: []string{ "title", "map_html", }, 30: []string{ "title", }, }, }, &revel.MethodType{ Name: "CreateHtml", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 38: []string{}, }, }, &revel.MethodType{ Name: "Search", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 44: []string{}, }, }, &revel.MethodType{ Name: "Message", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 50: []string{}, }, }, }) revel.RegisterController((*controllers5.Test)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 28: []string{ "title", }, }, }, }) revel.RegisterController((*controllers6.Admin)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 28: []string{ "title", "admin_list", "pages", }, 32: []string{ "title", "admin_list", "pages", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 47: []string{ "title", "role_list", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 197: []string{ "title", "admin_info", "role_list", }, 199: []string{ "title", "role_list", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers6.Logs)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "logs", Type: reflect.TypeOf((**models.Logs)(nil))}, }, RenderArgNames: map[int][]string{ 28: []string{ "title", "logs_list", "where", "pages", }, }, }, &revel.MethodType{ Name: "DelAll", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "logs", Type: reflect.TypeOf((**models.Logs)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers6.Menu)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 27: []string{ "title", "menus", }, 29: []string{ "title", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 59: []string{ "title", "menus", "Id", }, 61: []string{ "title", "Id", }, 76: []string{ "title", "menus", }, 78: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 213: []string{ "title", "menus", "menu_info", }, 215: []string{ "title", "menu_info", }, 232: []string{ "title", "menus", }, 234: []string{ "title", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers6.Role)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{ 26: []string{ "title", "role_list", "pages", }, 30: []string{ "title", "role_list", "pages", }, }, }, &revel.MethodType{ Name: "Member", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{ 61: []string{ "title", "admin_list", "pages", }, 65: []string{ "title", "admin_list", "pages", }, 69: []string{ "title", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{ 94: []string{ "title", "tree", }, 96: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{ 200: []string{ "title", "role_info", "tree", "Id", }, 202: []string{ "title", "role_info", "Id", }, 220: []string{ "title", "tree", }, 222: []string{ "title", }, }, }, &revel.MethodType{ Name: "SetStatus", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers6.Setting)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 14: []string{ "title", }, }, }, }) revel.RegisterController((*controllers7.Style)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{ 17: []string{ "title", "template_list", }, }, }, &revel.MethodType{ Name: "File", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{ 34: []string{ "title", "template_info", }, 36: []string{ "title", }, }, }, &revel.MethodType{ Name: "Import", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{ 49: []string{ "title", }, }, }, &revel.MethodType{ Name: "Setstatus", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{ 181: []string{ "title", "template_info", }, 183: []string{ "title", }, }, }, }) revel.RegisterController((*controllers8.Group)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user_group", Type: reflect.TypeOf((**models.User_Group)(nil))}, }, RenderArgNames: map[int][]string{ 18: []string{ "title", "group_list", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user_group", Type: reflect.TypeOf((**models.User_Group)(nil))}, }, RenderArgNames: map[int][]string{ 29: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user_group", Type: reflect.TypeOf((**models.User_Group)(nil))}, }, RenderArgNames: map[int][]string{ 204: []string{ "title", "user_group_info", }, 206: []string{ "title", }, }, }, }) revel.RegisterController((*controllers8.User)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 35: []string{ "title", "user_list", "group_list", "pages", "where", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 50: []string{ "title", "group_list", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 228: []string{ "title", "id", "group_list", "user_info", }, 230: []string{ "title", "id", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Lock", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Unlock", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Move", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UserInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 491: []string{ "title", "id", "user_info", }, 493: []string{ "title", "id", }, }, }, &revel.MethodType{ Name: "Login", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 506: []string{ "title", "CaptchaId", }, }, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "EditInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 639: []string{ "title", "admin_info", }, 641: []string{ "title", }, }, }, &revel.MethodType{ Name: "AdminPanel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 729: []string{ "title", }, }, }, &revel.MethodType{ Name: "EditPwd", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 752: []string{ "title", "admin_info", }, 754: []string{ "title", }, }, }, &revel.MethodType{ Name: "Left", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 855: []string{ "title", "left_menu", }, 857: []string{ "title", }, 875: []string{ "title", "left_menu", }, 877: []string{ "title", }, }, }, }) revel.RegisterController((*controllers9.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers10.Jobs)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Status", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 19: []string{ "entries", }, }, }, }) revel.RegisterController((*controllers11.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 46: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 69: []string{ "error", }, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "admin/app/models.(*Admin).Validate": { 31: "a.Username", 32: "a.Username", 46: "a.Email", 47: "a.Email", 61: "a.Password", 62: "a.Password", }, "admin/app/models.(*Menu).Validate": { 22: "menu.Name", 23: "menu.Name", 24: "menu.Pid", 25: "menu.Url", 26: "menu.Order", }, "admin/app/models.(*Password).ValidatePassword": { 67: "P.Password", 68: "P.PasswordConfirm", 70: "P.Password", 71: "P.Password", }, } revel.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 33: []string{}, }, }, &revel.MethodType{ Name: "UserIndex", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 38: []string{}, }, }, &revel.MethodType{ Name: "UserAdd", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "region", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "summonerName", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UserDelete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "region", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "summonerId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GameIndex", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 53: []string{}, }, }, &revel.MethodType{ Name: "GameDelete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "platformId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "gameId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SummonerIndex", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 62: []string{}, }, }, &revel.MethodType{ Name: "Summoner", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "region", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "summonerName", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 67: []string{}, }, }, &revel.MethodType{ Name: "Record", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "region", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "gameId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "encryptionKey", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "summonerId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Version", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Metadata", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "region", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "LastChunkInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "region", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "end", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DataChunk", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "region", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "frame", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "KeyFrame", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "region", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "frame", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Catch", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "all", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{} testing.TestSuites = []interface{}{} revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.Application)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 10: []string{}, }, }, }) revel.RegisterController((*controllers.Sample2)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 12: []string{}, }, }, &revel.MethodType{ Name: "HandleSubmit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "firstname", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "lastname", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "age", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "passwordConfirm", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "emailConfirm", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "termsOfUse", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{ 46: []string{ "username", "firstname", "lastname", "age", "password", "email", }, }, }, }) revel.RegisterController((*controllers.Sample3)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 13: []string{}, }, }, &revel.MethodType{ Name: "HandleSubmit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 27: []string{ "user", }, }, }, }) revel.RegisterController((*controllers.Sample4)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 13: []string{}, }, }, &revel.MethodType{ Name: "HandleSubmit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 27: []string{ "user", }, }, }, }) revel.RegisterController((*controllers.Sample1)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 12: []string{}, }, }, &revel.MethodType{ Name: "HandleSubmit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "firstname", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "lastname", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "age", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "passwordConfirm", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "emailConfirm", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "termsOfUse", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{ 46: []string{ "username", "firstname", "lastname", "age", "password", "email", }, }, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "validation/app/controllers.Sample1.HandleSubmit": { 22: "username", 23: "username", 24: "firstname", 25: "lastname", 26: "age", 27: "age", 28: "password", 29: "password", 30: "passwordConfirm", 31: "passwordConfirm", 32: "email", 33: "email", 34: "emailConfirm", 35: "emailConfirm", 36: "termsOfUse", }, "validation/app/controllers.Sample2.HandleSubmit": { 22: "username", 23: "username", 24: "firstname", 25: "lastname", 26: "age", 27: "age", 28: "password", 29: "password", 30: "passwordConfirm", 31: "passwordConfirm", 32: "email", 33: "email", 34: "emailConfirm", 35: "emailConfirm", 36: "termsOfUse", }, "validation/app/models.(*User).Validate": { 18: "user.Username", 19: "user.Username", 20: "user.FirstName", 21: "user.LastName", 22: "user.Age", 23: "user.Age", 24: "user.Password", 25: "user.Password", 26: "user.PasswordConfirm", 27: "user.PasswordConfirm", 29: "user.Email", 30: "user.Email", 31: "user.EmailConfirm", 32: "user.EmailConfirm", 34: "user.TermsOfUse", }, } testing.TestSuites = []interface{}{ (*tests.ApplicationTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 17: []string{}, }, }, &revel.MethodType{ Name: "AddUser", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Users)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Login", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "login", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Signup", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 43: []string{}, }, }, &revel.MethodType{ Name: "SaveUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "login", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Voting)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 29: []string{ "days", }, }, }, &revel.MethodType{ Name: "ListDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "dayId", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 38: []string{ "day", }, }, }, &revel.MethodType{ Name: "VoteSlot", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "slotId", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 53: []string{ "slot", }, }, }, &revel.MethodType{ Name: "SendVote", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "vote", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "github.com/karesti/cm-voting/app/controllers.Users.Login": { 13: "login", 14: "password", }, "github.com/karesti/cm-voting/app/controllers.Users.SaveUser": { 48: "login", 49: "password", }, } testing.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.AbstractController)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Begin", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Commit", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Rollback", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RenderLogin", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RenderNoAdmin", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.User)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "GetUsers", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "userId", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetUserByName", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 27: []string{ "user", "nil", }, }, }, &revel.MethodType{ Name: "Setting", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "gender", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "age", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "lllness", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 39: []string{ "res", "err", }, }, }, &revel.MethodType{ Name: "GetTopicList", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "uid", Type: reflect.TypeOf((*int64)(nil))}, &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "limit", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 51: []string{ "topics", "err", }, }, }, &revel.MethodType{ Name: "GetSubscribeTopicList", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "uid", Type: reflect.TypeOf((*int64)(nil))}, &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "limit", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 63: []string{ "topics", "err", }, }, }, &revel.MethodType{ Name: "Block", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "blocked", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{ 75: []string{ "true", "err", }, }, }, &revel.MethodType{ Name: "GetBlockedUsers", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "limit", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 87: []string{ "blockedUsers", "err", }, }, }, }) revel.RegisterController((*controllers.Account)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Register", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 18: []string{ "user", "err", }, }, }, &revel.MethodType{ Name: "Login", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 26: []string{ "nil", }, 34: []string{ "response", "nil", }, 38: []string{ "nil", "err", }, }, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 49: []string{ "res", "nil", }, }, }, &revel.MethodType{ Name: "ChangePassword", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 59: []string{ "true", "err", }, }, }, }) revel.RegisterController((*controllers.Admin)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "GetUsers", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "userId", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 23: []string{ "users", "nil", }, }, }, &revel.MethodType{ Name: "GetAllStat", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "date", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 33: []string{ "nil", }, 37: []string{ "nil", "err", }, 45: []string{ "nil", "err", }, 49: []string{ "nil", "err", }, 53: []string{ "nil", "err", }, 57: []string{ "nil", "err", }, 61: []string{ "nil", "err", }, 65: []string{ "nil", "err", }, 81: []string{ "response", "nil", }, }, }, &revel.MethodType{ Name: "GetUserList", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "limit", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "utype", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 101: []string{ "nil", }, 104: []string{ "list", "err", }, }, }, &revel.MethodType{ Name: "RemoveUsers", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "ids", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "withPost", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{ 118: []string{ "res", "err", }, }, }, &revel.MethodType{ Name: "RemoveTopics", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "ids", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 130: []string{ "res", "err", }, }, }, &revel.MethodType{ Name: "EditTopic", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tid", Type: reflect.TypeOf((*int64)(nil))}, &revel.MethodArg{Name: "content", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "keywords", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 141: []string{ "res", "err", }, }, }, }) revel.RegisterController((*controllers.Topic)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "AddNew", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "content", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "keywords", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "bg", Type: reflect.TypeOf((*[]byte)(nil))}, }, RenderArgNames: map[int][]string{ 28: []string{ "nil", "err", }, 36: []string{ "topic", "err", }, }, }, &revel.MethodType{ Name: "GetTopicList", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "order", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "limit", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "maxid", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "needTotal", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{ 58: []string{ "topics", "err", }, }, }, &revel.MethodType{ Name: "GetDetail", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{ 67: []string{ "topic", "nil", }, }, }, &revel.MethodType{ Name: "Subscribe", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{ 78: []string{ "nil", }, 85: []string{ "res", "err", }, }, }, &revel.MethodType{ Name: "UnSubscribe", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{ 96: []string{ "nil", }, 103: []string{ "res", "err", }, }, }, &revel.MethodType{ Name: "Remove", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{ 117: []string{ "res", "err", }, }, }, &revel.MethodType{ Name: "Like", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{ 129: []string{ "res", "err", }, }, }, &revel.MethodType{ Name: "UnLike", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{ 141: []string{ "res", "err", }, }, }, &revel.MethodType{ Name: "Comment", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int64)(nil))}, &revel.MethodArg{Name: "comment", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "replyto", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{ 152: []string{ "nil", }, 156: []string{ "nil", }, 169: []string{ "err", }, }, }, &revel.MethodType{ Name: "GetCommentList", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int64)(nil))}, &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "limit", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 177: []string{ "list", "err", }, }, }, }) revel.RegisterController((*controllers.Label)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "GetList", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "limit", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 17: []string{ "list", "err", }, }, }, &revel.MethodType{ Name: "Like", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "ids", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 30: []string{ "isOk", "nil", }, }, }, }) revel.RegisterController((*controllers.Setting)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Notification", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "sid", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "mine", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "other", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 19: []string{ "true", "nil", }, }, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "std/data-service/std/app/models.(*Attach).Validate": { 22: "m.Size", 23: "m.Extention", 24: "m.Name", 26: "m.SavePath", 27: "m.SaveName", }, "std/data-service/std/app/models.(*Comment).Validate": { 19: "m.TopicId", 20: "m.Creator", 21: "m.Content", }, "std/data-service/std/app/models.(*Keyword).Validate": { 14: "m.Keyword", }, "std/data-service/std/app/models.(*Label).Validate": { 14: "m.Name", }, "std/data-service/std/app/models.(*LabelHasKeyword).Validate": { 14: "m.LabelId", 15: "m.KeywordId", }, "std/data-service/std/app/models.(*Like).Validate": { 21: "m.UserId", 22: "m.Type", 23: "m.TypeId", }, "std/data-service/std/app/models.(*Notification).Validate": { 15: "m.NoticeTo", 16: "m.Message", }, "std/data-service/std/app/models.(*Profile).Validate": { 40: "m.Id", 41: "m.Gender", 42: "m.Age", 43: "m.Lllness", }, "std/data-service/std/app/models.(*Session).Validate": { 24: "m.Session", }, "std/data-service/std/app/models.(*Subscribe).Validate": { 21: "m.UserId", 22: "m.Type", 23: "m.TypeId", 24: "m.Created", }, "std/data-service/std/app/models.(*Topic).Validate": { 23: "m.UserId", 24: "m.Content", }, "std/data-service/std/app/models.(*TopicHasKeyword).Validate": { 13: "m.TopicId", 14: "m.KeywordId", }, "std/data-service/std/app/models.(*User).Validate": { 32: "m.Username", 33: "m.Password", }, "std/data-service/std/app/models.(*UserBlocked).Validate": { 15: "m.UserId", 16: "m.Blocked", 17: "m.Created", }, "std/data-service/std/app/models.(*UserLikeKeywordRate).Validate": { 14: "m.UserId", 15: "m.KeywordId", 16: "m.Rate", }, "std/data-service/std/app/models.(*UserLoadedMaxTopic).Validate": { 13: "m.UserId", 14: "m.MaxTopicId", }, } revel.TestSuites = []interface{}{} revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 10: []string{}, }, }, }) revel.RegisterController((*controllers.Auth)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Callback", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Home)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 24: []string{}, }, }, }) revel.RegisterController((*controllers.Tasks)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "tag", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 24: []string{ "tasks", "username", "userimg", "tags", "tag", }, }, }, &revel.MethodType{ Name: "New", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "task", Type: reflect.TypeOf((*models.Task)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Complete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "complete", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Completed", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 59: []string{ "tasks", "username", "userimg", "tags", }, }, }, }) revel.RegisterController((*controllers0.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 46: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 69: []string{ "error", }, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{} revel.TestSuites = []interface{}{} revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.DatabaseController)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Begin", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Commit", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Rollback", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 46: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 69: []string{ "error", }, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Application)(nil), []*revel.MethodType{}) revel.RegisterController((*controllers.Home)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 31: []string{}, }, }, &revel.MethodType{ Name: "About", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 35: []string{}, }, }, &revel.MethodType{ Name: "Overview", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Profile)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 273: []string{ "account", }, }, }, &revel.MethodType{ Name: "Logon", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "History", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Stats", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Trends", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "product", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "calories", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Goal", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "calories", Type: reflect.TypeOf((*int64)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Weight", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "weight", Type: reflect.TypeOf((*float64)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "github.com/revolvingcow/grassfed/app/controllers.Profile.Add": { 409: "product", 410: "calories", }, "github.com/revolvingcow/grassfed/app/controllers.Profile.Logon": { 278: "id", }, } revel.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.BaseController)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Before", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Admin)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "ListUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "limit", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "offset", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 73: []string{ "users", "profiles", "depts", "pages", "userLevel", }, }, }, &revel.MethodType{ Name: "AddUser", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 85: []string{ "depts", "userLevel", "employmentType", }, }, }, &revel.MethodType{ Name: "DoAddUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "phone", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "phone1", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "position", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "department_id", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "employment_type", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "gender", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "level", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "is_leader", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "join_date", Type: reflect.TypeOf((*time.Time)(nil))}, &revel.MethodArg{Name: "birth_date", Type: reflect.TypeOf((*time.Time)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "EditUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 150: []string{ "user", "userProfiles", "depts", "isDepartmentLeader", "userLevel", "employmentType", }, }, }, &revel.MethodType{ Name: "DoEditUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "phone", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "phone1", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "position", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "department_id", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "employment_type", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "gender", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "level", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "is_leader", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "join_date", Type: reflect.TypeOf((*time.Time)(nil))}, &revel.MethodArg{Name: "birth_date", Type: reflect.TypeOf((*time.Time)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DelUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ListDepartment", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 223: []string{ "depts", "leaders", "nameMap", }, }, }, &revel.MethodType{ Name: "AddDepartment", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 231: []string{ "depts", }, }, }, &revel.MethodType{ Name: "DoAddDepartment", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "info", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "parent_id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "EditDepartment", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 276: []string{ "department", "depts", }, }, }, &revel.MethodType{ Name: "DoEditDepartment", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "info", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "parent_id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DelDepartment", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Import", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SetDepartmentLeader", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "ListLeave", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 24: []string{ "leaves", "leaveType", }, }, }, &revel.MethodType{ Name: "ViewLeave", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 62: []string{ "leave", "transfers", "transferUsers", "userProfile", "userLevel", "userGender", "dept", "employmentType", "leaveType", "hasLeaveTransfer", "leaveTransfer", }, }, }, &revel.MethodType{ Name: "AddLeave", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 68: []string{ "leaveType", }, }, }, &revel.MethodType{ Name: "DoAddLeave", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "reason", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "leave_type", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "startdate", Type: reflect.TypeOf((*time.Time)(nil))}, &revel.MethodArg{Name: "enddate", Type: reflect.TypeOf((*time.Time)(nil))}, &revel.MethodArg{Name: "address", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "onway_date", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CheckLeave", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 143: []string{ "transfers", "leaves", "userProfiles", "leaveType", }, }, }, &revel.MethodType{ Name: "ViewCheckDetail", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 185: []string{ "leave", "transfers", "transferUsers", "userProfile", "userLevel", "userGender", "dept", "employmentType", "leaveType", "leaveTransfer", }, }, }, &revel.MethodType{ Name: "DoCheckLeave", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "action", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "EditProfile", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 259: []string{ "user", "userProfiles", "dept", "employmentType", }, }, }, &revel.MethodType{ Name: "DoEditProfile", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "phone", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "phone1", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Auth)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Login", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 17: []string{}, }, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DoLogin", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Upload)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "DoUploadFile", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "github.com/baiyuxiong/lms/app/controllers.Admin.DoAddDepartment": { 236: "name", }, "github.com/baiyuxiong/lms/app/controllers.Admin.DoAddUser": { 90: "username", 91: "password", 92: "name", }, "github.com/baiyuxiong/lms/app/controllers.Admin.DoEditUser": { 155: "username", 156: "name", }, "github.com/baiyuxiong/lms/app/controllers.Auth.DoLogin": { 28: "username", 29: "password", }, } testing.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 24: []string{ "blogs", "recentCnt", }, }, }, &revel.MethodType{ Name: "WBlog", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 27: []string{}, }, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.WBlog)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Putup", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "blog", Type: reflect.TypeOf((**models.Blog)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "MyRevel/app/models.(*Blog).Validate": { 27: "blog.Title", 31: "blog.Email", 32: "blog.Email", 36: "blog.Subject", }, } testing.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 29: []string{ "home", "blogs", }, }, }, &revel.MethodType{ Name: "WBlog", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 35: []string{ "write", }, }, }, &revel.MethodType{ Name: "BlogInfor", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "rcnt", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 63: []string{ "blog", "rcnt", "comments", }, }, }, &revel.MethodType{ Name: "Message", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 78: []string{ "messagefun", "messages", }, }, }, &revel.MethodType{ Name: "History", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 97: []string{ "historyfun", "historys", }, }, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.WBlog)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Putup", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "blog", Type: reflect.TypeOf((**models.Blog)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.WComment)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Docomment", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "rcnt", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "comment", Type: reflect.TypeOf((**models.Comment)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.WMessage)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Putup", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "message", Type: reflect.TypeOf((**models.Message)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "myrevels/app/models.(*Blog).Validate": { 30: "blog.Title", 35: "blog.Email", 36: "blog.Email", 41: "blog.Subject", }, "myrevels/app/models.(*Comment).Validate": { 21: "comment.Email", 22: "comment.Email", 27: "comment.Content", }, "myrevels/app/models.(*Message).Validate": { 22: "message.Email", 23: "message.Email", 26: "message.QQ", 28: "message.Url", 32: "message.Content", }, } testing.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func buildApp(args []string) { if len(args) != 2 { fmt.Fprintf(os.Stderr, "%s\n%s", cmdBuild.UsageLine, cmdBuild.Long) return } appImportPath, destPath := args[0], args[1] if !revel.Initialized { revel.Init("", appImportPath, "") } // First, verify that it is either already empty or looks like a previous // build (to avoid clobbering anything) if exists(destPath) && !empty(destPath) && !exists(path.Join(destPath, "run.sh")) { errorf("Abort: %s exists and does not look like a build directory.", destPath) } os.RemoveAll(destPath) os.MkdirAll(destPath, 0777) app, reverr := harness.Build() panicOnError(reverr, "Failed to build") // Included are: // - run scripts // - binary // - revel // - app // Revel and the app are in a directory structure mirroring import path srcPath := path.Join(destPath, "src") destBinaryPath := path.Join(destPath, filepath.Base(app.BinaryPath)) tmpRevelPath := path.Join(srcPath, filepath.FromSlash(revel.REVEL_IMPORT_PATH)) mustCopyFile(destBinaryPath, app.BinaryPath) mustChmod(destBinaryPath, 0755) mustCopyDir(path.Join(tmpRevelPath, "conf"), path.Join(revel.RevelPath, "conf"), nil) mustCopyDir(path.Join(tmpRevelPath, "templates"), path.Join(revel.RevelPath, "templates"), nil) mustCopyDir(path.Join(srcPath, filepath.FromSlash(appImportPath)), revel.BasePath, nil) // Find all the modules used and copy them over. config := revel.Config.Raw() modulePaths := make(map[string]string) // import path => filesystem path for _, section := range config.Sections() { options, _ := config.SectionOptions(section) for _, key := range options { if !strings.HasPrefix(key, "module.") { continue } moduleImportPath, _ := config.String(section, key) if moduleImportPath == "" { continue } modulePath, err := revel.ResolveImportPath(moduleImportPath) if err != nil { revel.ERROR.Fatalln("Failed to load module %s: %s", key[len("module."):], err) } modulePaths[moduleImportPath] = modulePath } } for importPath, fsPath := range modulePaths { mustCopyDir(path.Join(srcPath, importPath), fsPath, nil) } tmplData, runShPath := map[string]interface{}{ "BinName": filepath.Base(app.BinaryPath), "ImportPath": appImportPath, }, path.Join(destPath, "run.sh") mustRenderTemplate( runShPath, filepath.Join(revel.RevelPath, "../cmd/revel", "package_run.sh.template"), tmplData) mustChmod(runShPath, 0755) mustRenderTemplate( filepath.Join(destPath, "run.bat"), filepath.Join(revel.RevelPath, "../cmd/revel", "package_run.bat.template"), tmplData) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*base.ApiBaseController)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "HandleBadRequestError", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "text", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "HandleNotFoundError", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "text", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "HandleInternalServerError", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "text", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*base.GorpController)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Begin", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Commit", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Rollback", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.JobController)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Detail", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "freelance_job/app/controllers.(*JobController).Detail": { 43: "id", }, "freelance_job/app/controllers.(*JobController).List": { 64: "page", }, } testing.TestSuites = []interface{}{ (*tests.JobTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 63: []string{ "title", }, }, }, &revel.MethodType{ Name: "Main", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 133: []string{ "title", "admin_info", "system_info", "panel_list", }, 135: []string{ "title", }, }, }, }) revel.RegisterController((*controllers0.Focus)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "focus", Type: reflect.TypeOf((**models.Focus)(nil))}, }, RenderArgNames: map[int][]string{ 50: []string{ "title", "focus_list", "Cate_list", "where", "pages", }, 54: []string{ "title", "focus_list", "Cate_list", "where", "pages", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "focus", Type: reflect.TypeOf((**models.Focus)(nil))}, }, RenderArgNames: map[int][]string{ 70: []string{ "title", "Cate_list", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "focus", Type: reflect.TypeOf((**models.Focus)(nil))}, }, RenderArgNames: map[int][]string{ 284: []string{ "title", "Cate_list", "focus_info", }, 286: []string{ "title", "Cate_list", }, }, }, }) revel.RegisterController((*controllers0.FocusCate)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "focusCate", Type: reflect.TypeOf((**models.FocusCate)(nil))}, }, RenderArgNames: map[int][]string{ 36: []string{ "title", "focusCate_list", "pages", }, 40: []string{ "title", "focusCate_list", "pages", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "focusCate", Type: reflect.TypeOf((**models.FocusCate)(nil))}, }, RenderArgNames: map[int][]string{ 53: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "focusCate", Type: reflect.TypeOf((**models.FocusCate)(nil))}, }, RenderArgNames: map[int][]string{ 122: []string{ "title", "focusCate_info", }, 124: []string{ "title", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "focusCate", Type: reflect.TypeOf((**models.FocusCate)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Category)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{ 40: []string{ "title", "categorys", }, 42: []string{ "title", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{ 64: []string{ "title", "categorys", "Id", }, 68: []string{ "title", "categorys", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{ 230: []string{ "title", "categorys", "category_info", }, 236: []string{ "title", "categorys", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Content)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 29: []string{ "title", }, }, }, &revel.MethodType{ Name: "Left", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 40: []string{ "title", "categorys", }, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 69: []string{ "title", "cid", "categorys", "article_list", "where", "pages", }, 73: []string{ "title", "cid", "categorys", "article_list", "where", "pages", }, }, }, &revel.MethodType{ Name: "Keywords", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CateNameSearch", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "category", Type: reflect.TypeOf((**models.Category)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Push", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 132: []string{ "title", }, }, }, &revel.MethodType{ Name: "Remove", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 142: []string{ "title", }, }, }, &revel.MethodType{ Name: "Comment", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 185: []string{ "title", }, }, }, &revel.MethodType{ Name: "Relationlist", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 214: []string{ "title", "cid", "category_info", "article_list", "pages", "where", }, }, }, &revel.MethodType{ Name: "AddContent", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 239: []string{ "title", "cid", "category_info", "article_info", }, 242: []string{ "title", "cid", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 359: []string{ "title", "cid", "category_info", "copyfrom_list", }, 362: []string{ "title", "cid", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "article", Type: reflect.TypeOf((**models.Article)(nil))}, }, RenderArgNames: map[int][]string{ 603: []string{ "title", "cid", "category_info", "article_info", "copyfrom_list", }, 606: []string{ "title", "cid", }, }, }, }) revel.RegisterController((*controllers1.Copyfrom)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "copyfrom", Type: reflect.TypeOf((**models.Copyfrom)(nil))}, }, RenderArgNames: map[int][]string{ 60: []string{ "title", "copyfrom_list", "sitedomain", "pages", }, 64: []string{ "title", "copyfrom_list", "sitedomain", "pages", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "copyfrom", Type: reflect.TypeOf((**models.Copyfrom)(nil))}, }, RenderArgNames: map[int][]string{ 76: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "copyfrom", Type: reflect.TypeOf((**models.Copyfrom)(nil))}, }, RenderArgNames: map[int][]string{ 223: []string{ "title", "copyfrom_info", "Id", }, 225: []string{ "title", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "copyfrom", Type: reflect.TypeOf((**models.Copyfrom)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.Extend)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 23: []string{ "title", }, }, }, }) revel.RegisterController((*controllers2.Announce)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "announce", Type: reflect.TypeOf((**models.Announce)(nil))}, }, RenderArgNames: map[int][]string{ 36: []string{ "title", "announce_list", "pages", }, 40: []string{ "title", "announce_list", "pages", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "announce", Type: reflect.TypeOf((**models.Announce)(nil))}, }, RenderArgNames: map[int][]string{ 52: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "announce", Type: reflect.TypeOf((**models.Announce)(nil))}, }, RenderArgNames: map[int][]string{ 152: []string{ "title", "announce_info", }, 154: []string{ "title", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "announce", Type: reflect.TypeOf((**models.Announce)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers2.Complaints)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "complaints", Type: reflect.TypeOf((**models.Complaints)(nil))}, }, RenderArgNames: map[int][]string{ 35: []string{ "title", "complaints_list", "pages", }, 38: []string{ "title", "complaints_list", "pages", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "complaints", Type: reflect.TypeOf((**models.Complaints)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers2.Module)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 23: []string{ "title", }, }, }, }) revel.RegisterController((*controllers3.Panel)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 23: []string{ "title", }, }, }, }) revel.RegisterController((*controllers4.Plugin)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 23: []string{ "title", }, }, }, }) revel.RegisterController((*controllers5.Test)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 38: []string{ "title", }, }, }, }) revel.RegisterController((*controllers5.Ajax)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "GetCaptcha", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Pos", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetPanel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin_panel", Type: reflect.TypeOf((**models.Admin_Panel)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DelPanel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin_panel", Type: reflect.TypeOf((**models.Admin_Panel)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "AddPanel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin_panel", Type: reflect.TypeOf((**models.Admin_Panel)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetMessage", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ScreenLock", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ScreenUnlock", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers5.Captcha)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetCaptchaId", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers5.Kindeditor)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Manager", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "upload", Type: reflect.TypeOf((**models.Upload)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "TitleImage", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "upload", Type: reflect.TypeOf((**models.Upload)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Upload", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "upload", Type: reflect.TypeOf((**models.Upload)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "AnnounceImage", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "upload", Type: reflect.TypeOf((**models.Upload)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers5.Public)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Map", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 38: []string{ "title", "map_html", }, 40: []string{ "title", }, }, }, &revel.MethodType{ Name: "CreateHtml", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 48: []string{}, }, }, &revel.MethodType{ Name: "Search", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 54: []string{}, }, }, &revel.MethodType{ Name: "Message", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 60: []string{}, }, }, }) revel.RegisterController((*controllers6.Admin)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 39: []string{ "title", "admin_list", "pages", }, 43: []string{ "title", "admin_list", "pages", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 58: []string{ "title", "role_list", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 223: []string{ "title", "admin_info", "role_list", }, 225: []string{ "title", "role_list", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers6.Logs)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "logs", Type: reflect.TypeOf((**models.Logs)(nil))}, }, RenderArgNames: map[int][]string{ 38: []string{ "title", "logs_list", "where", "pages", }, }, }, &revel.MethodType{ Name: "DelAll", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "logs", Type: reflect.TypeOf((**models.Logs)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers6.Menu)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 37: []string{ "title", "menus", }, 39: []string{ "title", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 69: []string{ "title", "menus", "Id", }, 71: []string{ "title", "Id", }, 86: []string{ "title", "menus", }, 88: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 223: []string{ "title", "menus", "menu_info", }, 225: []string{ "title", "menu_info", }, 242: []string{ "title", "menus", }, 244: []string{ "title", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers6.Role)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{ 36: []string{ "title", "role_list", "pages", }, 40: []string{ "title", "role_list", "pages", }, }, }, &revel.MethodType{ Name: "Member", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{ 71: []string{ "title", "admin_list", "pages", }, 75: []string{ "title", "admin_list", "pages", }, 79: []string{ "title", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{ 104: []string{ "title", "tree", }, 106: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{ 210: []string{ "title", "role_info", "tree", "Id", }, 212: []string{ "title", "role_info", "Id", }, 230: []string{ "title", "tree", }, 232: []string{ "title", }, }, }, &revel.MethodType{ Name: "SetStatus", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**models.Role)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers6.Setting)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 24: []string{ "title", }, }, }, }) revel.RegisterController((*controllers6.Task)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 27: []string{ "title", "entries", }, }, }, }) revel.RegisterController((*controllers7.Style)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{ 27: []string{ "title", "template_list", }, }, }, &revel.MethodType{ Name: "File", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{ 44: []string{ "title", "template_info", }, 46: []string{ "title", }, }, }, &revel.MethodType{ Name: "Import", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{ 59: []string{ "title", }, }, }, &revel.MethodType{ Name: "Setstatus", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "template", Type: reflect.TypeOf((**models.Template)(nil))}, }, RenderArgNames: map[int][]string{ 191: []string{ "title", "template_info", }, 193: []string{ "title", }, }, }, }) revel.RegisterController((*controllers8.Group)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user_group", Type: reflect.TypeOf((**models.User_Group)(nil))}, }, RenderArgNames: map[int][]string{ 28: []string{ "title", "group_list", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user_group", Type: reflect.TypeOf((**models.User_Group)(nil))}, }, RenderArgNames: map[int][]string{ 39: []string{ "title", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user_group", Type: reflect.TypeOf((**models.User_Group)(nil))}, }, RenderArgNames: map[int][]string{ 214: []string{ "title", "user_group_info", }, 216: []string{ "title", }, }, }, }) revel.RegisterController((*controllers8.User)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 46: []string{ "title", "user_list", "group_list", "pages", "where", }, }, }, &revel.MethodType{ Name: "Add", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 61: []string{ "title", "group_list", }, }, }, &revel.MethodType{ Name: "Edit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 254: []string{ "title", "id", "group_list", "user_info", }, 256: []string{ "title", "id", }, }, }, &revel.MethodType{ Name: "Delete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Lock", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Unlock", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Move", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UserInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**models.User)(nil))}, }, RenderArgNames: map[int][]string{ 517: []string{ "title", "id", "user_info", }, 519: []string{ "title", "id", }, }, }, &revel.MethodType{ Name: "Login", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 532: []string{ "title", "CaptchaId", }, }, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "EditInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 690: []string{ "title", "admin_info", }, 692: []string{ "title", }, }, }, &revel.MethodType{ Name: "AdminPanel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 780: []string{ "title", }, }, }, &revel.MethodType{ Name: "EditPwd", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((**models.Admin)(nil))}, }, RenderArgNames: map[int][]string{ 803: []string{ "title", "admin_info", }, 805: []string{ "title", }, }, }, &revel.MethodType{ Name: "Left", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "menu", Type: reflect.TypeOf((**models.Menu)(nil))}, }, RenderArgNames: map[int][]string{ 906: []string{ "title", "left_menu", }, 908: []string{ "title", }, 926: []string{ "title", "left_menu", }, 928: []string{ "title", }, }, }, }) revel.RegisterController((*controllers9.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers10.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers11.Jobs)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Status", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 25: []string{ "entries", }, }, }, }) revel.RegisterController((*controllers12.Pprof)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Profile", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Symbol", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Cmdline", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Trace", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "github.com/blackmady/NoneCMS/app/models.(*Admin).Validate": { 42: "a.Username", 43: "a.Username", 57: "a.Email", 58: "a.Email", 72: "a.Password", 73: "a.Password", }, "github.com/blackmady/NoneCMS/app/models.(*Menu).Validate": { 32: "menu.Name", 33: "menu.Name", 34: "menu.Pid", 35: "menu.Url", 36: "menu.Order", }, "github.com/blackmady/NoneCMS/app/models.(*Password).ValidatePassword": { 78: "P.Password", 79: "P.PasswordConfirm", 81: "P.Password", 82: "P.Password", }, } testing.TestSuites = []interface{}{} revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 60: []string{}, }, }, &revel.MethodType{ Name: "Login", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CurrentUser", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ListUsers", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "firstname", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "lastname", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "isadmin", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CreateUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "firstname", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "lastname", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "admin", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetDids", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CreateDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "value", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "comment", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "value", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "comment", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 253: []string{}, }, }, &revel.MethodType{ Name: "GetPeers", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CreatePeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "value", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "comment", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdatePeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "value", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "comment", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeletePeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 308: []string{}, }, }, &revel.MethodType{ Name: "EventStream", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "EventPoll", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Monthly)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "IncommingDidCallsForMonthDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "did", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsForMonthByDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsForMonthByMonthDays", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsForMonthByMonthDaysAndDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "did", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeersDatas", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerDatas", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "user", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingPeerDatasForMonthByMonthDays", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingPeerDatasForMonthByMonthDaysAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "OutgoingPeerDatasForMonthByMonthDays", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "OutgoingPeerDatasForMonthByMonthDaysAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetInDispositionByMonth", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetInDispositionByMonthAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetOutDispositionByMonth", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetOutDispositionByMonthAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetGlobalStatsByMonth", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetGlobalStatsByMonthAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Yearly)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "IncommingDidCallsForYearDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "did", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsForYearByDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeersDatas", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerDatas", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "user", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsByMonth", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsByMonthAndDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "did", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DidCallsDataByMonthForYear", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "tm", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DidCallsDataByMonthForYearAndDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "did", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tm", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeersInCallsByMonth", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeersInCallsByMonthAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeersOutCallsByMonth", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeersOutCallsByMonthAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerInCallsDataByMonthForYear", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "tm", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerInCallsDataByMonthForYearAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tm", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerOutCallsDataByMonthForYear", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "tm", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerOutCallsDataByMonthForYearAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tm", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetInDispositionByYear", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetInDispositionByYearAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetOutDispositionByYear", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetOutDispositionByYearAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetGlobalStatsByYear", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetGlobalStatsByYearAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Daily)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "IncommingCalls", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingCallsByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingCallsByDayUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "user", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsForDayDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "did", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsForDayByDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsByHourByDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingDidCallsByHourByDayAndDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "did", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DidGenStatsByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DidGenStatsByDayAndDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "did", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeersDatas", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerDatas", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "user", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingPeerGenStatsByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "IncommingPeerGenStatsByDayAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "OutgoingPeerGenStatsByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "OutgoingPeerGenStatsByDayAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DidGetWeekStatsByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DidGetWeekStatsByDayAndDid", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "did", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetIncallsWeekStatsByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetIncallsWeekStatsByDayAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetOutcallsWeekStatsByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetOutcallsWeekStatsByDayAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetInDispositionByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetInDispositionByDayAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetOutDispositionByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetOutDispositionByDayAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetGlobalStatsByDay", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "PeerGetGlobalStatsByDayAndPeer", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "day", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "peer", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "tmp", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Cdrs)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Cdrs", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CdrsWithDate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "start", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "end", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CdrDetails", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "uniqueid", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CdrWithParams", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "params", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 113: []string{}, 122: []string{}, }, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "revor/app/models.(*User).Validate": { 29: "user.Username", 37: "user.Username", }, "revor/app/models.ValidatePassword": { 45: "password", }, } revel.TestSuites = []interface{}{} revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.Super)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "ErrInputData", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "description", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ErrDataBase", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "description", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RenderJsonSuc", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RenderJsonErr", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Users)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 21: []string{ "users", }, }, }, &revel.MethodType{ Name: "Operate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "user", Type: reflect.TypeOf((*models.User)(nil))}, }, RenderArgNames: map[int][]string{ 30: []string{ "user", }, 32: []string{}, 37: []string{ "user", }, 45: []string{ "user", }, }, }, &revel.MethodType{ Name: "Del", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Agents)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 22: []string{ "agents", }, }, }, &revel.MethodType{ Name: "Operate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "agent", Type: reflect.TypeOf((*models.Agent)(nil))}, }, RenderArgNames: map[int][]string{ 31: []string{ "agent", }, 33: []string{}, 38: []string{ "agent", }, 47: []string{ "agent", }, }, }, &revel.MethodType{ Name: "Del", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SshList", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 67: []string{ "agents", }, }, }, &revel.MethodType{ Name: "SshOne", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "agentId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 75: []string{ "agent", }, }, }, &revel.MethodType{ Name: "SshJoin", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "agentId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 10: []string{}, }, }, }) revel.RegisterController((*controllers.Auth)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Login", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((*models.User)(nil))}, }, RenderArgNames: map[int][]string{ 22: []string{}, 25: []string{ "user", }, 35: []string{ "user", "loginMsg", }, }, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Cmds)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "agentId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 24: []string{ "cmds", }, }, }, &revel.MethodType{ Name: "Operate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "agentId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "cmd", Type: reflect.TypeOf((*models.Cmd)(nil))}, }, RenderArgNames: map[int][]string{ 33: []string{ "cmd", "agentId", }, 35: []string{ "agentId", }, 44: []string{ "cmd", "agentId", }, 52: []string{ "cmd", "agentId", }, }, }, &revel.MethodType{ Name: "Del", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Servers)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "serverId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 40: []string{ "servers", "jsonBody", "server", "admin", }, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 46: []string{ "servers", }, }, }, &revel.MethodType{ Name: "Operate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "server", Type: reflect.TypeOf((*models.Server)(nil))}, }, RenderArgNames: map[int][]string{ 55: []string{ "server", }, 57: []string{}, 62: []string{ "server", }, 71: []string{ "server", }, }, }, &revel.MethodType{ Name: "Del", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Active", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "serverId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "apiParamId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "apiParam", Type: reflect.TypeOf((*models.ApiParam)(nil))}, }, RenderArgNames: map[int][]string{ 96: []string{ "apiParam", "serverId", "apiParamId", }, }, }, &revel.MethodType{ Name: "Share", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "serverId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 141: []string{ "server", "jsonBody", }, }, }, &revel.MethodType{ Name: "Encode", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "serverId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "apiParamId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Info", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 160: []string{}, }, }, }) revel.RegisterController((*controllers.Tasks)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "GroupList", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 24: []string{ "taskGroups", }, }, }, &revel.MethodType{ Name: "GroupOperate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "taskGroup", Type: reflect.TypeOf((*models.TaskGroup)(nil))}, }, RenderArgNames: map[int][]string{ 33: []string{ "taskGroup", }, 35: []string{}, 40: []string{ "taskGroup", }, 49: []string{ "taskGroup", }, }, }, &revel.MethodType{ Name: "GroupDel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "TaskList", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "groupId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 77: []string{ "tasks", "taskLogs", }, }, }, &revel.MethodType{ Name: "TaskOperate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "task", Type: reflect.TypeOf((*models.Task)(nil))}, }, RenderArgNames: map[int][]string{ 87: []string{ "task", "group", }, 89: []string{ "group", }, 94: []string{ "task", "group", }, 103: []string{ "task", "group", }, }, }, &revel.MethodType{ Name: "TaskDel", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "TaskStart", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "TaskStop", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "TaskLog", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 168: []string{ "taskLog", "task", }, }, }, &revel.MethodType{ Name: "AjaxTaskLogList", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "pageSize", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Send", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "whale/app/models.(*Agent).Validate": { 39: "a.Host", 43: "a.Port", 47: "a.LoginName", 52: "a.Memo", }, "whale/app/models.(*Agent).ValidateInsert": { 59: "a.LoginPass", }, "whale/app/models.(*Agent).ValidateUpdate": { 67: "a.AgentId", }, "whale/app/models.(*Cmd).Validate": { 28: "c.AgentId", 32: "c.Shell", }, "whale/app/models.(*Cmd).ValidateUpdate": { 45: "c.CmdId", }, "whale/app/models.(*Server).Validate": { 32: "server.Theme", 37: "server.Content", }, "whale/app/models.(*Server).ValidateUpdate": { 48: "server.ServerId", }, "whale/app/models.(*Task).Validate": { 56: "t.TaskName", 59: "t.Command", }, "whale/app/models.(*TaskGroup).Validate": { 29: "tg.GroupName", 32: "tg.Description", }, "whale/app/models.(*User).Validate": { 68: "u.Username", 73: "u.Password", }, "whale/app/models.(*User).ValidateInsert": { 77: "u.Nickname", }, "whale/app/models.(*User).ValidateUpdate": { 85: "u.UserId", }, } testing.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.BaseCollection)(nil), []*revel.MethodType{}) revel.RegisterController((*controllers0.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.System)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Role", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 16: []string{}, }, }, &revel.MethodType{ Name: "GetRoleInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetRoleTreeJson", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "AddRole", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**modules.Role)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "EditRole", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "role", Type: reflect.TypeOf((**modules.Role)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RoleDelete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Dep", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 45: []string{}, }, }, &revel.MethodType{ Name: "DepTree", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DepTreeUsed", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DepInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DepInsert", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "dep", Type: reflect.TypeOf((**modules.Department)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DepEdit", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "dep", Type: reflect.TypeOf((**modules.Department)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DepDelete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UserSelect", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "key", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "depIds", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "pageIndex", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "pageSize", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UserInsert", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**modules.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UserUpdate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((**modules.User)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UserInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Module", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 106: []string{}, }, }, &revel.MethodType{ Name: "ModuleInsert", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "module", Type: reflect.TypeOf((**modules.Module)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ModuleUpdate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "module", Type: reflect.TypeOf((**modules.Module)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ModuleInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ModuleDelete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ModelTreeUsed", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ModelTree", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "FuncInsert", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "function", Type: reflect.TypeOf((**modules.Function)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "FuncUpdate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "function", Type: reflect.TypeOf((**modules.Function)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "FuncDelete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "FuncInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "FuncSelect", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleid", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RolePerModuleAdd", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "RoleID", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "RoleCode", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "ModuleID", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RolePerModuleDelete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RolePerFuncDelete", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*bson.ObjectId)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RoleModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "roleID", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "RoleFunc", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "roleID", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "moduleID", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 31: []string{}, }, }, &revel.MethodType{ Name: "Role", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 34: []string{}, }, }, }) revel.RegisterController((*controllers.Docker)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 16: []string{}, }, }, &revel.MethodType{ Name: "MachineAdd", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "machine", Type: reflect.TypeOf((**modules.Machine)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{} testing.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 31: []string{}, }, }, &revel.MethodType{ Name: "HandleQuery", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "query", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 81: []string{ "d", }, 88: []string{ "d", }, 90: []string{}, }, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "wordapp/app/controllers.App.HandleQuery": { 73: "query", }, } testing.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.BaseController)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "E404", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 46: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 69: []string{ "error", }, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Auth)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Login", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DoLogin", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Demo", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Register", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DoRegister", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "FindPassword", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DoFindPassword", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "FindPassword2", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "FindPasswordUpdate", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.File)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "UploadImage", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "renderHtml", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UploadBlogLogo", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UploadImageJson", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "renderHtml", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Index)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Suggestion", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "addr", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "suggestion", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Mobile)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Notebook)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebook", Type: reflect.TypeOf((*info.Notebook)(nil))}, &revel.MethodArg{Name: "i", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteNotebook", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "AddNotebook", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateNotebookTitle", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.NoteContentHistory)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "ListHistories", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Blog)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "SetNote2Blog", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "isBlog", Type: reflect.TypeOf((*bool)(nil))}, &revel.MethodArg{Name: "isTop", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SetNotebook2Blog", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "isBlog", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "userId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "View", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SearchBlog", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "userId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "key", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Set", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SetUserBlogBase", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "userBlog", Type: reflect.TypeOf((*info.UserBlogBase)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SetUserBlogComment", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "userBlog", Type: reflect.TypeOf((*info.UserBlogComment)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SetUserBlogStyle", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "userBlog", Type: reflect.TypeOf((*info.UserBlogStyle)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "AboutMe", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "userId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Note)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ListNotes", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ListTrashNotes", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetNoteContent", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateNoteOrContent", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteOrContent", Type: reflect.TypeOf((*controllers.NoteOrContent)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteNote", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "userId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "isShared", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteTrash", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "MoveNote", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CopyNote", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "CopySharedNote", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "fromUserId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SearchNote", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "key", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SearchNoteByTags", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "tags", Type: reflect.TypeOf((*[]string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Html2Image", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Oauth)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "GithubCallback", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "code", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Share)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "AddShareNote", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "emails", Type: reflect.TypeOf((*[]string)(nil))}, &revel.MethodArg{Name: "perm", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "AddShareNotebook", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "emails", Type: reflect.TypeOf((*[]string)(nil))}, &revel.MethodArg{Name: "perm", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ListShareNotes", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "userId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "GetShareNoteContent", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "sharedUserId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ListNoteShareUserInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ListNotebookShareUserInfo", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateShareNotePerm", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "perm", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "toUserId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateShareNotebookPerm", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "perm", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "toUserId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteShareNote", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "toUserId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteShareNotebook", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "toUserId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteShareNoteBySharedUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "fromUserId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteShareNotebookBySharedUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "fromUserId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "DeleteUserShareNoteAndNotebook", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "fromUserId", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.User)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "UpdateUsername", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdatePwd", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "oldPwd", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateTheme", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "theme", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "SendRegisterEmail", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "content", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "toEmail", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ReSendActiveEmail", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateEmailSendActiveEmail", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateEmail", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ActiveEmail", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "AddAccount", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateColumnWidth", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "notebookWidth", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "noteListWidth", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "UpdateLeftIsMin", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "leftIsMin", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{} revel.TestSuites = []interface{}{} revel.Run(*port) }
func testApp(args []string) { var err error if len(args) == 0 { errorf("No import path given.\nRun 'revel help test' for usage.\n") } mode := "dev" if len(args) >= 2 { mode = args[1] } // Find and parse app.conf revel.Init(mode, args[0], "") // Ensure that the testrunner is loaded in this mode. testRunnerFound := false for _, module := range revel.Modules { if module.ImportPath == revel.Config.StringDefault("module.testrunner", "github.com/revel/modules/testrunner") { testRunnerFound = true break } } if !testRunnerFound { errorf(`Error: The testrunner module is not running. You can add it to a run mode configuration with the following line: module.testrunner = github.com/revel/modules/testrunner `) } // Create a directory to hold the test result files. resultPath := path.Join(revel.BasePath, "test-results") if err = os.RemoveAll(resultPath); err != nil { errorf("Failed to remove test result directory %s: %s", resultPath, err) } if err = os.Mkdir(resultPath, 0777); err != nil { errorf("Failed to create test result directory %s: %s", resultPath, err) } // Direct all the output into a file in the test-results directory. file, err := os.OpenFile(path.Join(resultPath, "app.log"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) if err != nil { errorf("Failed to create log file: %s", err) } app, reverr := harness.Build() if reverr != nil { errorf("Error building: %s", reverr) } cmd := app.Cmd() cmd.Stderr = io.MultiWriter(cmd.Stderr, file) cmd.Stdout = io.MultiWriter(cmd.Stderr, file) // Start the app... if err := cmd.Start(); err != nil { errorf("%s", err) } defer cmd.Kill() revel.INFO.Printf("Testing %s (%s) in %s mode\n", revel.AppName, revel.ImportPath, mode) // Get a list of tests. // Since this is the first request to the server, retry/sleep a couple times // in case it hasn't finished starting up yet. var ( testSuites []controllers.TestSuiteDesc resp *http.Response baseUrl = fmt.Sprintf("http://127.0.0.1:%d", revel.HttpPort) ) for i := 0; ; i++ { if resp, err = http.Get(baseUrl + "/@tests.list"); err == nil { if resp.StatusCode == http.StatusOK { break } } if i < 3 { time.Sleep(3 * time.Second) continue } if err != nil { errorf("Failed to request test list: %s", err) } else { errorf("Failed to request test list: non-200 response") } } defer resp.Body.Close() json.NewDecoder(resp.Body).Decode(&testSuites) // If a specific TestSuite[.Method] is specified, only run that suite/test if len(args) == 3 { testSuites = filterTestSuites(testSuites, args[2]) } fmt.Printf("\n%d test suite%s to run.\n", len(testSuites), pluralize(len(testSuites), "", "s")) fmt.Println() // Load the result template, which we execute for each suite. module, _ := revel.ModuleByName("testrunner") TemplateLoader := revel.NewTemplateLoader([]string{path.Join(module.Path, "app", "views")}) if err := TemplateLoader.Refresh(); err != nil { errorf("Failed to compile templates: %s", err) } resultTemplate, err := TemplateLoader.Template("TestRunner/SuiteResult.html") if err != nil { errorf("Failed to load suite result template: %s", err) } // Run each suite. var ( overallSuccess = true failedResults []controllers.TestSuiteResult ) for _, suite := range testSuites { // Print the name of the suite we're running. name := suite.Name if len(name) > 22 { name = name[:19] + "..." } fmt.Printf("%-22s", name) // Run every test. startTime := time.Now() suiteResult := controllers.TestSuiteResult{Name: suite.Name, Passed: true} for _, test := range suite.Tests { testUrl := baseUrl + "/@tests/" + suite.Name + "/" + test.Name resp, err := http.Get(testUrl) if err != nil { errorf("Failed to fetch test result at url %s: %s", testUrl, err) } defer resp.Body.Close() var testResult controllers.TestResult json.NewDecoder(resp.Body).Decode(&testResult) if !testResult.Passed { suiteResult.Passed = false } suiteResult.Results = append(suiteResult.Results, testResult) } overallSuccess = overallSuccess && suiteResult.Passed // Print result. (Just PASSED or FAILED, and the time taken) suiteResultStr, suiteAlert := "PASSED", "" if !suiteResult.Passed { suiteResultStr, suiteAlert = "FAILED", "!" failedResults = append(failedResults, suiteResult) } fmt.Printf("%8s%3s%6ds\n", suiteResultStr, suiteAlert, int(time.Since(startTime).Seconds())) // Create the result HTML file. suiteResultFilename := path.Join(resultPath, fmt.Sprintf("%s.%s.html", suite.Name, strings.ToLower(suiteResultStr))) suiteResultFile, err := os.Create(suiteResultFilename) if err != nil { errorf("Failed to create result file %s: %s", suiteResultFilename, err) } if err = resultTemplate.Render(suiteResultFile, suiteResult); err != nil { errorf("Failed to render result template: %s", err) } } fmt.Println() if overallSuccess { writeResultFile(resultPath, "result.passed", "passed") fmt.Println("All Tests Passed.") } else { for _, failedResult := range failedResults { fmt.Printf("Failures:\n") for _, result := range failedResult.Results { if !result.Passed { fmt.Printf("%s.%s\n", failedResult.Name, result.Name) fmt.Printf("%s\n\n", result.ErrorSummary) } } } writeResultFile(resultPath, "result.failed", "failed") errorf("Some tests failed. See file://%s for results.", resultPath) } }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.App)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 13: []string{}, }, }, }) revel.RegisterController((*controllers.Company)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Show", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "companyID", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ShowByName", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "companyNm", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Users)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Show", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "userID", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers1.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.DefaultValidationKeys = map[string]map[int]string{} testing.TestSuites = []interface{}{ (*tests.AppTest)(nil), } revel.Run(*port) }
func main() { flag.Parse() revel.Init(*runMode, *importPath, *srcPath) revel.INFO.Println("Running revel server") revel.RegisterController((*controllers.GorpController)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Begin", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Commit", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Rollback", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers0.Jobs)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Status", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 25: []string{ "entries", }, }, }, }) revel.RegisterController((*controllers1.Static)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Serve", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ServeModule", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "moduleName", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "prefix", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "filepath", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers2.TestRunner)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 70: []string{ "testSuites", }, }, }, &revel.MethodType{ Name: "Run", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "suite", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "test", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{ 107: []string{}, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Application)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "AddUser", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 47: []string{}, }, }, &revel.MethodType{ Name: "Register", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 51: []string{}, }, }, &revel.MethodType{ Name: "SaveUser", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "user", Type: reflect.TypeOf((*models.HotelUser)(nil))}, &revel.MethodArg{Name: "verifyPassword", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Login", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "remember", Type: reflect.TypeOf((*bool)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Logout", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{}, }, }) revel.RegisterController((*controllers.Hotels)(nil), []*revel.MethodType{ &revel.MethodType{ Name: "Index", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 37: []string{ "bookings", }, }, }, &revel.MethodType{ Name: "List", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "search", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "size", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 58: []string{ "hotels", "search", "size", "page", "nextPage", }, }, }, &revel.MethodType{ Name: "Show", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 89: []string{ "title", "hotel", }, }, }, &revel.MethodType{ Name: "Settings", Args: []*revel.MethodArg{}, RenderArgNames: map[int][]string{ 93: []string{}, }, }, &revel.MethodType{ Name: "SaveSettings", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "password", Type: reflect.TypeOf((*string)(nil))}, &revel.MethodArg{Name: "verifyPassword", Type: reflect.TypeOf((*string)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "ConfirmBooking", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, &revel.MethodArg{Name: "booking", Type: reflect.TypeOf((*models.Booking)(nil))}, }, RenderArgNames: map[int][]string{ 144: []string{ "title", "hotel", "booking", }, }, }, &revel.MethodType{ Name: "CancelBooking", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{}, }, &revel.MethodType{ Name: "Book", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "id", Type: reflect.TypeOf((*int)(nil))}, }, RenderArgNames: map[int][]string{ 163: []string{ "title", "hotel", }, }, }, }) revel.DefaultValidationKeys = map[string]map[int]string{ "github.com/revel/samples/booking/app/controllers.Application.SaveUser": { 55: "verifyPassword", 56: "verifyPassword", }, "github.com/revel/samples/booking/app/controllers.Hotels.SaveSettings": { 98: "verifyPassword", 100: "verifyPassword", }, "github.com/revel/samples/booking/app/models.(*Hotel).Validate": { 19: "hotel.Name", 21: "hotel.Address", 26: "hotel.City", 32: "hotel.State", 38: "hotel.Zip", 44: "hotel.Country", }, "github.com/revel/samples/booking/app/models.(*User).Validate": { 28: "user.Username", 36: "user.Name", }, "github.com/revel/samples/booking/app/models.Booking.Validate": { 34: "booking.User", 35: "booking.Hotel", 36: "booking.CheckInDate", 37: "booking.CheckOutDate", 39: "booking.CardNumber", 46: "booking.NameOnCard", }, "github.com/revel/samples/booking/app/models.ValidatePassword": { 44: "password", }, } testing.TestSuites = []interface{}{ (*tests.ApplicationTest)(nil), } revel.Run(*port) }