Documentation ¶
Index ¶
- type Client
- func (web *Client) Getimag(url string) (io.Reader, error)
- func (web *Client) Getrq(url string) (*protocol.RQGetResp, error)
- func (web *Client) Newrq(url string, renreq *protocol.RenderRequest) (*protocol.RQNewResp, error)
- func (web *Client) RenderCycle(url string, renreq *protocol.RenderRequest) (*RenderResult, error)
- func (web *Client) Rqzoom(rqurl string, renreq *protocol.RenderRequest) (*protocol.RQNewResp, error)
- func (web *Client) Url(path string) string
- type Config
- type HttpClient
- type HttpRequest
- type HttpResponse
- type RenderResult
- type RestIO
- type UserControl
- type WebResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides an interface to restfulbrot over the web, using a user-defined web interface. This allows inclusion of this stock code within static archives for other platforms, or gopherjs for javascript.
func (*Client) RenderCycle ¶
func (web *Client) RenderCycle(url string, renreq *protocol.RenderRequest) (*RenderResult, error)
type HttpClient ¶
type HttpClient interface { Get(string) (HttpResponse, error) Post(string, string, io.Reader) (HttpResponse, error) }
type HttpRequest ¶
type HttpResponse ¶
type RestIO ¶
type RestIO struct { Request HttpRequest Response chan<- WebResult }
type UserControl ¶
type UserControl struct {
// contains filtered or unexported fields
}
UserControl is loosely coupled request/response mechanism
func NewUserControl ¶
func NewUserControl(timeout uint) *UserControl
func (*UserControl) Comms ¶
func (uc *UserControl) Comms() <-chan RestIO
Communicate with the restclient library asynchronously using Comms()
func (*UserControl) Get ¶
func (uc *UserControl) Get(url string) (HttpResponse, error)
func (*UserControl) Post ¶
func (uc *UserControl) Post(url string, ctype string, body io.Reader) (HttpResponse, error)
type WebResult ¶
type WebResult struct { Response HttpResponse Error error }
Click to show internal directories.
Click to hide internal directories.