Dagger
Search

scp

Performs copying of files and directories to and from a remote server over SCP using password or IdentityFile.

Installation

dagger install github.com/seungyeop-lee/daggerverse/scp@v0.1.1

Entrypoint

Return Type
Scp
Example
func (m *myModule) example() *Scp  {
	return dag.
			Scp()
}
@function
def example() -> dag.Scp:
	return (
		dag.scp()
	)
@func()
example(): Scp {
	return dag
		.scp()
}

Types

Scp

SCP dagger module

config()

Set configuration for SCP connections.

Return Type
Config !
Arguments
NameTypeDefault ValueDescription
destinationString !-destination to connect ex) user@host
portInteger 22port to connect
Example
dagger -m github.com/seungyeop-lee/daggerverse/scp@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-password --arg env:MYSECRET \
 file-to-remote --source file:path
func (m *myModule) example(destination string) *ScpConfig  {
	return dag.
			Scp().
			Config(destination)
}
@function
def example(destination: str) -> dag.ScpConfig:
	return (
		dag.scp()
		.config(destination)
	)
@func()
example(destination: string): ScpConfig {
	return dag
		.scp()
		.config(destination)
}

Config

SCP configuration

withPassword()

Set the password as the SCP connection credentials.

Return Type
Commander !
Arguments
NameTypeDefault ValueDescription
argSecret !-password
Example
dagger -m github.com/seungyeop-lee/daggerverse/scp@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-password --arg env:MYSECRET \
 file-to-remote --source file:path
func (m *myModule) example(destination string, arg *Secret) *ScpCommander  {
	return dag.
			Scp().
			Config(destination).
			WithPassword(arg)
}
@function
def example(destination: str, arg: dagger.Secret) -> dag.ScpCommander:
	return (
		dag.scp()
		.config(destination)
		.with_password(arg)
	)
@func()
example(destination: string, arg: Secret): ScpCommander {
	return dag
		.scp()
		.config(destination)
		.withPassword(arg)
}

withIdentityFile()

Set up identity file with SCP connection credentials.

Return Type
Commander !
Arguments
NameTypeDefault ValueDescription
argSecret !-identity file
Example
dagger -m github.com/seungyeop-lee/daggerverse/scp@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-identity-file --arg env:MYSECRET \
 file-to-remote --source file:path
func (m *myModule) example(destination string, arg *Secret) *ScpCommander  {
	return dag.
			Scp().
			Config(destination).
			WithIdentityFile(arg)
}
@function
def example(destination: str, arg: dagger.Secret) -> dag.ScpCommander:
	return (
		dag.scp()
		.config(destination)
		.with_identity_file(arg)
	)
@func()
example(destination: string, arg: Secret): ScpCommander {
	return dag
		.scp()
		.config(destination)
		.withIdentityFile(arg)
}

Commander

SCP command launcher

fileToRemote()

Copy a file to a remote server.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceFile !-source file
targetString -destination path (If not entered, '.' is used as the default)
Example
dagger -m github.com/seungyeop-lee/daggerverse/scp@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-identity-file --arg env:MYSECRET \
 file-to-remote --source file:path
func (m *myModule) example(destination string, arg *Secret, source *File) *Container  {
	return dag.
			Scp().
			Config(destination).
			WithIdentityFile(arg).
			FileToRemote(source)
}
@function
def example(destination: str, arg: dagger.Secret, source: dagger.File) -> dagger.Container:
	return (
		dag.scp()
		.config(destination)
		.with_identity_file(arg)
		.file_to_remote(source)
	)
@func()
example(destination: string, arg: Secret, source: File): Container {
	return dag
		.scp()
		.config(destination)
		.withIdentityFile(arg)
		.fileToRemote(source)
}

fileFromRemote()

Copy a file from a remote server.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
sourceString !-source path
Example
dagger -m github.com/seungyeop-lee/daggerverse/scp@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-identity-file --arg env:MYSECRET \
 file-from-remote --source string
func (m *myModule) example(destination string, arg *Secret, source string) *File  {
	return dag.
			Scp().
			Config(destination).
			WithIdentityFile(arg).
			FileFromRemote(source)
}
@function
def example(destination: str, arg: dagger.Secret, source: str) -> dagger.File:
	return (
		dag.scp()
		.config(destination)
		.with_identity_file(arg)
		.file_from_remote(source)
	)
@func()
example(destination: string, arg: Secret, source: string): File {
	return dag
		.scp()
		.config(destination)
		.withIdentityFile(arg)
		.fileFromRemote(source)
}

directoryToRemote()

Copy a directory to a remote server.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-source directory
targetString !-destination path (If the path is an already existing directory, it will be copied to the '[path]/source-dir' location)
Example
dagger -m github.com/seungyeop-lee/daggerverse/scp@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-identity-file --arg env:MYSECRET \
 directory-to-remote --source DIR_PATH --target string
func (m *myModule) example(destination string, arg *Secret, source *Directory, target string) *Container  {
	return dag.
			Scp().
			Config(destination).
			WithIdentityFile(arg).
			DirectoryToRemote(source, target)
}
@function
def example(destination: str, arg: dagger.Secret, source: dagger.Directory, target: str) -> dagger.Container:
	return (
		dag.scp()
		.config(destination)
		.with_identity_file(arg)
		.directory_to_remote(source, target)
	)
@func()
example(destination: string, arg: Secret, source: Directory, target: string): Container {
	return dag
		.scp()
		.config(destination)
		.withIdentityFile(arg)
		.directoryToRemote(source, target)
}

directoryFromRemote()

Copy a directory from a remote server.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
sourceString !-source path
Example
dagger -m github.com/seungyeop-lee/daggerverse/scp@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-identity-file --arg env:MYSECRET \
 directory-from-remote --source string
func (m *myModule) example(destination string, arg *Secret, source string) *Directory  {
	return dag.
			Scp().
			Config(destination).
			WithIdentityFile(arg).
			DirectoryFromRemote(source)
}
@function
def example(destination: str, arg: dagger.Secret, source: str) -> dagger.Directory:
	return (
		dag.scp()
		.config(destination)
		.with_identity_file(arg)
		.directory_from_remote(source)
	)
@func()
example(destination: string, arg: Secret, source: string): Directory {
	return dag
		.scp()
		.config(destination)
		.withIdentityFile(arg)
		.directoryFromRemote(source)
}