diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-07-25 16:17:50 +0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-07-25 16:30:07 +0800 |
commit | c4476471f4ff4b38c518b5478996bc178a129e6b (patch) | |
tree | 63078ea3da9b866bd1edab7a6a4db2a9c9f13ab1 /cask/src/cask/package.scala | |
parent | 603dfa8946f8c78580568613cd268ad05c6c38f6 (diff) | |
download | cask-c4476471f4ff4b38c518b5478996bc178a129e6b.tar.gz cask-c4476471f4ff4b38c518b5478996bc178a129e6b.tar.bz2 cask-c4476471f4ff4b38c518b5478996bc178a129e6b.zip |
Split up `cask` package into subpackages
Diffstat (limited to 'cask/src/cask/package.scala')
-rw-r--r-- | cask/src/cask/package.scala | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/cask/src/cask/package.scala b/cask/src/cask/package.scala index f46dc8d..fddb1e0 100644 --- a/cask/src/cask/package.scala +++ b/cask/src/cask/package.scala @@ -1,11 +1,30 @@ package object cask { - def redirect(url: String) = Response( - "", - 301, - headers = Seq("Location" -> url) - ) - def abort(code: Int) = Response( - "", - code - ) + // model + type Response = model.Response + val Response = model.Response + type Abort = model.Abort + val Abort = model.Abort + type Redirect = model.Redirect + val Redirect = model.Redirect + type FormValue = model.FormValue + val FormValue = model.FormValue + type Cookie = model.Cookie + val Cookie = model.Cookie + type Cookies = model.Cookies + type Subpath = model.Subpath + + // endpoints + type get = endpoints.get + type post = endpoints.post + type put = endpoints.put + type route = endpoints.route + type static = endpoints.static + type postJson = endpoints.postJson + type postForm = endpoints.postForm + + // main + type MainRoutes = main.MainRoutes + type Routes = main.Routes + type Main = main.Main + } |