elastic

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: AGPL-3.0 Imports: 35 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("record not found")

Functions

func GetHosts

func GetHosts(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func GetMetadata

func GetMetadata(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func InitSchema

func InitSchema()

func InitTemplate

func InitTemplate(force bool)

Types

type Blob

type Blob struct {
	Content string `json:"content,omitempty" elastic_mapping:"content: { type: binary, doc_values:false }"`
}

type ElasticModule

type ElasticModule struct {
	// contains filtered or unexported fields
}

func (*ElasticModule) Name

func (module *ElasticModule) Name() string

func (*ElasticModule) Setup

func (module *ElasticModule) Setup()

func (*ElasticModule) Start

func (module *ElasticModule) Start() error

func (*ElasticModule) Stop

func (module *ElasticModule) Stop() error

type ElasticORM

type ElasticORM struct {
	Client elastic.API
	Config common.ORMConfig
}

func (*ElasticORM) Count

func (handler *ElasticORM) Count(o interface{}, query interface{}) (int64, error)

func (*ElasticORM) Delete

func (handler *ElasticORM) Delete(ctx *api.Context, o interface{}) error

func (*ElasticORM) DeleteBy

func (handler *ElasticORM) DeleteBy(o interface{}, query interface{}) error

func (*ElasticORM) Get

func (handler *ElasticORM) Get(o interface{}) (bool, error)

func (*ElasticORM) GetBy

func (handler *ElasticORM) GetBy(field string, value interface{}, t interface{}) (error, api.Result)

func (*ElasticORM) GetIndexName

func (handler *ElasticORM) GetIndexName(o interface{}) string

func (*ElasticORM) GetWildcardIndexName

func (handler *ElasticORM) GetWildcardIndexName(o interface{}) string

func (*ElasticORM) GroupBy

func (handler *ElasticORM) GroupBy(t interface{}, selectField, groupField string, haveQuery string, haveValue interface{}) (error, map[string]interface{})

func (*ElasticORM) RegisterSchemaWithIndexName

func (handler *ElasticORM) RegisterSchemaWithIndexName(t interface{}, indexName string) error

func (*ElasticORM) Save

func (handler *ElasticORM) Save(ctx *api.Context, o interface{}) error

func (*ElasticORM) Search

func (handler *ElasticORM) Search(t interface{}, q *api.Query) (error, api.Result)

TODO replaced all usage with SearchWithResultItemMapper

func (*ElasticORM) SearchWithResultItemMapper added in v1.1.2

func (handler *ElasticORM) SearchWithResultItemMapper(resultArray interface{}, itemMapFunc func(source []byte, targetRef interface{}) error, q *api.Query) (error, api.SimpleResult)

func (*ElasticORM) Update

func (handler *ElasticORM) Update(ctx *api.Context, o interface{}) error

update operation will merge the new data into the old data

func (*ElasticORM) UpdateBy

func (handler *ElasticORM) UpdateBy(o interface{}, query interface{}) error

type ElasticStore

type ElasticStore struct {
	Client elastic.API
	Config common.StoreConfig
}

func (*ElasticStore) AddValue

func (store *ElasticStore) AddValue(bucket string, key []byte, value []byte) error

func (*ElasticStore) AddValueCompress

func (store *ElasticStore) AddValueCompress(bucket string, key []byte, value []byte) error

func (*ElasticStore) Close

func (store *ElasticStore) Close() error

func (*ElasticStore) DeleteBucket

func (store *ElasticStore) DeleteBucket(bucket string) error

func (*ElasticStore) DeleteKey

func (store *ElasticStore) DeleteKey(bucket string, key []byte) error

func (*ElasticStore) ExistsKey

func (store *ElasticStore) ExistsKey(bucket string, key []byte) (bool, error)

func (*ElasticStore) GetCompressedValue

func (store *ElasticStore) GetCompressedValue(bucket string, key []byte) ([]byte, error)

func (*ElasticStore) GetValue

func (store *ElasticStore) GetValue(bucket string, key []byte) ([]byte, error)

func (*ElasticStore) Open

func (store *ElasticStore) Open() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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