Documentation ¶
Index ¶
Constants ¶
View Source
const ( //RemoteImportPath - path to place the temporary remote import files when uploaded RemoteImportPath string = "/tmp/archive.backup" )
Variables ¶
This section is empty.
Functions ¶
func SafeCreate ¶
SafeCreate creates a file, creating parent directories if needed
Types ¶
type RemoteOperations ¶
type RemoteOperations struct {
// contains filtered or unexported fields
}
RemoteOperations - an object which allows us to execute operations on a remote system
func NewRemoteOperations ¶
func NewRemoteOperations(sshCfg command.SshConfig) *RemoteOperations
NewRemoteOperations - a constructor for a remoteoperations object
func (*RemoteOperations) GetRemoteFile ¶
func (s *RemoteOperations) GetRemoteFile() (rfile io.WriteCloser, err error)
GetRemoteFile - get a file from a remote system and return a writecloser to it
func (*RemoteOperations) Path ¶
func (s *RemoteOperations) Path() string
Path - allows us to get the path of the remote upload
func (*RemoteOperations) SetPath ¶
func (s *RemoteOperations) SetPath(p string)
SetPath - allows us to set the remote path of the upload
func (*RemoteOperations) UploadFile ¶
func (s *RemoteOperations) UploadFile(lfile io.Reader) (err error)
UploadFile - allows us to upload the contents of the given reader
Click to show internal directories.
Click to hide internal directories.