Documentation ¶
Index ¶
- Constants
- Variables
- func AssertTaskId(taskid string) bool
- func EncryptPass(pass string) string
- type Agent
- func (this *Agent) AddBatchTasks(urls []string) error
- func (this *Agent) AddTask(req string) error
- func (this *Agent) DelayTask(taskid string) error
- func (this *Agent) DeleteTask(taskid string) error
- func (this *Agent) DeleteTasks(ids []string) error
- func (this *Agent) Dispatch(pattern string, flag int) ([]string, error)
- func (this *Agent) Download(taskid string, filter string, fc Fetcher, echo bool) error
- func (this *Agent) FillBtList(taskid string) (*_bt_list, error)
- func (this *Agent) GetTorrentByHash(hash, file string)
- func (this *Agent) InfoTasks(id interface{})
- func (this *Agent) IsOn() bool
- func (this *Agent) Login() error
- func (this *Agent) PauseTasks(ids []string) error
- func (this *Agent) ProcessTask() error
- func (this *Agent) PurgeTask(taskid string) error
- func (this *Agent) ReAddAllExpiredTasks() error
- func (this *Agent) RenameTask(taskid, newname string) error
- func (this *Agent) RestartTasks(pattern string) error
- func (this *Agent) SetPass()
- func (this *Agent) ShowDeletedTasks(show bool) error
- func (this *Agent) ShowExpiredTasks(show bool) error
- func (this *Agent) ShowTasks() error
- func (this *Agent) UsePassReader(p PassReader)
- type Aria2
- type Config
- type Fetcher
- type PassReader
- type Task
- type XLTask
Constants ¶
View Source
const ( DOMAIN_LIXIAN = "http://dynamic.cloud.vip.xunlei.com/" TASK_BASE = DOMAIN_LIXIAN + "user_task?userid=%s" //G_USERID TASK_HOME = DOMAIN_LIXIAN + "user_task?userid=%s&st=4" TASK_PAGE = DOMAIN_LIXIAN + "user_task?userid=%s&st=%s&p=%s" //"G_USERID,G_STATUS,G_PAGENUM HISTORY_HOME = DOMAIN_LIXIAN + "user_history?userid=%s" EXPIRE_HOME = DOMAIN_LIXIAN + "user_history?type=1&userid=%s" HISTORY_PAGE = DOMAIN_LIXIAN + "user_history?userid=%s&p=%d" APPLY_HOME = DOMAIN_LIXIAN + "user_apply?userid=%s" APPLY_PAGE = DOMAIN_LIXIAN + "user_apply?userid=%s&p=%s" LOGIN_URL = DOMAIN_LIXIAN + "login" INTERFACE_URL = DOMAIN_LIXIAN + "interface" TASKDELAY_URL = INTERFACE_URL + "/task_delay?taskids=%s&interfrom=%s&noCacheIE=%d" GETTORRENT_URL = INTERFACE_URL + "/get_torrent?userid=%s&infoid=%s" TASKPAUSE_URL = INTERFACE_URL + "/task_pause?tid=%s&uid=%s&noCacheIE=%d" REDOWNLOAD_URL = INTERFACE_URL + "/redownload?callback=jsonp%d" SHOWCLASS_URL = INTERFACE_URL + "/show_class?callback=jsonp%d&type_id=%d" MENUGET_URL = INTERFACE_URL + "/menu_get" FILLBTLIST_URL = INTERFACE_URL + "/fill_bt_list?callback=fill_bt_list&tid=%s&infoid=%s&g_net=1&p=1&uid=%s&interfrom=%s&noCacheIE=%d" TASKCHECK_URL = INTERFACE_URL + "/task_check?callback=queryCid&url=%s&interfrom=task&random=%s&tcache=%d" TASKCOMMIT_URL = INTERFACE_URL + "/task_commit?" BATCHTASKCOMMIT_URL = INTERFACE_URL + "/batch_task_commit?callback=jsonp%d" TORRENTUPLOAD_URL = INTERFACE_URL + "/torrent_upload" BTTASKCOMMIT_URL = INTERFACE_URL + "/bt_task_commit?callback=jsonp%d" URLQUERY_URL = INTERFACE_URL + "/url_query?callback=queryUrl&u=%s&random=%s" DELAYONCE_URL = INTERFACE_URL + "/delay_once?callback=anything" RENAME_URL = INTERFACE_URL + "/rename?" TASKPROCESS_URL = INTERFACE_URL + "/task_process?callback=jsonp%d&t=%d" TASKDELETE_URL = INTERFACE_URL + "/task_delete?callback=jsonp%d&type=%d&noCacheIE=%d" SHOWTASK_UNFRESH = INTERFACE_URL + "/showtask_unfresh?type_id=%d&page=%d&tasknum=%s&p=%d&interfrom=task" )
Variables ¶
View Source
var ReuseSession error
View Source
var XLTASK_HOME string
Functions ¶
func AssertTaskId ¶
func EncryptPass ¶
Types ¶
type Agent ¶
func (*Agent) AddBatchTasks ¶
func (*Agent) AddTask ¶
supported uri schemes: 'ed2k', 'http', 'https', 'ftp', 'bt', 'magnet', 'thunder', 'Flashget', 'qqdl'
func (*Agent) DeleteTask ¶
func (*Agent) DeleteTasks ¶
func (*Agent) FillBtList ¶
func (*Agent) GetTorrentByHash ¶
func (*Agent) PauseTasks ¶
func (*Agent) ProcessTask ¶
func (*Agent) ReAddAllExpiredTasks ¶
func (*Agent) RenameTask ¶
func (*Agent) RestartTasks ¶
func (*Agent) ShowDeletedTasks ¶
func (*Agent) ShowExpiredTasks ¶
func (*Agent) UsePassReader ¶
func (this *Agent) UsePassReader(p PassReader)
type XLTask ¶
type XLTask struct { Id string // task id Name string // task name Type string // task type, bt or nonbt Cat string // user defined catagory, not used currently Flag string // normal, expired, or deleted Status string // downloading, pending, paused, completed, failed Progress float32 // downloading progress Speed string Life string URL string // original url DownURL string // downloadable url Hash string // cid, infohash of bt Cookie string Size string Length string Uid int // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.