Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct {
BaseURL string
BaseQueryURL string
Username string
Password string
Client *http.Client
Hostname string
Port int
QueryPort int
}
HTTPClient represents a single connection to an Elasticsearch host
func CreateClient ¶
func CreateClient(args *arguments.ArgumentList, hostnameOverride string) (*HTTPClient, error)
CreateClient creates a new http client for Couchbase. The hostnameOverride parameter specifies a hostname that the client should connect to. Passing in an empty string causes the client to use the hostname specified in the command-line args. (default behavior)
func (*HTTPClient) Request ¶
func (c *HTTPClient) Request(endpoint string, model interface{}) error
Request attempts to make a request to the Couchbase API, storing the result in the given model if successful. Returns an error if the request cannot be completed or a non-200 status code is returned.
Click to show internal directories.
Click to hide internal directories.