escli

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ESClient

type ESClient interface {
	Update(index, typ, id string, value string) error
	Set(index, typ, id string, value db.Record) error
	Get(index, typ, id string) (*json.RawMessage, error)
	List(index, typ string, kv []*db.ListKV) ([]*json.RawMessage, error)
	BulkUpdate(rs []db.Record) error

	IndexExists(index string) (bool, error)
	CreateIndex(index string, typ, mapping string) (bool, error)
	DeleteIndex(index string) (bool, error)

	MGet(idx, typ string, ids []string, decode func(x *json.RawMessage) (interface{}, error)) ([]interface{}, error)
	Search(idx, typ string, query *querypara.Query, decode func(x *json.RawMessage) (interface{}, error)) ([]interface{}, error)
	Count(idx, typ string, query *querypara.Query) (int64, error)
	Agg(idx, typ string, query *querypara.Search) (*aggdecode.AggregationBucketKeyItem, error)

	Exists(name string) (bool, error)
	Create(name string, table, definition string) (bool, error)
	Delete(name string) (bool, error)

	Status() *status.Status
	GetVersion() int32
	PerformRequest(method, path string, params url.Values, body interface{}, headers http.Header) (interface{}, error)
	DeleteByQuery(idx, typ string, query *querypara.Query) error
}

func NewESLongConnect

func NewESLongConnect(host string, prefix string, version int32, username, password string) (ESClient, error)

NewESLongConnect create db handler

func NewESShortConnect

func NewESShortConnect(host string, prefix string, version int32, username, password string) (ESClient, error)

NewESShortConnect create db handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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