Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More examples #81

Open
leobenkel opened this issue Dec 7, 2020 · 0 comments
Open

More examples #81

leobenkel opened this issue Dec 7, 2020 · 0 comments
Labels

Comments

@leobenkel
Copy link
Owner

leobenkel commented Dec 7, 2020

Write better example to illustrate good project structure.

user.scala - for each data type

case class User () {}

object User {
   def fetchFromSource: ZDS_R[Source, User] = ???
}

and transformations:

object Transformations {
    def transform(input: Dataset[A]): ZDS[B] = ???
}

and sources:

trait Sources {
    def getUser
}
object Sources {
  object Live extends Sources {
     def getUser = User.fetchFromSources
  }
}

in Application:

trait Application {
    def getSources: Sources
}

in main.scala:

object Main extends Application {
   override final lazy val getSources = Source.Live
}

in tests:

object TestApp extends Application {
      override final lazy val getSources = FakeDataSources
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant