Documentation
¶
Overview ¶
Package http provides low-level methods to interact with the Horizon instance through its REST API.
Index ¶
- type Client
- func (c *Client) BaseUrl() url.URL
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) Get(path string) (response *HorizonResponse, err error)
- func (c *Client) Init(baseUrl url.URL, apiId string, apiKey string)
- func (c *Client) Post(path string, body []byte) (response *HorizonResponse, err error)
- func (c *Client) SetCaBundle(caBundle string)
- func (c *Client) SetProxy(proxyUrl url.URL)
- func (c *Client) SkipTLSVerify()
- func (c *Client) Unmarshal(r *http.Response) (*HorizonResponse, error)
- type Feature
- type HorizonErrorResponse
- type HorizonResponse
- type NotImplementedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) Init ¶
Init initializes the instance parameters such as its location, and authentication data.
func (*Client) Post ¶
func (c *Client) Post(path string, body []byte) (response *HorizonResponse, err error)
func (*Client) SetCaBundle ¶
SetCaBundle sets the client certificate than can be used for authentication.
func (*Client) SkipTLSVerify ¶
func (c *Client) SkipTLSVerify()
type HorizonErrorResponse ¶
type HorizonErrorResponse struct { Code string `json:"error"` Message string `json:"message"` Detail string `json:"detail"` }
func (*HorizonErrorResponse) Error ¶
func (e *HorizonErrorResponse) Error() string
type HorizonResponse ¶
func (*HorizonResponse) HasContentType ¶ added in v0.0.4
func (r *HorizonResponse) HasContentType(mimeType string) bool
func (*HorizonResponse) Json ¶
func (r *HorizonResponse) Json() *json.Decoder
type NotImplementedError ¶ added in v0.0.4
type NotImplementedError struct { Feature Feature `json:"feature"` ImplementedIn string `json:"implementedIn"` }
func (*NotImplementedError) Error ¶ added in v0.0.4
func (e *NotImplementedError) Error() string
Click to show internal directories.
Click to hide internal directories.