コード例 #1
0
ファイル: company-routes.go プロジェクト: gregpechiro/cns
func CompanyRoutes(mux *web.Mux) {

	mux.Get("/:slug", companyLanding)
	mux.Get("/:slug/login", companyLogin)
	mux.Post("/:slug/login", postCompanyLogin)
	mux.Get("/:slug/logout", companyLogout)
	mux.Get("/:slug/register", companyRegister)
	mux.Post("/:slug/register", postCompanyRegister)

}
コード例 #2
0
ファイル: admin-routes.go プロジェクト: gregpechiro/cns
func AdminRoutes(mux *web.Mux) {

	mux.Get("/admin/home", AdminHome)

	mux.Get("/admin/employee", AdminEmployeeGetAll)
	mux.Get("/admin/employee/new", AdminEmployeeNew)
	mux.Post("/admin/employee/add", AdminEmployeeAdd)
	mux.Post("/admin/employee/edit", AdminEmployeeEdit)
	mux.Get("/admin/employee/:id", AdminEmployeeGetOne)
	mux.Post("/admin/employee/:id", AdminEmployeeDelete)

	mux.Get("/admin/company", AdminCompanyGetAll)
	mux.Get("/admin/company/new", AdminCompanyNew)
	mux.Post("/admin/company/add", AdminCompanyAdd)
	mux.Post("/admin/company/edit", AdminCompanyEdit)
	mux.Get("/admin/company/:id", AdminCompanyGetOne)
	mux.Post("/admin/company/:id", AdminCompanyDelete)
	mux.Post("/admin/company/upload/:id", AdminUploadCompanyLogo)

	mux.Get("/admin/company/:companyId/driver", AdminCompanyDriverGetAll)
	mux.Get("/admin/company/:companyId/driver/new", AdminCompanyDriverNew)
	mux.Post("/admin/company/:companyId/driver/add", AdminCompanyDriverAdd)
	mux.Post("/admin/company/:companyId/driver/edit", AdminCompanyDriverEdit)
	mux.Get("/admin/company/:companyId/driver/:driverId", AdminCompanyDriverGetOne)
	mux.Post("/admin/company/:companyId/driver/:driverId", AdminCompanyDriverDelete)

	mux.Get("/admin/company/:companyId/vehicle", AdminCompanyVehicleGetAll)
	mux.Post("/admin/company/:companyId/vehicle", AdminCompanyVehicleSave)
	mux.Get("/admin/company/:companyId/vehicle/new", AdminCompanyVehicleNew)
	mux.Get("/admin/company/:companyId/vehicle/:vehicleId", AdminCompanyVehicleGetOne)
	mux.Post("/admin/company/:companyId/vehicle/:vehicleId", AdminCompanyVehicleDelete)

	mux.Get("/admin/driver", AdminDriverGetAll)
	mux.Post("/admin/driver", AdminDriverSave)
	mux.Get("/admin/driver/:id", AdminDriverGetOne)
	mux.Post("/admin/driver/:id", AdminDriverDelete)

	mux.Get("/admin/vehicle", AdminVehicleGetAll)
	mux.Post("/admin/vehicle", AdminVehicleSave)
	mux.Get("/admin/vehicle/:id", AdminVehicleGetOne)
	mux.Post("/admin/vehicle/:id", AdminVehicleDelete)

	mux.Get("/admin/driver/:driverId/document", AdminDriverDocumentGetAll)
	mux.Post("/admin/driver/:driverId/document", AdminDriverDocumentAdd)
	mux.Post("/admin/driver/:driverId/document/save", AdminDriverDocumentSave)
	mux.Post("/admin/driver/:driverId/document/complete", AdminDriverDocumentComplete)
	mux.Get("/admin/driver/:driverId/document/:documentId", AdminDriverDocumentGetOne)
	mux.Post("/admin/driver/:driverId/document/:documentId", AdminDriverDocumentDelete)

}
コード例 #3
0
ファイル: admin-routes.go プロジェクト: gabewitmer/go-cns
func AdminRoutes(mux *web.Mux) {

	mux.Get("/admin/home", AdminHome)

	mux.Get("/admin/employee", AdminEmployeeGetAll)
	mux.Post("/admin/employee/add", AdminEmployeeAdd)
	mux.Post("/admin/employee/edit", AdminEmployeeEdit)
	mux.Get("/admin/employee/:id", AdminEmployeeGetOne)
	mux.Post("/admin/employee/:id", AdminEmployeeDelete)

	mux.Get("/admin/company", AdminCompanyGetAll)
	mux.Post("/admin/company", AdminCompanySave)
	mux.Get("/admin/company/:id", AdminCompanyGetOne)
	mux.Post("/admin/company/:id", AdminCompanyDelete)
	mux.Post("/admin/company/upload/:id", AdminUploadCompanyLogo)

	mux.Get("/admin/company/:companyId/driver", AdminCompanyDriverGetAll)
	mux.Post("/admin/company/:companyId/driver/add", AdminCompanyDriverAdd)
	mux.Post("/admin/company/:companyId/driver/edit", AdminCompanyDriverEdit)
	mux.Get("/admin/company/:companyId/driver/:driverId", AdminCompanyDriverGetOne)
	mux.Post("/admin/company/:companyId/driver/:driverId", AdminCompanyDriverDelete)

	mux.Get("/admin/company/:companyId/vehicle", AdminCompanyVehicleGetAll)
	mux.Post("/admin/company/:companyId/vehicle", AdminCompanyVehicleSave)
	mux.Get("/admin/company/:companyId/vehicle/:vehicleId", AdminCompanyVehicleGetOne)
	mux.Post("/admin/company/:companyId/vehicle/:vehicleId", AdminCompanyVehicleDelete)

	mux.Get("/admin/driver", AdminDriverGetAll)
	mux.Post("/admin/driver", AdminDriverSave)
	mux.Get("/admin/driver/:id", AdminDriverGetOne)
	mux.Post("/admin/driver/:id", AdminDriverDelete)

	mux.Get("/admin/vehicle", AdminVehicleGetAll)
	mux.Post("/admin/vehicle", AdminVehicleSave)
	mux.Get("/admin/vehicle", AdminVehicleGetOne)
	mux.Post("/admin/vehicle", AdminVehicleDelete)
}