diff options
author | Jean Helou <jhe@codamens.fr> | 2019-02-11 22:24:14 +0100 |
---|---|---|
committer | Tobias Roeser <le.petit.fou@web.de> | 2019-02-14 17:45:16 +0100 |
commit | 0c879ca73b17769a6982d2b932ac21dcd5e1d98f (patch) | |
tree | 0f7647dcc64eba86dc0e0e9a7123b6f379fdc7c9 /contrib/playlib/api/src/RouteCompilerWorkerApi.scala | |
parent | 3fe65a95534aaafb6ce60ac387f45171929f26b5 (diff) | |
download | mill-0c879ca73b17769a6982d2b932ac21dcd5e1d98f.tar.gz mill-0c879ca73b17769a6982d2b932ac21dcd5e1d98f.tar.bz2 mill-0c879ca73b17769a6982d2b932ac21dcd5e1d98f.zip |
Adds the api submodule
This is the second commit of a redesign of the play lib module.
This module contains only the common `api` which is implemented by the
actual workers. It also defines a specific ADT to configure the type of
routes generator to be used for the project. The ADT feels cleaner than
a simple string but may be too restrictive.
Diffstat (limited to 'contrib/playlib/api/src/RouteCompilerWorkerApi.scala')
-rw-r--r-- | contrib/playlib/api/src/RouteCompilerWorkerApi.scala | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/playlib/api/src/RouteCompilerWorkerApi.scala b/contrib/playlib/api/src/RouteCompilerWorkerApi.scala new file mode 100644 index 00000000..0467b774 --- /dev/null +++ b/contrib/playlib/api/src/RouteCompilerWorkerApi.scala @@ -0,0 +1,26 @@ +package mill +package playlib +package api + +import ammonite.ops.Path +import mill.api.Result +import mill.scalalib.api.CompilationResult + + +trait RouteCompilerWorkerApi { + def compile(file: Path, + additionalImports: Seq[String], + forwardsRouter: Boolean, + reverseRouter: Boolean, + namespaceReverseRouter: Boolean, + generatorType:RouteCompilerType, + dest: Path)(implicit ctx: mill.api.Ctx):Result[CompilationResult] + + +} + +sealed trait RouteCompilerType +object RouteCompilerType{ + case object InjectedGenerator extends RouteCompilerType + case object StaticGenerator extends RouteCompilerType +}
\ No newline at end of file |