當前位置: 首頁>>代碼示例>>Golang>>正文


Golang revel.Run函數代碼示例

本文整理匯總了Golang中github.com/revel/revel.Run函數的典型用法代碼示例。如果您正苦於以下問題:Golang Run函數的具體用法?Golang Run怎麽用?Golang Run使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了Run函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: main

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)
}
開發者ID:ahyswang,項目名稱:starway,代碼行數:42,代碼來源:main.go

示例2: main

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",
//.........這裏部分代碼省略.........
開發者ID:xeb,項目名稱:flowdle,代碼行數:101,代碼來源:main.go

示例3: main

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{
//.........這裏部分代碼省略.........
開發者ID:inoue2302,項目名稱:freelance_job,代碼行數:101,代碼來源:main.go

示例4: main

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{
//.........這裏部分代碼省略.........
開發者ID:JREAMLU,項目名稱:GoCMS,代碼行數:101,代碼來源:main.go

示例5: main

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{},
//.........這裏部分代碼省略.........
開發者ID:HyperVendy,項目名稱:HyperReplay-Replay-Experimental,代碼行數:101,代碼來源:main.go

示例6: main

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)
}
開發者ID:chqsark,項目名稱:word2vec-revel,代碼行數:91,代碼來源:main.go

示例7: main

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{},
//.........這裏部分代碼省略.........
開發者ID:praveen-vakilsearch,項目名稱:go-praveen,代碼行數:101,代碼來源:main.go

示例8: main

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{},
			},
//.........這裏部分代碼省略.........
開發者ID:karesti,項目名稱:cm-voting,代碼行數:101,代碼來源:main.go

示例9: main

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{},
			},
		})
//.........這裏部分代碼省略.........
開發者ID:revolvingcow,項目名稱:grassfed,代碼行數:101,代碼來源:main.go

示例10: main

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))},
//.........這裏部分代碼省略.........
開發者ID:baiyuxiong,項目名稱:lms,代碼行數:101,代碼來源:main.go

示例11: main

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)
}
開發者ID:call-fold,項目名稱:Revel_Blog,代碼行數:100,代碼來源:main.go

示例12: main

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{
//.........這裏部分代碼省略.........
開發者ID:nangong92t,項目名稱:go_src,代碼行數:101,代碼來源:main.go

示例13: main

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{
//.........這裏部分代碼省略.........
開發者ID:11101171,項目名稱:whale,代碼行數:101,代碼來源:main.go

示例14: main

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))},
				},
//.........這裏部分代碼省略.........
開發者ID:phillihq,項目名稱:myrevels,代碼行數:101,代碼來源:main.go

示例15: main

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{
//.........這裏部分代碼省略.........
開發者ID:blackmady,項目名稱:GoCMS,代碼行數:101,代碼來源:main.go


注:本文中的github.com/revel/revel.Run函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。