sftp

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source downloads CSV/JSON files from a remote SFTP directory and loads them into the staging database using the same table conventions as the local source. Authentication is done with an SSH private key file.

func New

func New(name, host string, port int, username, keyFile, remoteDir string, delimiter rune, jsonOptions map[string]local.JSONFileConfig, log zerolog.Logger) *Source

func (*Source) Load

func (s *Source) Load(ctx context.Context, db *sqlx.DB) error

func (*Source) SetFileWriter

func (s *Source) SetFileWriter(w source.FileWriter)

SetFileWriter configures file-based staging output alongside the database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址