Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientAPI ¶
type ClientAPI interface {
Status() ed2k.ClientStatus
TransferSnapshots() []ed2k.TransferSnapshot
AddLink(linkValue, outputDir string) (ed2k.TransferHandle, string, error)
PauseTransfer(hash protocol.Hash) error
ResumeTransfer(hash protocol.Hash) error
RemoveTransfer(hash protocol.Hash, deleteFile bool) error
}
ClientAPI 是 Web API 所需的客户端操作子集。
type Handler ¶
Handler 提供基于 net/http 的 REST API。
func NewHandler ¶
NewHandler 创建 API 处理器。user/pass 均非空时启用 Basic Auth。
Click to show internal directories.
Click to hide internal directories.