Documentation
¶
Index ¶
- Constants
- func CleanSliceUselessData(sliceData []byte) (result []byte)
- func CleanTmpFile() error
- func CopyFile(sourceFile string, distFile string) (err error)
- func CreateTmpFile() (tmpFile *os.File, err error)
- func DownloadeSliceFile(url string, filePath string, decryptKey string) (result string, err error)
- func DrawProgressBar(prefix string, proportion float32, width int, suffix ...string)
- func GetBaseUrl(srcUrl string) string
- func GetDownloadDataDir() string
- func GetDownloadTmpDir() string
- func GetMD5(str string) string
- func HttpGetFile(url string) ([]byte, error)
- func Logger() *zerolog.Logger
- func LoggerDebug(msg string)
- func LoggerError(msg string)
- func LoggerInfo(msg string)
Constants ¶
View Source
const ( CONST_BASE_DATA_DIR = "data" // 下载数据目录 CONST_BASE_TMP_DIR = ".tmp" // 临时数据目录 CONST_BASE_OS_TMP_DIR = "pulldlr" // 临时数据目录 )
Variables ¶
This section is empty.
Functions ¶
func CleanSliceUselessData ¶
清理分片文件中的无用数据,影响分片合并后的播放
func DownloadeSliceFile ¶
下载http链接的分片文件到本地磁盘,如果是加密文件请传递加密密钥 @param url string 链接地址
func DrawProgressBar ¶
func GetBaseUrl ¶
func HttpGetFile ¶
func LoggerDebug ¶
func LoggerDebug(msg string)
func LoggerError ¶
func LoggerError(msg string)
func LoggerInfo ¶
func LoggerInfo(msg string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.