Documentation
¶
Overview ¶
* Copyright (c) 2018 Vladyslav Yamkovyi (Hexawolf), Maks Mazurov (fox.cpp) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE.
Index ¶
- Constants
- type Client
- func (c *Client) Download(url string) (io.ReadCloser, error)
- func (c *Client) PollTasks() (id int, type_ string, body map[string]interface{}, err error)
- func (c *Client) RegisterAgent(name, hwid string) error
- func (c *Client) SendTaskResult(taskID int, result map[string]interface{}) error
- func (c *Client) UploadFile(src io.Reader) (string, error)
- func (c *Client) UseAccount(token string)
Constants ¶
const AGENT_VERSION = 1
AGENT_VERSION is a super-pooper shared number that is used to identify if we need a agent update
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
SupportedTaskTypes []string
// contains filtered or unexported fields
}
Wrapper class that takes care of all boilerplate required for agent session.
func (*Client) PollTasks ¶
PollTasks requests first task from server's queue.
It may block for up to 26 seconds. And also note that it returns error for tasks with type not in SupportedTaskTypes (if SupportTaskTypes is not nil).
This function will return id=-1 if no tasks received.