Documentation
¶
Index ¶
- Constants
- Variables
- func ChmodAndRename(src, dst string) error
- func CreateInitCheckFunc(login, check bool) cli.BeforeFunc
- func CreateUpxApp() *cli.App
- func DownloadBin(version, binPath string) error
- func GetCurrentBinPath() string
- func GetLatestVersion() (string, error)
- func InitAndCheck(login, check bool, c *cli.Context) (err error)
- func IsMatched(upInfo *upyun.FileInfo, mc *MatchConfig) bool
- func NewAuthCommand() cli.Command
- func NewCdCommand() cli.Command
- func NewCleanDBCommand() cli.Command
- func NewCopyCommand() cli.Command
- func NewFileWrappedReader(bar *mpb.Bar, fd io.ReadCloser) io.ReadCloser
- func NewFileWrappedWriter(localPath string, bar *mpb.Bar, resume bool) (io.WriteCloser, error)
- func NewGetCommand() cli.Command
- func NewGetDBCommand() cli.Command
- func NewInfoCommand() cli.Command
- func NewListSessionsCommand() cli.Command
- func NewLoginCommand() cli.Command
- func NewLogoutCommand() cli.Command
- func NewLsCommand() cli.Command
- func NewMkdirCommand() cli.Command
- func NewMoveCommand() cli.Command
- func NewPostCommand() cli.Command
- func NewPurgeCommand() cli.Command
- func NewPutCommand() cli.Command
- func NewPwdCommand() cli.Command
- func NewRmCommand() cli.Command
- func NewSwitchSessionCommand() cli.Command
- func NewSyncCommand() cli.Command
- func NewTreeCommand() cli.Command
- func NewUpgradeCommand() cli.Command
- func NewUploadCommand() cli.Command
- func Print(arg0 string, args ...interface{})
- func PrintError(arg0 string, args ...interface{})
- func PrintErrorAndExit(arg0 string, args ...interface{})
- func PrintOnlyVerbose(arg0 string, args ...interface{})
- func Upgrade()
- type Config
- type MatchConfig
- type Session
- func (sess *Session) AbsPath(upPath string) (ret string)
- func (sess *Session) Cd(upPath string)
- func (sess *Session) Copy(srcPath, destPath string, force bool) error
- func (sess *Session) FormatUpInfo(upInfo *upyun.FileInfo) string
- func (sess *Session) Get(upPath, localPath string, match *MatchConfig, workers int, resume bool)
- func (sess *Session) GetStartBetweenEndFiles(upPath, localPath string, match *MatchConfig, workers int)
- func (sess *Session) Info()
- func (sess *Session) Init() error
- func (sess *Session) IsLocalDir(localPath string) (isDir bool, exist bool)
- func (sess *Session) IsUpYunDir(upPath string) (isDir bool, exist bool)
- func (sess *Session) Ls(upPath string, match *MatchConfig, maxItems int, isDesc bool)
- func (sess *Session) Mkdir(upPaths ...string)
- func (sess *Session) Move(srcPath, destPath string, force bool) error
- func (sess *Session) PostTask(app, notify, taskFile string)
- func (sess *Session) Purge(urls []string, file string)
- func (sess *Session) Put(localPath, upPath string, workers int, withIgnore bool)
- func (sess *Session) Pwd()
- func (sess *Session) Rm(upPath string, match *MatchConfig, isAsync bool)
- func (sess *Session) Sync(localPath, upPath string, workers int, delete, strong bool)
- func (sess *Session) Tree(upPath string)
- func (sess *Session) Upload(filenames []string, upPath string, workers int, withIgnore bool)
- type UploadedFile
Constants ¶
View Source
const ( NO_CHECK = false CHECK = true )
View Source
const ( LOGIN = true NO_LOGIN = false MinJitter = 5 MaxJitter = 60 MaxRetry = 10 )
View Source
const ( TIME_NOT_SET = iota TIME_BEFORE TIME_AFTER TIME_INTERVAL )
View Source
const ( ITEM_NOT_SET = iota DIR FILE )
View Source
const ( SYNC_EXISTS = iota SYNC_OK SYNC_FAIL SYNC_NOT_FOUND DELETE_OK DELETE_FAIL MinResumePutFileSize = 100 * 1024 * 1024 DefaultBlockSize = 10 * 1024 * 1024 DefaultResumeRetry = 10 )
View Source
const ( VERSION_URL = "https://raw.githubusercontent.com/upyun/upx/master/VERSION" DOWNLOAD_URL_PREFIX = "http://collection.b0.upaiyun.com/softwares/upx/upx-" )
View Source
const VERSION = "v0.4.8"
Variables ¶
View Source
var (
IsVerbose = true
)
Functions ¶
func ChmodAndRename ¶
func CreateInitCheckFunc ¶ added in v0.3.8
func CreateInitCheckFunc(login, check bool) cli.BeforeFunc
func CreateUpxApp ¶ added in v0.3.8
func DownloadBin ¶
func GetCurrentBinPath ¶
func GetCurrentBinPath() string
func GetLatestVersion ¶
func NewAuthCommand ¶
func NewCdCommand ¶
func NewCleanDBCommand ¶ added in v0.3.8
func NewCopyCommand ¶ added in v0.4.1
func NewFileWrappedReader ¶ added in v0.4.3
func NewFileWrappedReader(bar *mpb.Bar, fd io.ReadCloser) io.ReadCloser
func NewFileWrappedWriter ¶
func NewFileWrappedWriter(localPath string, bar *mpb.Bar, resume bool) (io.WriteCloser, error)
func NewGetCommand ¶
func NewGetDBCommand ¶
func NewInfoCommand ¶
func NewListSessionsCommand ¶
func NewLoginCommand ¶
func NewLogoutCommand ¶
func NewLsCommand ¶
func NewMkdirCommand ¶
func NewMoveCommand ¶ added in v0.4.1
func NewPostCommand ¶
func NewPurgeCommand ¶
func NewPutCommand ¶
func NewPwdCommand ¶
func NewRmCommand ¶
func NewSwitchSessionCommand ¶
func NewSyncCommand ¶
func NewTreeCommand ¶
func NewUpgradeCommand ¶
func NewUploadCommand ¶ added in v0.3.8
func PrintError ¶
func PrintError(arg0 string, args ...interface{})
func PrintErrorAndExit ¶
func PrintErrorAndExit(arg0 string, args ...interface{})
func PrintOnlyVerbose ¶
func PrintOnlyVerbose(arg0 string, args ...interface{})
Types ¶
type Config ¶
func (*Config) PopCurrent ¶
func (c *Config) PopCurrent()
type MatchConfig ¶
type Session ¶
type Session struct { Bucket string `json:"bucket"` Operator string `json:"username"` Password string `json:"password"` CWD string `json:"cwd"` // contains filtered or unexported fields }
func (*Session) Get ¶
func (sess *Session) Get(upPath, localPath string, match *MatchConfig, workers int, resume bool)
func (*Session) GetStartBetweenEndFiles ¶ added in v0.3.8
func (sess *Session) GetStartBetweenEndFiles(upPath, localPath string, match *MatchConfig, workers int)
func (*Session) IsLocalDir ¶
func (*Session) IsUpYunDir ¶
func (*Session) Ls ¶
func (sess *Session) Ls(upPath string, match *MatchConfig, maxItems int, isDesc bool)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.