Documentation
¶
Overview ¶
server 1、接收客户端文件上传: upload接口 2、支持客户端文件下载: listfile downloadfile
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // flag ClientCmd = &cobra.Command{ Use: "client", Short: "start tusd client", Long: "start tusd client, and upload a file", Example: "...", SilenceUsage: false, } ClientDownloadCmd = &cobra.Command{ Use: "download", Short: "download", RunE: func(cmd *cobra.Command, args []string) error { err := client.DownloadStart() if err != nil { logger.DefaultLogger.Error(err.Error()) } return err }, } ClientUploadCmd = &cobra.Command{ Use: "upload", Short: "upload", RunE: func(cmd *cobra.Command, args []string) error { err := client.UploadStart() if err != nil { logger.DefaultLogger.Error(err.Error()) } return err }, } )
View Source
var ( // flag ServerCmd = &cobra.Command{ Use: "server", Short: "start tusd server", Example: "...", SilenceUsage: false, RunE: func(cmd *cobra.Command, args []string) error { ctx, cancel := context.WithCancel(context.TODO()) defer cancel() err := server.Start(ctx) if err != nil { logger.DefaultLogger.Error(err.Error()) } return err }, } )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.