elastic

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: AGPL-3.0 Imports: 34 Imported by: 0

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)

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