Documentation ¶
Index ¶
- type Download
- type Dsm
- type DsmAPIInfo
- type DsmError
- type GoDsmImpl
- func (c *GoDsmImpl) APIInfo(api string) (*DsmAPIInfo, error)
- func (c *GoDsmImpl) DlInfo() (map[string]interface{}, error)
- func (c *GoDsmImpl) DlInfoConfig() (map[string]interface{}, error)
- func (c *GoDsmImpl) DlSchedConfig() (map[string]interface{}, error)
- func (c *GoDsmImpl) DlSchedSetConfig(cfg map[string]bool) error
- func (c *GoDsmImpl) DlSetServer(cfg map[string]string) error
- func (c *GoDsmImpl) Download() Download
- func (c *GoDsmImpl) DsmInfo() (map[string]interface{}, error)
- func (c *GoDsmImpl) LoadAllAPIInfo() error
- func (c *GoDsmImpl) Login(account string, passwd string, sid bool) error
- func (c *GoDsmImpl) Logout() error
- func (c *GoDsmImpl) Network() (map[string]interface{}, error)
- func (c *GoDsmImpl) Session() string
- func (c *GoDsmImpl) SetSession(s string)
- func (c *GoDsmImpl) StorageInfo() (map[string]interface{}, error)
- func (c *GoDsmImpl) System() System
- func (c *GoDsmImpl) SystemUtilization() (map[string]interface{}, error)
- func (c *GoDsmImpl) Tasks(offset, limit int) (map[string]interface{}, error)
- func (c *GoDsmImpl) User(name string) (map[string]interface{}, error)
- func (c *GoDsmImpl) Users(offset, limit int) (map[string]interface{}, error)
- type System
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dsm ¶
type Dsm interface { APIInfo(api string) (*DsmAPIInfo, error) Login(user string, passwd string, sid bool) error LoadAllAPIInfo() error Logout() error System() System Download() Download }
GoDsm define interface
type DsmAPIInfo ¶
type DsmAPIInfo struct { Key string Path string RequestFormat string MinVersion int MaxVersion int }
DsmAPIInfo memorize Api info
type GoDsmImpl ¶
type GoDsmImpl struct {
// contains filtered or unexported fields
}
GoDsmImpl implements GoDsm interface
func (*GoDsmImpl) APIInfo ¶
func (c *GoDsmImpl) APIInfo(api string) (*DsmAPIInfo, error)
APIInfo return an API Info, call LoadAllAPIInfo if needed
func (*GoDsmImpl) DlInfoConfig ¶
DlInfoConfig get downloadStation info.
func (*GoDsmImpl) DlSchedConfig ¶
DlSchedConfig get downloadStation Schedule Config.
func (*GoDsmImpl) DlSchedSetConfig ¶
DlSchedSetConfig set server config can only be used by admin users. cfg should contains one or more of : - enabled if download schedule is enabled - emule_enabled if eMule download schedule is enabled.
func (*GoDsmImpl) DlSetServer ¶
DlSetServer set downloadStation info. can only be used by admin users. available configs, one or more of : - bt_max_download (in KB/s, 0 means unlimited) - bt_max_upload (in KB/s, 0 means unlimited) - emule_max_download (in KB/s, 0 means unlimited) - emule_max_upload (in KB/s, 0 means unlimited) - nzb_max_download (in KB/s, 0 means unlimited) - http_max_download (in KB/s, 0 means unlimited) - ftp_max_download (in KB/s, 0 means unlimited) - emule_enabled - unzip_service_enabled - default_destination - emule_default_destination
func (*GoDsmImpl) LoadAllAPIInfo ¶
LoadAllAPIInfo load all DsmAPIInfo in cache.
func (*GoDsmImpl) Login ¶
Login Try to connect given user. if sid is true, use sid for session tracking, otherwise use cookie
func (*GoDsmImpl) SetSession ¶
SetSession set session name Set Session <em>before</em> Login.
func (*GoDsmImpl) StorageInfo ¶
StorageInfo get system utilization infos
func (*GoDsmImpl) SystemUtilization ¶
SystemUtilization get system utilization infos
type System ¶
type System interface { DsmInfo() (map[string]interface{}, error) Network() (map[string]interface{}, error) StorageInfo() (map[string]interface{}, error) SystemUtilization() (map[string]interface{}, error) Users(offset, limit int) (map[string]interface{}, error) User(name string) (map[string]interface{}, error) }
System get System informations