core

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB_NAME string = "/history.db"

Functions

func BenchmarkDownload

func BenchmarkDownload(b *testing.B)

func BenchmarkDownload_Seq

func BenchmarkDownload_Seq(b *testing.B)

func Cleanup

func Cleanup()

func CreateSqliteDb

func CreateSqliteDb()

func DeleteAllHistory

func DeleteAllHistory(db *sql.DB) error

func DeleteHistory

func DeleteHistory(db *sql.DB, id int)

func Download

func Download(inf Info, verbose bool) error

func Download_Seq

func Download_Seq(inf Info, verbose bool) error

func Initialize_table

func Initialize_table(db *sql.DB)

func InsertHistory

func InsertHistory(db *sql.DB, hist History)

func OpenSqliteDb

func OpenSqliteDb() *sql.DB

Types

type History

type History struct {
	Id       int
	Date     string
	Success  string
	FilePath string
	FileName string
	FileSize string
}

func GetHistoryList

func GetHistoryList(db *sql.DB, limit int) []History

type Info

type Info struct {
	NAME         string
	Location     string
	Length       int64
	Pieces       int
	Piece_length int64
	// contains filtered or unexported fields
}

func Make_info

func Make_info(url string, name string, location string, pieces int) Info

Jump to

Keyboard shortcuts

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