Documentation
¶
Index ¶
- Constants
- Variables
- func Base64Decode(str string) ([]byte, error)
- func CheckNewRelease() (*selfupdate.Release, error)
- func ExistFile(p string) bool
- func GetAccount(ticket *MDRepoTicket) (*irodsclient_types.IRODSAccount, error)
- func GetBasename(p string) string
- func GetClientVersion() string
- func GetDir(p string) string
- func GetFileExtension(p string) string
- func GetIRODSConnection(account *irodsclient_types.IRODSAccount) (*irodsclient_conn.IRODSConnection, error)
- func GetIRODSFSClient(account *irodsclient_types.IRODSAccount) (*irodsclient_fs.FileSystem, error)
- func GetIRODSFSClientAdvanced(account *irodsclient_types.IRODSAccount, maxConnection int, tcpBufferSize int) (*irodsclient_fs.FileSystem, error)
- func GetMDRepoTicketString(tickets []MDRepoTicket) (string, error)
- func GetMDRepoTicketStringFromToken(serviceURL string, token string) (string, error)
- func GetMDRepoTicketStringFromTokenWithRetry(serviceURL string, token string, retry int, retryInterval time.Duration) (string, error)
- func GetSubmitMetadataPath(dirPath string) string
- func GetVersionJSON() (string, error)
- func GetVersionParts(version string) (int, int, int)
- func HMACStringSHA224(secret []byte, str string) (string, error)
- func HMACStrings(secret []byte, strs []string, hashAlg func() hash.Hash) (string, error)
- func HasSubmitMetadataInDir(dirPath string) bool
- func InputMissingFields() (bool, error)
- func InputMissingFieldsFromStdin() error
- func InputOrcID() string
- func InputSimulationNo() int
- func InputYN(msg string) bool
- func IsNewerVersion(ver1 []int, ver2 []int) bool
- func IsSimulationNoNotMatchingError(err error) bool
- func IsStatusFile(filename string) bool
- func MakeDateTimeFromString(str string) (time.Time, error)
- func MakeDateTimeString(t time.Time) string
- func MakeIRODSLandingPath(irodsPath string) string
- func MakeIRODSReleasePath(irodsPath string) string
- func MakeLocalPath(localPath string) string
- func MakeTargetIRODSFilePath(filesystem *irodsclient_fs.FileSystem, source string, target string) string
- func MakeTargetLocalFilePath(source string, target string) string
- func NewSimulationNoNotMatchingError(valid []string, invalid []string, expected int) error
- func ParseSize(size string) (int64, error)
- func ParseTime(t string) (int, error)
- func ReadOrcIDFromSubmitMetadataFile(filePath string) (string, error)
- func ReadOrcIDFromSubmitMetadataFileInDir(dirPath string) (string, error)
- func ReadOrcIDFromSubmitMetadataString(metadataString string) (string, error)
- func RunWithRetry(retry int, retryInterval int) error
- func SelfUpgrade() error
- func SetDefaultConfigIfEmpty()
- func TestConnect(account *irodsclient_types.IRODSAccount) error
- func VerifySubmitMetadata(sourcePaths []string, serviceURL string, token string) error
- type Config
- type ConfigTypeIn
- type MDRepoTicket
- type MDRepoTicketObject
- type MDRepoVarifySubmitMetadataRequest
- type MDRepoVarifySubmitMetadataResponse
- type ParallelJob
- type ParallelJobManager
- func (manager *ParallelJobManager) DoneScheduling()
- func (manager *ParallelJobManager) GetFilesystem() *irodsclient_fs.FileSystem
- func (manager *ParallelJobManager) Schedule(name string, task ParallelJobTask, threadsRequired int, ...) error
- func (manager *ParallelJobManager) Start()
- func (manager *ParallelJobManager) Wait() error
- type ParallelJobTask
- type ProgressTrackerCallback
- type SimulationNoNotMatchingError
- type SubmitStatus
- type SubmitStatusEntry
- type SubmitStatusFile
- func (s *SubmitStatusFile) AddFile(f SubmitStatusEntry)
- func (s *SubmitStatusFile) CreateStatusFile(filesystem *fs.FileSystem, dataRootPath string) error
- func (s *SubmitStatusFile) GetStatusFilename() string
- func (s *SubmitStatusFile) SetCompleted()
- func (s *SubmitStatusFile) SetErrored()
- func (s *SubmitStatusFile) SetInProgress()
- type VersionInfo
Constants ¶
const ( TransferTreadNumDefault int = 5 UploadTreadNumMax int = 20 TcpBufferSizeDefault int = 4 * 1024 * 1024 TcpBufferSizeStringDefault string = "4MB" RedirectToResourceMinSize int64 = 1024 * 1024 * 1024 // 1GB ParallelUploadMinSize int64 = 80 * 1024 * 1024 // 80MB MDRepoGetTicketRetry int = 5 MDRepoGetTicketRetryInterval time.Duration = 10 * time.Second SubmissionMetadataFilename string = "mdrepo-metadata.toml" )
Variables ¶
var ( InvalidTicketError error = xerrors.Errorf("invalid ticket string") InvalidTokenError error = xerrors.Errorf("invalid token") TokenNotProvidedError error = xerrors.Errorf("token not provided") TicketNotReadyError error = xerrors.Errorf("ticket not ready") InvalidOrcIDError error = xerrors.Errorf("invalid ORC-ID") //SimulationNoNotMatchingError error = xerrors.Errorf("simulation number not match") InvalidSubmitMetadataError error = xerrors.Errorf("invalid submit metadata") )
Functions ¶
func Base64Decode ¶ added in v0.1.4
func CheckNewRelease ¶
func CheckNewRelease() (*selfupdate.Release, error)
func GetAccount ¶
func GetAccount(ticket *MDRepoTicket) (*irodsclient_types.IRODSAccount, error)
func GetBasename ¶
func GetClientVersion ¶
func GetClientVersion() string
GetClientVersion returns client version in string
func GetFileExtension ¶
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 GetIRODSFSClientAdvanced ¶
func GetIRODSFSClientAdvanced(account *irodsclient_types.IRODSAccount, maxConnection int, tcpBufferSize int) (*irodsclient_fs.FileSystem, error)
GetIRODSFSClientAdvanced returns a file system client
func GetMDRepoTicketString ¶ added in v0.1.4
func GetMDRepoTicketString(tickets []MDRepoTicket) (string, error)
func GetMDRepoTicketStringFromToken ¶ added in v0.1.4
func GetMDRepoTicketStringFromTokenWithRetry ¶ added in v0.1.6
func GetSubmitMetadataPath ¶ added in v0.1.6
func GetVersionJSON ¶
GetVersionJSON returns VersionInfo object in JSON string
func GetVersionParts ¶
GetVersionParts returns version parts (major, minor, patch)
func HMACStringSHA224 ¶ added in v0.1.4
func HMACStrings ¶ added in v0.1.4
func HasSubmitMetadataInDir ¶ added in v0.1.4
func InputMissingFields ¶
InputMissingFields inputs missing fields
func InputMissingFieldsFromStdin ¶
func InputMissingFieldsFromStdin() error
InputMissingFieldsFromStdin inputs missing fields
func InputSimulationNo ¶ added in v0.1.4
func InputSimulationNo() int
InputSimulationNo inputs simulation no
func IsNewerVersion ¶
IsNewerVersion compares ver1 against ver2
func IsSimulationNoNotMatchingError ¶ added in v0.1.7
IsSimulationNoNotMatchingError evaluates if the given error is SimulationNoNotMatchingError
func IsStatusFile ¶ added in v0.1.3
func MakeDateTimeString ¶
func MakeIRODSLandingPath ¶
func MakeIRODSReleasePath ¶
func MakeLocalPath ¶
func MakeTargetIRODSFilePath ¶
func MakeTargetIRODSFilePath(filesystem *irodsclient_fs.FileSystem, source string, target string) string
func MakeTargetLocalFilePath ¶
func NewSimulationNoNotMatchingError ¶ added in v0.1.7
NewSimulationNoNotMatchingError creates a simulation no not matching error
func ReadOrcIDFromSubmitMetadataFile ¶ added in v0.1.4
func ReadOrcIDFromSubmitMetadataFileInDir ¶ added in v0.1.4
func ReadOrcIDFromSubmitMetadataString ¶ added in v0.1.4
func RunWithRetry ¶
func SelfUpgrade ¶
func SelfUpgrade() error
func SetDefaultConfigIfEmpty ¶
func SetDefaultConfigIfEmpty()
func TestConnect ¶
func TestConnect(account *irodsclient_types.IRODSAccount) error
TestConnect just test connection creation
Types ¶
type Config ¶
func GetDefaultConfig ¶
func GetDefaultConfig() *Config
func (*Config) ToConfigTypeIn ¶
func (config *Config) ToConfigTypeIn() *ConfigTypeIn
type ConfigTypeIn ¶
type ConfigTypeIn struct {
TicketString string `yaml:"ticket_string,omitempty"`
}
func NewConfigTypeInFromYAML ¶
func NewConfigTypeInFromYAML(yamlBytes []byte) (*ConfigTypeIn, error)
NewConfigTypeInFromYAML creates ConfigTypeIn from YAML
func (*ConfigTypeIn) ToYAML ¶
func (config *ConfigTypeIn) ToYAML() ([]byte, error)
type MDRepoTicket ¶
func GetMDRepoTicketFromString ¶ added in v0.1.4
func GetMDRepoTicketFromString(ticketString string) (MDRepoTicket, error)
func GetMDRepoTicketsFromString ¶ added in v0.1.4
func GetMDRepoTicketsFromString(ticketString string) ([]MDRepoTicket, error)
type MDRepoTicketObject ¶ added in v0.1.4
type MDRepoTicketObject struct {
TicketString string `json:"tickets"`
}
type MDRepoVarifySubmitMetadataRequest ¶ added in v0.1.6
type MDRepoVarifySubmitMetadataResponse ¶ added in v0.1.6
type ParallelJob ¶
type ParallelJob struct {
// contains filtered or unexported fields
}
func (*ParallelJob) GetManager ¶
func (job *ParallelJob) GetManager() *ParallelJobManager
type ParallelJobManager ¶
type ParallelJobManager struct {
// contains filtered or unexported fields
}
func NewParallelJobManager ¶
func NewParallelJobManager(fs *irodsclient_fs.FileSystem, maxThreads int, showProgress bool) *ParallelJobManager
NewParallelJobManager creates a new ParallelJobManager
func (*ParallelJobManager) DoneScheduling ¶
func (manager *ParallelJobManager) DoneScheduling()
func (*ParallelJobManager) GetFilesystem ¶
func (manager *ParallelJobManager) GetFilesystem() *irodsclient_fs.FileSystem
func (*ParallelJobManager) Schedule ¶
func (manager *ParallelJobManager) Schedule(name string, task ParallelJobTask, threadsRequired int, progressUnit progress.Units) error
func (*ParallelJobManager) Start ¶
func (manager *ParallelJobManager) Start()
func (*ParallelJobManager) Wait ¶
func (manager *ParallelJobManager) Wait() error
type ParallelJobTask ¶
type ParallelJobTask func(job *ParallelJob) error
type ProgressTrackerCallback ¶
type SimulationNoNotMatchingError ¶ added in v0.1.4
type SimulationNoNotMatchingError struct {
ValidSimulationPaths []string
InvalidSimulationPaths []string
Expected int
}
func (*SimulationNoNotMatchingError) Error ¶ added in v0.1.7
func (err *SimulationNoNotMatchingError) Error() string
Error returns error message
func (*SimulationNoNotMatchingError) Is ¶ added in v0.1.7
func (err *SimulationNoNotMatchingError) Is(other error) bool
Is tests type of error
func (*SimulationNoNotMatchingError) ToString ¶ added in v0.1.7
func (err *SimulationNoNotMatchingError) ToString() string
ToString stringifies the object
type SubmitStatus ¶
type SubmitStatus string
const ( SubmitStatusUnknown SubmitStatus = "unknown" SubmitStatusInProgress SubmitStatus = "inprogress" SubmitStatusErrored SubmitStatus = "errored" SubmitStatusCompleted SubmitStatus = "completed" )
func (SubmitStatus) MarshalJSON ¶
func (s SubmitStatus) MarshalJSON() ([]byte, error)
func (SubmitStatus) String ¶
func (s SubmitStatus) String() string
func (*SubmitStatus) UnmarshalJSON ¶
func (s *SubmitStatus) UnmarshalJSON(b []byte) error
type SubmitStatusEntry ¶
type SubmitStatusFile ¶
type SubmitStatusFile struct {
TotalFileNumer int64 `json:"total_filenum"`
TotalFileSize int64 `json:"total_filesize"`
Token string `json:"token"`
Status SubmitStatus `json:"status"`
Files []SubmitStatusEntry `json:"files"`
Time time.Time `json:"time"`
}
func NewSubmitStatusFile ¶
func NewSubmitStatusFile() *SubmitStatusFile
func (*SubmitStatusFile) AddFile ¶
func (s *SubmitStatusFile) AddFile(f SubmitStatusEntry)
func (*SubmitStatusFile) CreateStatusFile ¶ added in v0.1.3
func (s *SubmitStatusFile) CreateStatusFile(filesystem *fs.FileSystem, dataRootPath string) error
func (*SubmitStatusFile) GetStatusFilename ¶ added in v0.1.3
func (s *SubmitStatusFile) GetStatusFilename() string
func (*SubmitStatusFile) SetCompleted ¶
func (s *SubmitStatusFile) SetCompleted()
func (*SubmitStatusFile) SetErrored ¶
func (s *SubmitStatusFile) SetErrored()
func (*SubmitStatusFile) SetInProgress ¶
func (s *SubmitStatusFile) SetInProgress()
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