Documentation ¶
Index ¶
- Constants
- func ExecOsCmd(cmdStr string, checkStdErr bool) (string, error)
- func ExecOsCmd2Screen(cmdStr string, checkStdErr bool) (string, error)
- func ExecOsCmdBase(cmdStr string, out2Screen bool, checkStdErr bool) (string, error)
- func LevelDbDelete(dbFilepath, key, value string) error
- func LevelDbGet(dbFilepath, key string) ([]byte, error)
- func LevelDbPut(dbFilepath, key string, value interface{}) error
- type Aria2ChangeMaxConcurrentDownloads
- type Aria2Client
- func (aria2Client *Aria2Client) ChangeMaxConcurrentDownloads(maxConcurrentDownloads string) *Aria2ChangeMaxConcurrentDownloads
- func (aria2Client *Aria2Client) DownloadFile(uri string, outDir, outFilename string) *Aria2Download
- func (aria2Client *Aria2Client) GenPayload4Download(method string, uri string, outDir, outFilename string) Aria2Payload
- func (aria2Client *Aria2Client) GenPayload4Status(gid string) Aria2Payload
- func (aria2Client *Aria2Client) GetDownloadStatus(gid string) *Aria2Status
- func (aria2Client *Aria2Client) RemoveDownload(gid string) (err error)
- type Aria2Download
- type Aria2DownloadOption
- type Aria2Error
- type Aria2Payload
- type Aria2Resp
- type Aria2Status
- type Aria2StatusResult
- type Aria2StatusResultFile
- type Aria2StatusResultFileUri
- type ChangeMaxConcurrentDownloads
- type JsonRpcParams
Constants ¶
View Source
const ADD_URI = "aria2.addUri"
View Source
const CHANGE_GLOBAL_OPTION = "aria2.changeGlobalOption"
View Source
const Remove = "aria2.remove"
View Source
const SHELL_TO_USE = "bash"
View Source
const STATUS = "aria2.tellStatus"
Variables ¶
This section is empty.
Functions ¶
func ExecOsCmdBase ¶
func LevelDbDelete ¶ added in v0.0.9
func LevelDbGet ¶ added in v0.0.9
func LevelDbPut ¶ added in v0.0.9
Types ¶
type Aria2ChangeMaxConcurrentDownloads ¶ added in v0.2.131
type Aria2ChangeMaxConcurrentDownloads struct { Id string `json:"id"` JsonRpc string `json:"jsonrpc"` Error *Aria2Error `json:"error"` Result interface{} `json:"result"` }
type Aria2Client ¶ added in v0.2.11
type Aria2Client struct { Host string // contains filtered or unexported fields }
func GetAria2Client ¶ added in v0.2.11
func GetAria2Client(aria2Host, aria2Secret string, aria2Port int) *Aria2Client
func (*Aria2Client) ChangeMaxConcurrentDownloads ¶ added in v0.2.131
func (aria2Client *Aria2Client) ChangeMaxConcurrentDownloads(maxConcurrentDownloads string) *Aria2ChangeMaxConcurrentDownloads
func (*Aria2Client) DownloadFile ¶ added in v0.2.11
func (aria2Client *Aria2Client) DownloadFile(uri string, outDir, outFilename string) *Aria2Download
func (*Aria2Client) GenPayload4Download ¶ added in v0.2.11
func (aria2Client *Aria2Client) GenPayload4Download(method string, uri string, outDir, outFilename string) Aria2Payload
func (*Aria2Client) GenPayload4Status ¶ added in v0.2.11
func (aria2Client *Aria2Client) GenPayload4Status(gid string) Aria2Payload
func (*Aria2Client) GetDownloadStatus ¶ added in v0.2.11
func (aria2Client *Aria2Client) GetDownloadStatus(gid string) *Aria2Status
func (*Aria2Client) RemoveDownload ¶ added in v0.3.0
func (aria2Client *Aria2Client) RemoveDownload(gid string) (err error)
type Aria2Download ¶ added in v0.2.11
type Aria2Download struct { Id string `json:"id"` JsonRpc string `json:"jsonrpc"` Error *Aria2Error `json:"error"` Gid string `json:"result"` }
type Aria2DownloadOption ¶ added in v0.2.11
type Aria2Error ¶ added in v0.2.11
type Aria2Payload ¶ added in v0.2.11
type Aria2Resp ¶ added in v0.3.0
type Aria2Resp struct { Id string `json:"id"` JsonRpc string `json:"jsonrpc"` Error *Aria2Error `json:"error"` Result interface{} `json:"result"` }
type Aria2Status ¶ added in v0.2.11
type Aria2Status struct { Id string `json:"id"` JsonRpc string `json:"jsonrpc"` Error *Aria2Error `json:"error"` Result *Aria2StatusResult `json:"result"` }
type Aria2StatusResult ¶ added in v0.2.11
type Aria2StatusResult struct { Bitfield string `json:"bitfield"` CompletedLength string `json:"completedLength"` Connections string `json:"connections"` Dir string `json:"dir"` DownloadSpeed string `json:"downloadSpeed"` ErrorCode string `json:"errorCode"` ErrorMessage string `json:"errorMessage"` Gid string `json:"gid"` NumPieces string `json:"numPieces"` PieceLength string `json:"pieceLength"` Status string `json:"status"` TotalLength string `json:"totalLength"` UploadLength string `json:"uploadLength"` UploadSpeed string `json:"uploadSpeed"` Files []Aria2StatusResultFile `json:"files"` }
type Aria2StatusResultFile ¶ added in v0.2.11
type Aria2StatusResultFileUri ¶ added in v0.2.11
type ChangeMaxConcurrentDownloads ¶ added in v0.2.131
type ChangeMaxConcurrentDownloads struct {
MaxConcurrentDownloads string `json:"max-concurrent-downloads"`
}
type JsonRpcParams ¶ added in v0.2.11
Click to show internal directories.
Click to hide internal directories.