Documentation ¶
Overview ¶
The dank package provides a Client for interfacing with an instance of dank.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignOptions ¶
type AssignOptions struct {
types.AssignRequest
}
AssignOptions mirrors an AssignRequest but can be constructed without requiring the dank/types package
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewClient retuns a new dank Client for the given hostname, the hostname will be looked up via an optimistic (if it fails we don't care) SRV record before each request.
func (*Client) Assign ¶
func (d *Client) Assign(ar *AssignOptions) (*types.Assignment, error)
Assign gets a assignment from seaweed If you want to have no restrictions/options on the file, send a nil AssignOptions
func (*Client) Upload ¶
Upload uploads an array of bytes and uploads it to the assignment. If assignment is nil, one will be created
Returns the filename uploaded to and error.
func (*Client) UploadFile ¶
UploadFile takes a diskFilename and reads the file off the disk and uploads it using Upload