Documentation
¶
Index ¶
- func ReadJSON(body io.ReadCloser, x interface{}) error
- func ReadYAML(body io.ReadCloser, x interface{}) error
- type Conn
- func (c *Conn) Authenticate() (string, error)
- func (c *Conn) Delete(path string) (*http.Response, error)
- func (c *Conn) Get(path string) (*http.Response, error)
- func (c *Conn) Post(path string, ctype string, data []byte) (*http.Response, error)
- func (c *Conn) Put(path string, ctype string, data []byte) (*http.Response, error)
- func (c *Conn) Request(method, path, ctype string, data []byte, headers map[string]string) (*http.Response, error)
- func (c *Conn) Stream(path string, stream string) (chan *sse.Event, error)
- func (c *Conn) WSStream(path string, stream string) (chan []byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadJSON ¶
func ReadJSON(body io.ReadCloser, x interface{}) error
ReadJSON : reads a json response into an interface
Types ¶
type Conn ¶
Conn : creates a new connection
func (*Conn) Authenticate ¶
Authenticate : authenticate against an ernest instance
func (*Conn) Request ¶
func (c *Conn) Request(method, path, ctype string, data []byte, headers map[string]string) (*http.Response, error)
Request : make a raw request to ernest
Click to show internal directories.
Click to hide internal directories.