Documentation ¶
Index ¶
- type Client
- func (c *Client) Get(function string, params map[string]string) ([]byte, error)
- func (c *Client) PostFile(function string, fileParameterName string, filename string, ...) ([]byte, error)
- func (c *Client) PostJSON(function string, json []byte) ([]byte, error)
- func (c *Client) PostRequest(function string, params map[string]string) ([]byte, error)
- func (c *Client) PostRequestRaw(function string, params map[string]interface{}) ([]byte, error)
- type ClientCtor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
BaseEndpoint string
}
Client represents a basic REST client.
func (*Client) PostFile ¶
func (c *Client) PostFile(function string, fileParameterName string, filename string, params map[string]string) ([]byte, error)
PostFile submits a file in a POST request using a multipart form.
func (*Client) PostRequest ¶
PostRequest submits a post request with the provided parameters.
type ClientCtor ¶
type ClientCtor func() *Client
ClientCtor repressents a client constructor to instantiate a rest client.
func NewClient ¶
func NewClient(endpoint string) ClientCtor
NewClient instantiates and returns a new REST client constructor.
Click to show internal directories.
Click to hide internal directories.