-
Notifications
You must be signed in to change notification settings - Fork 19
WIP: Add FtpConnector #105
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # build.sbt # connectors/ftp-connector/src/main/scala/zio/connect/ftp/FtpConnector.scala # connectors/ftp-connector/src/main/scala/zio/connect/ftp/LiveFtpConnector.scala # connectors/ftp-connector/src/test/scala/zio/connect/ftp/FtpConnectorSpec.scala # connectors/ftp-connector/src/test/scala/zio/connect/ftp/LiveFtpConnectorSpec.scala
FtpDependencies.testContainersScala, | ||
`zio`, | ||
`zio-streams`, | ||
`zio-prelude`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move zio-prelude to FtpDependencies please. While it's an RC version I would like to avoid putting it in the core dependencies.
|
||
def lsDescendant(path: => PathName): ZStream[Any, IOException, FtpResource] | ||
|
||
def readFile(path: => PathName, chunkSize: Int = 2048)(implicit trace: Trace): ZStream[Any, IOException, Byte] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def readFile(path: => PathName, chunkSize: Int = 2048)(implicit trace: Trace): ZStream[Any, IOException, Byte] | |
def readFile(path: => PathName, chunkSize: => Int = 2048)(implicit trace: Trace): ZStream[Any, IOException, Byte] |
|
||
import java.io.IOException | ||
|
||
trait FtpConnector { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ordered alphabetically
|
||
import java.io.IOException | ||
|
||
trait FtpConnectorSpec extends ZIOSpecDefault { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suites should be ordered alphabetically in implementation and in the composed result
zio.connect.ftp.ftpConnectorLiveLayer | ||
) | ||
|
||
val ftpContainer: ZLayer[Scope, Throwable, FixedHostPortGenericContainer] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val ftpContainer: ZLayer[Scope, Throwable, FixedHostPortGenericContainer] = | |
val ftpContainer: ZLayer[Any, Throwable, FixedHostPortGenericContainer] = |
) | ||
|
||
val ftpContainer: ZLayer[Scope, Throwable, FixedHostPortGenericContainer] = | ||
ZLayer.fromZIO( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZLayer.fromZIO( | |
ZLayer.scoped( |
})(f => ZIO.attempt(f.stop()).orDie) | ||
) | ||
|
||
lazy val ftpLayer: ZLayer[Scope & FixedHostPortGenericContainer, ConnectionError, Ftp] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lazy val ftpLayer: ZLayer[Scope & FixedHostPortGenericContainer, ConnectionError, Ftp] = | |
lazy val ftpLayer: ZLayer[FixedHostPortGenericContainer, ConnectionError, Ftp] = |
|
||
lazy val ftpLayer: ZLayer[Scope & FixedHostPortGenericContainer, ConnectionError, Ftp] = | ||
ZLayer | ||
.fromZIO ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.fromZIO ( | |
.scoped ( |
val zio = "dev.zio" %% "zio" % zioVersion | ||
val `zio-streams` = "dev.zio" %% "zio-streams" % zioVersion | ||
val `zio-prelude` = "dev.zio" %% "zio-prelude" % zioPreludeVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be moved to the ftp dependencies. While it's RC I would like to keep it out of core dependencies.
@@ -0,0 +1,16 @@ | |||
import sbt._ | |||
|
|||
object FtpDependencies { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs ordering
PR for #80