transferinstall

package
v2.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFiles

func CopyFiles(src string, pluginDir string, bundle PluginFiles) (err error)

Copy the plugin files from the given source to the target directory (create path if needed or override existing files)

func DownloadFiles

func DownloadFiles(src string, pluginDir string, bundle PluginFiles) (err error)

Download the plugin files from the given url to the target directory (create path if needed or override existing files)

Types

type FileItem

type FileItem []string

Represents a path to file/directory We represent file 'dir/dir2/file' as FileItem{"dir", "dir2", "file"} We represent directory 'dir/dir2/' as FileItem{"dir", "dir2"}

func (*FileItem) Dirs

func (f *FileItem) Dirs() *FileItem

Get the directory FileItem representation of the item, removing the last componenet and ignoring empty entries. i.e. for FileItem{"root", "", "dir", "file.ext"} -> FileItem{"root", "dir"}

func (*FileItem) Name

func (f *FileItem) Name() string

Get the name (last) componenet of the item i.e. for FileItem{"root", "", "dir", "file.ext"} -> "file.ext"

func (*FileItem) SplitNameAndDirs

func (f *FileItem) SplitNameAndDirs() (string, *FileItem)

Split and get the name and directory componenets of the item

type InstallDataTransferPluginCommand

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

func NewInstallDataTransferCommand

func NewInstallDataTransferCommand(server *config.ServerDetails) *InstallDataTransferPluginCommand

Create InstallDataTransferCommand

func (*InstallDataTransferPluginCommand) CommandName

func (idtp *InstallDataTransferPluginCommand) CommandName() string

func (*InstallDataTransferPluginCommand) Run

func (idtp *InstallDataTransferPluginCommand) Run() (err error)

func (*InstallDataTransferPluginCommand) ServerDetails

func (idtp *InstallDataTransferPluginCommand) ServerDetails() (*config.ServerDetails, error)

func (*InstallDataTransferPluginCommand) SetInstallVersion

func (idtp *InstallDataTransferPluginCommand) SetInstallVersion(installVersion *version.Version) *InstallDataTransferPluginCommand

Set the plugin version we want to download

func (*InstallDataTransferPluginCommand) SetJFrogHomePath

Set the Jfrog home directory path

func (*InstallDataTransferPluginCommand) SetLocalPluginFiles

func (idtp *InstallDataTransferPluginCommand) SetLocalPluginFiles(localDir string) *InstallDataTransferPluginCommand

Set the local file system directory path that the plugin files will be copied from

type PluginFiles

type PluginFiles []FileItem

List of files represented as FileItem

type PluginInstallManager

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

PluginInstallManager holds all the plugin files and optional plugin directory destinations. We construct the destination path by searching for the existing plugin directory destination from the options and joining the local path of the plugin file with the plugin directory

func NewArtifactoryPluginInstallManager

func NewArtifactoryPluginInstallManager(bundle PluginFiles) *PluginInstallManager

Creates a new Artifactory plugin installation manager

type TransferAction

type TransferAction func(src string, dst string, bundle PluginFiles) error

Transfers the file bundle from src to dst

Jump to

Keyboard shortcuts

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