Documentation ¶
Index ¶
- Constants
- func AddFileSeeder(fileHash string, addr string)
- func AnySeeders(fileHash string) bool
- func ByteCountSI(b int64) string
- func CloseDb()
- func DbInsertFile(File models.File)
- func DbReadSetting(Name string) (string, error)
- func DbWriteSetting(Name string, value string) error
- func GetSeeders(fileHash string) []string
- func InitializeDb()
- func InitializeFileSeedTracker()
- func RemoveFileSeeder(fileHash string, addr string)
- func RemoveSeeder(addr string)
- func TopicEncode(topic string) string
- type Alert
- type FileFilterState
- type PagedQueryRemoteResult
- type PagedQueryResult
Constants ¶
View Source
const ( All = iota Downloading Seeding Completed Paused )
Variables ¶
This section is empty.
Functions ¶
func AddFileSeeder ¶
func AnySeeders ¶
func ByteCountSI ¶
ByteCountSI converts filesize in bytes to human readable text
func DbReadSetting ¶
DbReadSetting Reads a key and returns value
func DbWriteSetting ¶
DbWriteSetting Stores or updates a key with a given value
func GetSeeders ¶
func InitializeFileSeedTracker ¶
func InitializeFileSeedTracker()
func RemoveFileSeeder ¶
func RemoveSeeder ¶
func RemoveSeeder(addr string)
Types ¶
type Alert ¶
type Alert struct { Name string Symbol string Interval string Path string //only for local NumChunks int IsDownloading bool IsUploading bool IsPaused bool IsMissing bool IsHashing bool //only for local IsTracked bool //only for local IsAvailable bool //only for local ChunkMap []byte Progress float32 //only for remote Topic string DateTimeAdded int64 }
type FileFilterState ¶
type FileFilterState int
type PagedQueryRemoteResult ¶
type PagedQueryRemoteResult struct { Result []models.FileListing Count int }
PagedQueryResult is a paging query result for file searches
type PagedQueryResult ¶
type PagedQueryResult struct { Result []models.FileTransfer Count int }
PagedQueryResult is a paging query result for file searches
func SearchLocalFile ¶
func SearchLocalFile(Query string, filterState FileFilterState, OrderBy string, IsDesc bool, Skip int, Take int) PagedQueryResult
SearchLocalFile runs a paged query
Click to show internal directories.
Click to hide internal directories.