diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/AuthenticationConfiguration.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/AuthenticationConfiguration.cs new file mode 100644 index 0000000..950feba --- /dev/null +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/AuthenticationConfiguration.cs @@ -0,0 +1,11 @@ +namespace Ringhel.Procesio.Action.Core.Models.Credentials.FTP +{ + public class AuthenticationConfiguration + { + public string UserName { get; set; } + public string Password { get; set; } + public string Key { get; set; } + public string KeyPassphrase { get; set; } + public string KeyUsername { get; set; } + } +} \ No newline at end of file diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPCredentialsConfiguration.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPCredentialsConfiguration.cs new file mode 100644 index 0000000..a3c4bb8 --- /dev/null +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPCredentialsConfiguration.cs @@ -0,0 +1,14 @@ +namespace Ringhel.Procesio.Action.Core.Models.Credentials.FTP +{ + public class FTPCredentialsConfiguration + { + public string Host { get; set; } + public int Port { get; set; } + public FtpClientTypes Protocol { get; set; } + public bool IgnoreCertificateWarnings { get; set; } + public string UserName { get; set; } + public string Password { get; set; } + public string Path { get; set; } + public AuthenticationConfiguration Authentication { get; set; } + } +} \ No newline at end of file diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPCredentialsManager.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPCredentialsManager.cs new file mode 100644 index 0000000..052f75b --- /dev/null +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPCredentialsManager.cs @@ -0,0 +1,9 @@ +namespace Ringhel.Procesio.Action.Core.Models.Credentials.FTP +{ + public class FTPCredentialsManager + { + public FTPCredentialsConfiguration CredentialsConfiguration { get; set; } + + public IFtpSftpClient Client { get; set; } + } +} \ No newline at end of file diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPFileTypes.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPFileTypes.cs new file mode 100644 index 0000000..96e427a --- /dev/null +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPFileTypes.cs @@ -0,0 +1,8 @@ +namespace Ringhel.Procesio.Action.Core.Models.Credentials.FTP +{ + public enum FTPFileTypes + { + Files = 1, + Folders = 2 + } +} diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPFilesInformations.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPFilesInformations.cs new file mode 100644 index 0000000..c569651 --- /dev/null +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FTPFilesInformations.cs @@ -0,0 +1,10 @@ +namespace Ringhel.Procesio.Action.Core.Models.Credentials.FTP +{ + public class FTPFilesInformations + { + public string Path { get; set; } + public string Name { get; set; } + public string Type { get; set; } + public long Size { get; set; } + } +} diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FtpClientTypes.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FtpClientTypes.cs new file mode 100644 index 0000000..edc05e3 --- /dev/null +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/FtpClientTypes.cs @@ -0,0 +1,12 @@ +namespace Ringhel.Procesio.Action.Core.Models.Credentials.FTP +{ + /// + /// There are 2 types of FTP clients, + /// can be FTP or SFTP + /// + public enum FtpClientTypes + { + FTP = 1, + SFTP = 2 + } +} \ No newline at end of file diff --git a/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/IFtpSftpClient.cs b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/IFtpSftpClient.cs new file mode 100644 index 0000000..e07769d --- /dev/null +++ b/Ringhel.Procesio.Action.Core/Models/Credentials/FTP/IFtpSftpClient.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Ringhel.Procesio.Action.Core.Models.Credentials.FTP +{ + public interface IFtpSftpClient + { + Task> ListFileNamesWithinFolder(string directoryPath, bool isRecursive, string type); + } +} diff --git a/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj b/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj index d47785e..0d6b6dc 100644 --- a/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj +++ b/Ringhel.Procesio.Action.Core/Ringhel.Procesio.Action.Core.csproj @@ -7,7 +7,7 @@ Ringhel Procesio https://github.com/PROCESIO/Action-Core.git - 1.13.0 + 1.13.1.1 Ringhel.Procesio.Action.Core Ringhel.Procesio.Action.Core Ringhel.Procesio.Action.Core