Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorUnexpectedStatusCode = errors.New("unexpected status code from api")
ErrorUnexpectedStatusCode represents the error message to be returned when the status received from elastic is not as expected
Functions ¶
func GetMappingsJSON ¶ added in v1.12.0
func GetMappingsJSON() []byte
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API aggregates a client and URL and other common data for accessing the API
func NewElasticSearchAPI ¶
func NewElasticSearchAPI(clienter http.Clienter, elasticSearchClient *elasticsearch.Client) *API
NewElasticSearchAPI creates an ElasticSearchAPI object
func (*API) AddDimensionOption ¶
func (api *API) AddDimensionOption(ctx context.Context, instanceID, dimension string, dimensionOption models.DimensionOption) (int, error)
AddDimensionOption adds a document to an elastic search index
func (*API) CreateSearchIndex ¶
CreateSearchIndex creates a new index in elastic search
type APIer ¶
type APIer interface { CreateSearchIndex(ctx context.Context, instanceID, dimension string) (int, error) DeleteSearchIndex(ctx context.Context, instanceID, dimension string) (int, error) AddDimensionOption(ctx context.Context, instanceID, dimension string, dimensionOption models.DimensionOption) (int, error) }
APIer - An interface used to access the ElasticAPI
Click to show internal directories.
Click to hide internal directories.