godloader

package module
v0.0.0-...-06b1064 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

README

GoDloader

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(name string) bool

Exists проверяет файл на существование

Types

type StructAPI

type StructAPI struct {
	ThreadLimit    int
	BlockSizeLimit int
}

StructAPI главная структура апи. можно указать максимальное количество потоков

func API

func API(ThreadLimit int, BlockSizeLimit int) *StructAPI

API точка входа в lib

func (*StructAPI) Build

func (api *StructAPI) Build(name string, lim int) bool

Build собирает все части файла в один

func (*StructAPI) Create

func (api *StructAPI) Create(p string) (*os.File, error)

Create создает файл вместе с указанным путем

func (*StructAPI) Download

func (api *StructAPI) Download(min int, max int, i int, url string, body []string, filename string) bool

Download загружает часть

func (*StructAPI) ExtErr

func (api *StructAPI) ExtErr(err error) bool

ExtErr расширеннная версия error check с дебагом

func (*StructAPI) Get

func (api *StructAPI) Get(url string) (int, string, int, bool)

Get скачивает файл

func (*StructAPI) GetAPI

func (api *StructAPI) GetAPI(url string, filename string) (int, string, int, bool)

GetAPI получает готовую ссылку и имя файла от функций Get и GetAll, рассчитывает количество получившихся частей и загружает

func (*StructAPI) GetCreateFolderTree

func (api *StructAPI) GetCreateFolderTree(url string) (int, string, int, bool)

GetCreateFolderTree скачивает файл, создавая структуру директорий как на сервере

func (*StructAPI) HashFileMd5

func (api *StructAPI) HashFileMd5(filePath string) (string, error)

HashFileMd5 возвращает md5 хеш

func (*StructAPI) Remove

func (api *StructAPI) Remove(name string, lim int)

Remove удаляет все части файла

func (*StructAPI) RemoveSimple

func (api *StructAPI) RemoveSimple(name string) bool

RemoveSimple удаляет указанный файл

func (*StructAPI) Stick

func (api *StructAPI) Stick(pathFileLog string, insertData []byte)

Stick приклеивает к файлу набор переданных байтов

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL