Documentation ¶
Index ¶
- Variables
- func ApiEvent(c echo.Context) error
- func NewDeviceIfNeeded(configPath string) string
- func StartLocalFileSync(driverId uint64, serverAddr string, h int64, m int64, ...)
- type Client
- type CronTask
- type DriverLocalFile
- type TaskInfo
- type TaskInfoClearable
- type WebUploadDirProcess
- func (h *WebUploadDirProcess) EndDir(filePath string, info os.FileInfo)
- func (h *WebUploadDirProcess) EndFile(filePath string, info os.FileInfo)
- func (h *WebUploadDirProcess) EndUploadFile(filePath string, info os.FileInfo)
- func (h *WebUploadDirProcess) FilePathFilter(filePath string) bool
- func (h *WebUploadDirProcess) OnFileError(filePath string, err error)
- func (h *WebUploadDirProcess) PushFile(info os.FileInfo)
- func (h *WebUploadDirProcess) SkipFile(filePath string, info os.FileInfo, hash string)
- func (h *WebUploadDirProcess) StartDir(filePath string, info os.FileInfo, n uint64)
- func (h *WebUploadDirProcess) StartFile(filePath string, info os.FileInfo)
- func (h *WebUploadDirProcess) StartUploadFile(filePath string, info os.FileInfo, hash string)
- type WebUploadProcess
- func (w *WebUploadProcess) Close(resp core.FileResp, err error)
- func (w *WebUploadProcess) EndFile(index int, filePath string, info os.FileInfo, exist bool)
- func (w *WebUploadProcess) HasPushedAllToStack()
- func (w *WebUploadProcess) New(srcPath string, concurrent int, conns []net.Conn) core.UploadProcess
- func (w *WebUploadProcess) OnFileError(index int, filePath string, info os.FileInfo, err error)
- func (w *WebUploadProcess) PushFile(info os.FileInfo)
- func (w *WebUploadProcess) Show(p *core.Process)
- func (w *WebUploadProcess) StackSizeHandler(size int)
- func (w *WebUploadProcess) StartFile(index int, filePath string, info os.FileInfo)
- func (w *WebUploadProcess) Verbose() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StatusIdle = 0 StatusFinished = 1 StatusCanceled = 2 StatusError = 3 StatusWaitCanceled = 5 StatusRunning = 6 )
Functions ¶
func NewDeviceIfNeeded ¶
Types ¶
type DriverLocalFile ¶
type DriverLocalFile struct {
// contains filtered or unexported fields
}
func GetOrLoadDriver ¶
func GetOrLoadDriver(driverId uint64) (*DriverLocalFile, error)
func (*DriverLocalFile) StartOrStop ¶
func (d *DriverLocalFile) StartOrStop(ctx context.Context, start bool, serverAddr, srcPath, ignores, encoder string)
type TaskInfo ¶
type TaskInfo struct { TaskInfoClearable Status int `json:"status"` LastDoneTime int64 `json:"lastDoneTime"` Cost int64 `json:"cost"` ErrMsg string `json:"errMsg"` Warnings []string `json:"warnings"` CurFile string `json:"curFile"` CurSize uint64 `json:"curSize"` CurDirItemCnt uint64 `json:"curDirItemCnt"` CurDir string `json:"curDir"` Ignores []string `json:"ignores"` // contains filtered or unexported fields }
type TaskInfoClearable ¶
type WebUploadDirProcess ¶
type WebUploadDirProcess struct {
// contains filtered or unexported fields
}
func (*WebUploadDirProcess) EndDir ¶
func (h *WebUploadDirProcess) EndDir(filePath string, info os.FileInfo)
func (*WebUploadDirProcess) EndFile ¶
func (h *WebUploadDirProcess) EndFile(filePath string, info os.FileInfo)
func (*WebUploadDirProcess) EndUploadFile ¶
func (h *WebUploadDirProcess) EndUploadFile(filePath string, info os.FileInfo)
func (*WebUploadDirProcess) FilePathFilter ¶
func (h *WebUploadDirProcess) FilePathFilter(filePath string) bool
func (*WebUploadDirProcess) OnFileError ¶
func (h *WebUploadDirProcess) OnFileError(filePath string, err error)
func (*WebUploadDirProcess) PushFile ¶
func (h *WebUploadDirProcess) PushFile(info os.FileInfo)
func (*WebUploadDirProcess) SkipFile ¶
func (h *WebUploadDirProcess) SkipFile(filePath string, info os.FileInfo, hash string)
func (*WebUploadDirProcess) StartDir ¶
func (h *WebUploadDirProcess) StartDir(filePath string, info os.FileInfo, n uint64)
func (*WebUploadDirProcess) StartFile ¶
func (h *WebUploadDirProcess) StartFile(filePath string, info os.FileInfo)
func (*WebUploadDirProcess) StartUploadFile ¶
func (h *WebUploadDirProcess) StartUploadFile(filePath string, info os.FileInfo, hash string)
type WebUploadProcess ¶
func (*WebUploadProcess) HasPushedAllToStack ¶
func (w *WebUploadProcess) HasPushedAllToStack()
func (*WebUploadProcess) New ¶
func (w *WebUploadProcess) New(srcPath string, concurrent int, conns []net.Conn) core.UploadProcess
func (*WebUploadProcess) OnFileError ¶
func (*WebUploadProcess) PushFile ¶
func (w *WebUploadProcess) PushFile(info os.FileInfo)
func (*WebUploadProcess) Show ¶
func (w *WebUploadProcess) Show(p *core.Process)
func (*WebUploadProcess) StackSizeHandler ¶
func (w *WebUploadProcess) StackSizeHandler(size int)
func (*WebUploadProcess) StartFile ¶
func (w *WebUploadProcess) StartFile(index int, filePath string, info os.FileInfo)
func (*WebUploadProcess) Verbose ¶
func (w *WebUploadProcess) Verbose() bool
Click to show internal directories.
Click to hide internal directories.