esapiclient

package
v0.0.0-...-3120ddf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	Cfg *Configuration
}

APIClient defines elasticsearch API client config

func (*APIClient) PrepareAndCall

func (c *APIClient) PrepareAndCall(
	path string,
	method string,
	postBody []byte,
	headerParams map[string]string,
	queryParams url.Values) ([]byte, *http.Response, error)

PrepareAndCall prepare http request and do it

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth defins basic auth configuration for http client

type Configuration

type Configuration struct {
	Host          string            `json:"host,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	BasicAuth     BasicAuth         `json:"basicAuth,omitempty"`
	HTTPClient    *http.Client
}

Configuration defines http client config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL