storage

package
v0.0.0-...-1d26606 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupConnections

func CleanupConnections() error

CleanupConnections should be called when MIDA exits to ensure that any existing connections to remote hosts or databases are closed gracefully

func CleanupTask

func CleanupTask(fr *b.FinalResult) error

CleanupTask handles deleting temporary files created as tasks are processed. It should only be called once results have been totally stored.

func DirNameFromURL

func DirNameFromURL(s string) (string, error)

DirNameFromURL takes a URL and sanitizes/escapes it so it can safely be used as a filename

func Local

func Local(finalResult *b.FinalResult, dataSettings *b.DataSettings, outPath string) error

Local stores the results of a site visit locally, returning the path to the results along with an error

func Sftp

func Sftp(r *b.FinalResult) error

func StoreAll

func StoreAll(finalResult *b.FinalResult) error

func StoreResultsSSH

func StoreResultsSSH(r *b.FinalResult, activeConn *SftpConn, remotePath string) error

Types

type ConnInfo

type ConnInfo struct {
	sync.Mutex
	SSHConnInfo map[string]*SftpConn
}

type SftpConn

type SftpConn struct {
	sync.Mutex
	Client *ssh.Client
}

type SftpParams

type SftpParams struct {
	User           string
	PrivateKeyFile string
	Host           string
	Port           int
	Path           string
}

Jump to

Keyboard shortcuts

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