-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement FTP and SFTP configurations
- Loading branch information
1 parent
9fd33fe
commit 3b11ac4
Showing
4 changed files
with
212 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
"""JSON Schema for each filesystem configuration.""" | ||
|
||
from __future__ import annotations | ||
|
||
from singer_sdk import typing as th # JSON schema typing helpers | ||
|
||
FTP = th.Property( | ||
"ftp", | ||
th.ObjectType( | ||
th.Property( | ||
"host", | ||
th.StringType, | ||
required=True, | ||
description="FTP server host", | ||
), | ||
th.Property( | ||
"port", | ||
th.IntegerType, | ||
default=21, | ||
description="FTP server port", | ||
), | ||
th.Property( | ||
"username", | ||
th.StringType, | ||
description="FTP username", | ||
), | ||
th.Property( | ||
"password", | ||
th.StringType, | ||
secret=True, | ||
description="FTP password", | ||
), | ||
th.Property( | ||
"timeout", | ||
th.IntegerType, | ||
default=60, | ||
description="Timeout of the FTP connection in seconds", | ||
), | ||
th.Property( | ||
"encoding", | ||
th.StringType, | ||
default="utf-8", | ||
description="FTP server encoding", | ||
), | ||
), | ||
description="FTP connection settings", | ||
) | ||
|
||
|
||
SFTP = th.Property( | ||
"sftp", | ||
th.ObjectType( | ||
th.Property( | ||
"host", | ||
th.StringType, | ||
required=True, | ||
description="SFTP server host", | ||
), | ||
th.Property( | ||
"ssh_kwargs", | ||
th.ObjectType( | ||
th.Property( | ||
"port", | ||
th.IntegerType, | ||
default=22, | ||
description="SFTP server port", | ||
), | ||
th.Property( | ||
"username", | ||
th.StringType, | ||
required=True, | ||
description="SFTP username", | ||
), | ||
th.Property( | ||
"password", | ||
th.StringType, | ||
secret=True, | ||
description="SFTP password", | ||
), | ||
th.Property( | ||
"pkey", | ||
th.StringType, | ||
secret=True, | ||
description="Private key", | ||
), | ||
th.Property( | ||
"timeout", | ||
th.IntegerType, | ||
default=60, | ||
description="Timeout of the SFTP connection in seconds", | ||
), | ||
), | ||
description="SSH connection settings", | ||
), | ||
), | ||
description="SFTP connection settings", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters