commons

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: BSD-3-Clause Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBundleFileNumDefault  int   = 50
	MaxBundleFileSizeDefault int64 = 2 * 1024 * 1024 * 1024 // 2GB
	MinBundleFileNumDefault  int   = 3
)

default values

View Source
const (
	BundleTaskNameRemoveFilesAndMakeDirs string = "Cleaning & making dirs"
	BundleTaskNameTar                    string = "Bundling"
	BundleTaskNameUpload                 string = "Uploading"
	BundleTaskNameExtract                string = "Extracting"
)
View Source
const (
	ClientProgramName          string                     = "gocommands"
	FilesystemTimeout          irodsclient_types.Duration = irodsclient_types.Duration(10 * time.Minute)
	TransferThreadNumDefault   int                        = 5
	UploadThreadNumMax         int                        = 20
	TCPBufferSizeDefault       int                        = 1 * 1024 * 1024
	TCPBufferSizeStringDefault string                     = "1MB"
	RedirectToResourceMinSize  int64                      = 1024 * 1024 * 1024 // 1GB
)
View Source
const (
	PgpEncryptedFileExtension string = ".pgp.enc"

	PgpSalt string = "4e2f34041d564ed8"
)
View Source
const (
	SshEncryptedFileExtension string = ".rsaaesctr.enc"
	SshRsaAesCtrHeader        string = "rsaaesctr......."
)
View Source
const (
	WinSCPEncryptedFileExtension string = ".aesctr.enc"

	WinSCPAesCtrHeader string = "aesctr.........."
)
View Source
const (
	KiloBytes int64 = 1024
	MegaBytes int64 = KiloBytes * 1024
	GigaBytes int64 = MegaBytes * 1024
	TeraBytes int64 = GigaBytes * 1024

	Minute int = 60
	Hour   int = Minute * 60
	Day    int = Hour * 24
)
View Source
const (
	AesSaltLen int = 16
)

Variables

This section is empty.

Functions

func CheckNewRelease added in v0.6.2

func CheckNewRelease() (*selfupdate.Release, error)

func CleanUpOldIRODSBundles added in v0.5.7

func CleanUpOldIRODSBundles(fs *irodsclient_fs.FileSystem, stagingPath string, removeDir bool, force bool) error

func CleanUpOldLocalBundles added in v0.5.7

func CleanUpOldLocalBundles(localTempDirPath string, force bool)

func DecodePrivateKey added in v0.9.4

func DecodePrivateKey(privatekeyPath string) (*rsa.PrivateKey, error)

func DecodePublicKey added in v0.9.4

func DecodePublicKey(publickeyPath string) (*rsa.PublicKey, error)

func DecodePublicPrivateKey added in v0.9.4

func DecodePublicPrivateKey(keyPath string) (interface{}, error)

DecodePublicPrivateKey decodes public or private key

func DecryptAESCTR added in v0.9.4

func DecryptAESCTR(data []byte, salt []byte, key []byte) ([]byte, error)

func DecryptAESCTRReaderWriter added in v0.9.4

func DecryptAESCTRReaderWriter(reader io.Reader, writer io.Writer, salt []byte, key []byte) error

func DecryptFilePGP added in v0.9.4

func DecryptFilePGP(source string, target string, key []byte) error

func DecryptFileSSH added in v0.9.4

func DecryptFileSSH(source string, target string, privatekey *rsa.PrivateKey) error

func DecryptFileWinSCP added in v0.9.4

func DecryptFileWinSCP(source string, target string, key []byte) error

func DecryptFilenamePGP added in v0.9.4

func DecryptFilenamePGP(filename string) string

func DecryptFilenameSSH added in v0.9.4

func DecryptFilenameSSH(filename string, privatekey *rsa.PrivateKey) (string, error)

func DecryptFilenameWinSCP added in v0.9.4

func DecryptFilenameWinSCP(filename string, key []byte) (string, error)

func EncryptAESCTR added in v0.9.4

func EncryptAESCTR(data []byte, salt []byte, key []byte) ([]byte, error)

func EncryptAESCTRReaderWriter added in v0.9.4

func EncryptAESCTRReaderWriter(reader io.Reader, writer io.Writer, salt []byte, key []byte) error

func EncryptFilePGP added in v0.9.4

func EncryptFilePGP(source string, target string, key []byte) error

func EncryptFileSSH added in v0.9.4

func EncryptFileSSH(source string, target string, publickey *rsa.PublicKey) error

func EncryptFileWinSCP added in v0.9.4

func EncryptFileWinSCP(source string, target string, key []byte) error

func EncryptFilenamePGP added in v0.9.4

func EncryptFilenamePGP(filename string) string

func EncryptFilenameSSH added in v0.9.4

func EncryptFilenameSSH(filename string, publickey *rsa.PublicKey) (string, error)

func EncryptFilenameWinSCP added in v0.9.4

func EncryptFilenameWinSCP(filename string, key []byte) (string, error)

func ExistFile

func ExistFile(p string) bool

func ExpandHomeDir

func ExpandHomeDir(p string) (string, error)

func FirstDelimeterIndex added in v0.8.1

func FirstDelimeterIndex(p string) int

func Fprintf added in v0.9.11

func Fprintf(w io.Writer, format string, a ...any) (int, error)

func GetBasename

func GetBasename(p string) string

func GetBundleFilename added in v0.8.1

func GetBundleFilename(hash string) string

func GetCWD

func GetCWD() string

GetCWD returns current working directory

func GetClientVersion

func GetClientVersion() string

GetClientVersion returns client version in string

func GetCommonRootLocalDirPath

func GetCommonRootLocalDirPath(paths []string) (string, error)

func GetDefaultIRODSConfigPath added in v0.9.4

func GetDefaultIRODSConfigPath() string

GetDefaultIRODSConfigPath returns default config path

func GetDefaultPrivateKeyPath added in v0.9.4

func GetDefaultPrivateKeyPath() string

GetDefaultPrivateKeyPath returns default private key path

func GetDefaultPublicKeyPath added in v0.9.4

func GetDefaultPublicKeyPath() string

GetDefaultPublicKeyPath returns default public key path, if public key does not exist, return private key path.

func GetDefaultStagingDir added in v0.4.7

func GetDefaultStagingDir(targetPath string) string

func GetDefaultStagingDirInTargetPath added in v0.4.7

func GetDefaultStagingDirInTargetPath(targetPath string) string

func GetDir added in v0.7.11

func GetDir(p string) string

func GetEnvironmentManager

func GetEnvironmentManager() *irodsclient_config.ICommandsEnvironmentManager

GetEnvironmentManager returns environment manager

func GetFileExtension

func GetFileExtension(p string) string

func GetHomeDir

func GetHomeDir() string

GetHomeDir returns home dir

func GetIRODSConnection

func GetIRODSConnection(account *irodsclient_types.IRODSAccount) (*irodsclient_conn.IRODSConnection, error)

GetIRODSConnection returns a connection

func GetIRODSFSClient

func GetIRODSFSClient(account *irodsclient_types.IRODSAccount) (*irodsclient_fs.FileSystem, error)

GetIRODSFSClient returns a file system client

func GetIRODSFSClientForLargeFileIO added in v0.10.4

func GetIRODSFSClientForLargeFileIO(account *irodsclient_types.IRODSAccount, maxIOConnection int, tcpBufferSize int) (*irodsclient_fs.FileSystem, error)

GetIRODSFSClientForLargeFileIO returns a file system client

func GetIRODSFSClientForSingleOperation added in v0.10.4

func GetIRODSFSClientForSingleOperation(account *irodsclient_types.IRODSAccount) (*irodsclient_fs.FileSystem, error)

GetIRODSFSClientForSingleOperation returns a file system client for single operation

func GetParentIRODSDirs added in v0.8.1

func GetParentIRODSDirs(p string) []string

GetParentIRODSDirs returns all parent dirs

func GetParentLocalDirs

func GetParentLocalDirs(p string) []string

GetParentLocalDirs returns all parent dirs

func GetProgressWriter added in v0.8.1

func GetProgressWriter(displayPath bool) progress.Writer

func GetResourceServers added in v0.4.7

func GetResourceServers(fs *irodsclient_fs.FileSystem, targetDir string) ([]string, error)

func GetSessionConfig added in v0.10.2

func GetSessionConfig() *irodsclient_config.Config

GetSessionConfig returns session configuration

func GetShortPathMessage added in v0.8.1

func GetShortPathMessage(name string, messageLen int) string

func GetVersionJSON

func GetVersionJSON() (string, error)

GetVersionJSON returns VersionInfo object in JSON string

func GetVersionParts added in v0.6.0

func GetVersionParts(version string) (int, int, int)

GetVersionParts returns version parts (major, minor, patch)

func InitEnvironmentManager added in v0.10.2

func InitEnvironmentManager() error

InitEnvironmentManager initializes envionment manager

func InitTerminalOutput added in v0.9.11

func InitTerminalOutput()

func Input added in v0.9.11

func Input(msg string) string

func InputInt added in v0.9.11

func InputInt(msg string) int

func InputMissingFields

func InputMissingFields() (bool, error)

InputMissingFields inputs missing fields

func InputMissingFieldsFromStdin added in v0.5.0

func InputMissingFieldsFromStdin() error

InputMissingFieldsFromStdin inputs missing fields

func InputPassword added in v0.9.11

func InputPassword(msg string) string

func InputYN

func InputYN(msg string) bool

InputYN inputs Y or N true for Y, false for N

func IsBundleFilename added in v0.8.1

func IsBundleFilename(p string) bool

func IsCorrectFilename added in v0.9.4

func IsCorrectFilename(filename []byte) bool

func IsDigitsOnly added in v0.9.3

func IsDigitsOnly(s string) bool

IsDigitsOnly checks if the given string contains only digits

func IsNewerVersion added in v0.6.0

func IsNewerVersion(ver1 []int, ver2 []int) bool

IsNewerVersion compares ver1 against ver2

func IsNotDirError added in v0.9.11

func IsNotDirError(err error) bool

IsNotDirError evaluates if the given error is NotDirError

func IsNotFileError added in v0.9.11

func IsNotFileError(err error) bool

IsNotFileError evaluates if the given error is NotFileError

func IsSafeStagingDir added in v0.9.11

func IsSafeStagingDir(stagingPath string) error

func IsSameResourceServer added in v0.9.11

func IsSameResourceServer(fs *irodsclient_fs.FileSystem, path1 string, path2 string) (bool, error)

func IsStagingDirInTargetPath added in v0.5.7

func IsStagingDirInTargetPath(stagingPath string) bool

func LastDelimeterIndex added in v0.8.1

func LastDelimeterIndex(p string) int

func MakeDateTimeFromString added in v0.7.0

func MakeDateTimeFromString(str string) (time.Time, error)

func MakeDateTimeString

func MakeDateTimeString(t time.Time) string

func MakeIRODSPath

func MakeIRODSPath(cwd string, homedir string, zone string, irodsPath string) string

func MakeLocalPath

func MakeLocalPath(localPath string) string

func MakeTargetIRODSFilePath added in v0.4.6

func MakeTargetIRODSFilePath(filesystem *irodsclient_fs.FileSystem, source string, target string) string

func MakeTargetLocalFilePath added in v0.4.6

func MakeTargetLocalFilePath(source string, target string) string

func MarkIRODSPathMap added in v0.10.8

func MarkIRODSPathMap(pathMap map[string]bool, p string)

func MarkLocalPathMap added in v0.10.8

func MarkLocalPathMap(pathMap map[string]bool, p string)

func NewNotDirError added in v0.9.11

func NewNotDirError(dest string) error

func NewNotFileError added in v0.9.11

func NewNotFileError(dest string) error

func PadPkcs7 added in v0.9.4

func PadPkcs7(data []byte, blocksize int) []byte

func ParseSize added in v0.6.3

func ParseSize(size string) (int64, error)

func ParseTime added in v0.6.3

func ParseTime(t string) (int, error)

func Print added in v0.9.11

func Print(a ...any) (n int, err error)

func PrintErrorf added in v0.9.11

func PrintErrorf(format string, a ...any) (int, error)

func PrintInfof added in v0.9.11

func PrintInfof(format string, a ...any) (n int, err error)

func PrintInfoln added in v0.9.11

func PrintInfoln(a ...any) (n int, err error)

func Printf added in v0.9.5

func Printf(format string, a ...any) (n int, err error)

func Println added in v0.9.5

func Println(a ...any) (n int, err error)

func ReinputFields added in v0.7.4

func ReinputFields() (bool, error)

ReinputFields re-inputs fields

func ResolveSymlink(p string) (string, error)

func RunWithRetry added in v0.5.0

func RunWithRetry(retry int, retryInterval int) error

func SelfUpgrade added in v0.6.2

func SelfUpgrade() error

func SetCWD

func SetCWD(cwd string) error

SetCWD sets current workding directory

func Tar

func Tar(baseDir string, sources []string, target string, callback TrackerCallBack) error

Types

type Bundle

type Bundle struct {
	Index             int64
	Entries           []*BundleEntry
	Size              int64
	LocalBundlePath   string
	IRODSBundlePath   string
	LastError         error
	LastErrorTaskName string

	Completed bool
	// contains filtered or unexported fields
}

func (*Bundle) Add added in v0.9.11

func (bundle *Bundle) Add(sourceStat fs.FileInfo, sourcePath string) error

func (*Bundle) GetBundleFilename added in v0.8.1

func (bundle *Bundle) GetBundleFilename() (string, error)

func (*Bundle) GetEntries added in v0.7.12

func (bundle *Bundle) GetEntries() []*BundleEntry

func (*Bundle) GetManager added in v0.9.11

func (bundle *Bundle) GetManager() *BundleTransferManager

func (*Bundle) RequireTar added in v0.9.11

func (bundle *Bundle) RequireTar() bool

func (*Bundle) SetCompleted added in v0.9.11

func (bundle *Bundle) SetCompleted()

type BundleEntry added in v0.7.12

type BundleEntry struct {
	LocalPath string
	IRODSPath string
	Size      int64
	Dir       bool
}

type BundleTransferManager

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

func NewBundleTransferManager

func NewBundleTransferManager(account *irodsclient_types.IRODSAccount, fs *irodsclient_fs.FileSystem, transferReportManager *TransferReportManager, irodsDestPath string, localBundleRootPath string, minBundleFileNum int, maxBundleFileNum int, maxBundleFileSize int64, singleThreaded bool, uploadThreadNum int, redirectToResource bool, useIcat bool, localTempDirPath string, irodsTempDirPath string, noBulkReg bool, showProgress bool, showFullPath bool) *BundleTransferManager

NewBundleTransferManager creates a new BundleTransferManager

func (*BundleTransferManager) CleanUpBundles added in v0.4.7

func (manager *BundleTransferManager) CleanUpBundles()

func (*BundleTransferManager) DoneScheduling added in v0.4.6

func (manager *BundleTransferManager) DoneScheduling()

func (*BundleTransferManager) GetBundles added in v0.7.12

func (manager *BundleTransferManager) GetBundles() []*Bundle

func (*BundleTransferManager) GetFilesystem added in v0.7.12

func (manager *BundleTransferManager) GetFilesystem() *irodsclient_fs.FileSystem

func (*BundleTransferManager) GetTargetPath added in v0.9.11

func (manager *BundleTransferManager) GetTargetPath(localPath string) (string, error)

func (*BundleTransferManager) Schedule added in v0.4.6

func (manager *BundleTransferManager) Schedule(sourceStat fs.FileInfo, sourcePath string) error

func (*BundleTransferManager) Start added in v0.4.6

func (manager *BundleTransferManager) Start()

func (*BundleTransferManager) Wait added in v0.4.6

func (manager *BundleTransferManager) Wait() error

type ConfigTypeIn added in v0.5.0

type ConfigTypeIn struct {
	Host     string `yaml:"irods_host,omitempty"`
	Port     int    `yaml:"irods_port,omitempty"`
	ZoneName string `yaml:"irods_zone_name,omitempty"`
	Username string `yaml:"irods_user_name,omitempty"`
	Password string `yaml:"irods_user_password,omitempty"`
}

ConfigTypeIn stores data that user can input if missing

func NewConfigTypeInFromYAML added in v0.5.0

func NewConfigTypeInFromYAML(yamlBytes []byte) (*ConfigTypeIn, error)

NewConfigTypeInFromYAML creates ConfigTypeIn from YAML

func (*ConfigTypeIn) ToYAML added in v0.5.0

func (config *ConfigTypeIn) ToYAML() ([]byte, error)

ToYAML converts to YAML bytes

type EncryptionConfig added in v0.9.4

type EncryptionConfig struct {
	Required bool
	Mode     EncryptionMode
}

func GetEncryptionConfigFromMeta added in v0.9.4

func GetEncryptionConfigFromMeta(filesystem *irodsclient_fs.FileSystem, targetPath string) *EncryptionConfig

GetEncryptionConfigFromMeta returns encryption config from meta

type EncryptionManager added in v0.8.3

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

func NewEncryptionManager added in v0.8.3

func NewEncryptionManager(mode EncryptionMode) *EncryptionManager

NewEncryptionManager creates a new EncryptionManager

func (*EncryptionManager) DecryptFile added in v0.8.3

func (manager *EncryptionManager) DecryptFile(source string, target string) error

DecryptFile decrypts local source file and returns decrypted file path

func (*EncryptionManager) DecryptFilename added in v0.8.3

func (manager *EncryptionManager) DecryptFilename(filename string) (string, error)

DecryptFilename decrypts filename

func (*EncryptionManager) EncryptFile added in v0.8.3

func (manager *EncryptionManager) EncryptFile(source string, target string) error

EncryptFile encrypts local source file and returns encrypted file path

func (*EncryptionManager) EncryptFilename added in v0.8.3

func (manager *EncryptionManager) EncryptFilename(filename string) (string, error)

EncryptFilename encrypts filename

func (*EncryptionManager) SetKey added in v0.9.4

func (manager *EncryptionManager) SetKey(key []byte)

SetKey sets key

func (*EncryptionManager) SetPublicPrivateKey added in v0.9.4

func (manager *EncryptionManager) SetPublicPrivateKey(keyPath string)

SetPublicPrivateKey sets public or private key automatically

type EncryptionMode added in v0.8.3

type EncryptionMode string

EncryptionMode determines encryption mode

const (
	// EncryptionModeWinSCP is for WinSCP
	EncryptionModeWinSCP EncryptionMode = "WINSCP"
	// EncryptionModePGP is for PGP key encryption
	EncryptionModePGP EncryptionMode = "PGP"
	// EncryptionModeSSH is for SSH key encryption
	EncryptionModeSSH EncryptionMode = "SSH"
	// EncryptionModeUnknown is for unknown mode
	EncryptionModeUnknown EncryptionMode = ""
)

func DetectEncryptionMode added in v0.8.3

func DetectEncryptionMode(p string) EncryptionMode

DetectEncryptionMode detects encryption mode and filename encryption

func GetEncryptionMode added in v0.8.3

func GetEncryptionMode(mode string) EncryptionMode

GetEncryptionMode returns encryption mode

type ListFormat added in v0.8.3

type ListFormat string
const (
	// format
	ListFormatNormal   ListFormat = ""
	ListFormatLong     ListFormat = "long"
	ListFormatVeryLong ListFormat = "verylong"
)

type ListSortOrder added in v0.8.3

type ListSortOrder string
const (
	// sort
	ListSortOrderNone ListSortOrder = ""
	ListSortOrderName ListSortOrder = "name"
	ListSortOrderSize ListSortOrder = "size"
	ListSortOrderTime ListSortOrder = "time"
	ListSortOrderExt  ListSortOrder = "ext"
)

func GetListSortOrder added in v0.8.3

func GetListSortOrder(order string) ListSortOrder

GetListSortOrder returns ListSortOrder from string

type NotDirError added in v0.9.11

type NotDirError struct {
	Path string
}

func (*NotDirError) Error added in v0.9.11

func (err *NotDirError) Error() string

Error returns error message

func (*NotDirError) Is added in v0.9.11

func (err *NotDirError) Is(other error) bool

Is tests type of error

func (*NotDirError) ToString added in v0.9.11

func (err *NotDirError) ToString() string

ToString stringifies the object

type NotFileError added in v0.9.11

type NotFileError struct {
	Path string
}

func (*NotFileError) Error added in v0.9.11

func (err *NotFileError) Error() string

Error returns error message

func (*NotFileError) Is added in v0.9.11

func (err *NotFileError) Is(other error) bool

Is tests type of error

func (*NotFileError) ToString added in v0.9.11

func (err *NotFileError) ToString() string

ToString stringifies the object

type ParallelJob added in v0.4.6

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

func (*ParallelJob) Done added in v0.9.11

func (job *ParallelJob) Done()

func (*ParallelJob) GetManager added in v0.4.6

func (job *ParallelJob) GetManager() *ParallelJobManager

func (*ParallelJob) Progress added in v0.4.6

func (job *ParallelJob) Progress(processed int64, total int64, errored bool)

type ParallelJobManager added in v0.4.6

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

func NewParallelJobManager added in v0.4.6

func NewParallelJobManager(fs *irodsclient_fs.FileSystem, maxThreads int, showProgress bool, showFullPath bool) *ParallelJobManager

NewParallelJobManager creates a new ParallelJobManager

func (*ParallelJobManager) DoneScheduling added in v0.4.6

func (manager *ParallelJobManager) DoneScheduling()

func (*ParallelJobManager) GetFilesystem added in v0.4.6

func (manager *ParallelJobManager) GetFilesystem() *irodsclient_fs.FileSystem

func (*ParallelJobManager) Schedule added in v0.4.6

func (manager *ParallelJobManager) Schedule(name string, task ParallelJobTask, threadsRequired int, progressUnit progress.Units) error

func (*ParallelJobManager) Start added in v0.4.6

func (manager *ParallelJobManager) Start()

func (*ParallelJobManager) Wait added in v0.4.6

func (manager *ParallelJobManager) Wait() error

type ParallelJobTask added in v0.4.6

type ParallelJobTask func(job *ParallelJob) error

type ProgressTrackerCallback

type ProgressTrackerCallback func(name string, processed int64, total int64, unit progress.Units, errored bool)

type TarEntry

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

func NewTarEntry

func NewTarEntry(source string, target string) *TarEntry

type TerminalWriter added in v0.9.11

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

func GetTerminalWriter added in v0.9.11

func GetTerminalWriter() *TerminalWriter

func (*TerminalWriter) Lock added in v0.9.11

func (writer *TerminalWriter) Lock()

func (*TerminalWriter) Unlock added in v0.9.11

func (writer *TerminalWriter) Unlock()

func (*TerminalWriter) Write added in v0.9.11

func (writer *TerminalWriter) Write(p []byte) (n int, err error)

type TrackerCallBack

type TrackerCallBack func(processed int64, total int64)

type TransferMethod added in v0.9.11

type TransferMethod string

TransferMethod determines transfer method

const (
	// TransferMethodGet is for get
	TransferMethodGet TransferMethod = "GET"
	// TransferMethodPut is for put
	TransferMethodPut TransferMethod = "PUT"
	// TransferMethodBput is for bput command
	TransferMethodBput TransferMethod = "BPUT"
	// TransferMethodCopy is for cp command
	TransferMethodCopy TransferMethod = "COPY"
	// TransferMethodDelete is for delete command
	TransferMethodDelete TransferMethod = "DELETE"
	// TransferMethodBputUnknown is for unknown command
	TransferMethodBputUnknown TransferMethod = "UNKNOWN"
)

func GetTransferMethod added in v0.9.11

func GetTransferMethod(method string) TransferMethod

GetTransferMethod returns transfer method

type TransferReportFile added in v0.9.11

type TransferReportFile struct {
	Method TransferMethod `json:"method"` // get, put, bput ...

	StartAt time.Time `json:"start_time"`
	EndAt   time.Time `json:"end_at"`

	SourcePath              string `json:"source_path"`
	DestPath                string `json:"dest_path"`
	SourceSize              int64  `json:"source_size"`
	SourceChecksumAlgorithm string `json:"source_checksum_algorithm"`
	SourceChecksum          string `json:"source_checksum"`
	DestSize                int64  `json:"dest_size"`
	DestChecksumAlgorithm   string `json:"dest_checksum_algorithm"`
	DestChecksum            string `json:"dest_checksum"`

	Error error    `json:"error,omitempty"`
	Notes []string `json:"notes"` // additional notes
}

func NewTransferReportFileFromTransferResult added in v0.9.11

func NewTransferReportFileFromTransferResult(result *irodsclient_fs.FileTransferResult, method TransferMethod, err error, notes []string) (*TransferReportFile, error)

type TransferReportManager added in v0.9.11

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

func NewTransferReportManager added in v0.9.11

func NewTransferReportManager(report bool, reportPath string, reportToStdout bool) (*TransferReportManager, error)

NewTransferReportManager creates a new TransferReportManager

func (*TransferReportManager) AddFile added in v0.9.11

func (manager *TransferReportManager) AddFile(file *TransferReportFile) error

AddFile adds a new file transfer

func (*TransferReportManager) AddTransfer added in v0.9.11

func (manager *TransferReportManager) AddTransfer(result *irodsclient_fs.FileTransferResult, method TransferMethod, err error, notes []string) error

AddTransfer adds a new file transfer

func (*TransferReportManager) Release added in v0.9.11

func (manager *TransferReportManager) Release()

Release releases resources

type VersionInfo

type VersionInfo struct {
	ClientVersion string `json:"clientVersion"`
	GitCommit     string `json:"gitCommit"`
	BuildDate     string `json:"buildDate"`
	GoVersion     string `json:"goVersion"`
	Compiler      string `json:"compiler"`
	Platform      string `json:"platform"`
}

VersionInfo object contains version related info

func GetVersion

func GetVersion() VersionInfo

GetVersion returns VersionInfo object

Jump to

Keyboard shortcuts

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