{"modulePath":"github.com/infinitbyte/framework","version":"v1.1.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package elastic\n\n## Variables\n\n```go\nvar ErrNotFound = errors.New(\"record not found\")\n```\n\n## Functions\n\n```go\nfunc GetHosts(w http.ResponseWriter, req *http.Request, ps httprouter.Params)\n```\n\n```go\nfunc GetMetadata(w http.ResponseWriter, req *http.Request, ps httprouter.Params)\n```\n\n```go\nfunc InitSchema()\n```\n\n```go\nfunc InitTemplate(force bool)\n```\n\n## Types\n\n```go\ntype Blob struct {\n\tContent string `json:\"content,omitempty\" elastic_mapping:\"content: { type: binary, doc_values:false }\"`\n}\n```\n\n```go\ntype ElasticModule struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (module *ElasticModule) Name() string\n```\n\n```go\nfunc (module *ElasticModule) Setup()\n```\n\n```go\nfunc (module *ElasticModule) Start() error\n```\n\n```go\nfunc (module *ElasticModule) Stop() error\n```\n\n```go\ntype ElasticORM struct {\n\tClient elastic.API\n\tConfig common.ORMConfig\n}\n```\n\n```go\nfunc (handler *ElasticORM) Count(o interface{}, query interface{}) (int64, error)\n```\n\n```go\nfunc (handler *ElasticORM) Delete(ctx *api.Context, o interface{}) error\n```\n\n```go\nfunc (handler *ElasticORM) DeleteBy(o interface{}, query interface{}) error\n```\n\n```go\nfunc (handler *ElasticORM) Get(o interface{}) (bool, error)\n```\n\n```go\nfunc (handler *ElasticORM) GetBy(field string, value interface{}, t interface{}) (error, api.Result)\n```\n\n```go\nfunc (handler *ElasticORM) GetIndexName(o interface{}) string\n```\n\n```go\nfunc (handler *ElasticORM) GetWildcardIndexName(o interface{}) string\n```\n\n```go\nfunc (handler *ElasticORM) GroupBy(t interface{}, selectField, groupField string, haveQuery string, haveValue interface{}) (error, map[string]interface{})\n```\n\n```go\nfunc (handler *ElasticORM) RegisterSchemaWithIndexName(t interface{}, indexName string) error\n```\n\n```go\nfunc (handler *ElasticORM) Save(ctx *api.Context, o interface{}) error\n```\n\n```go\nfunc (handler *ElasticORM) Search(t interface{}, q *api.Query) (error, api.Result)\n```\nTODO replaced all usage with SearchWithResultItemMapper\n\n```go\nfunc (handler *ElasticORM) SearchWithResultItemMapper(resultArray interface{}, itemMapFunc func(source []byte, targetRef interface{}) error, q *api.Query) (error, api.SimpleResult)\n```\n\n```go\nfunc (handler *ElasticORM) Update(ctx *api.Context, o interface{}) error\n```\nupdate operation will merge the new data into the old data\n\n```go\nfunc (handler *ElasticORM) UpdateBy(o interface{}, query interface{}) error\n```\n\n```go\ntype ElasticStore struct {\n\tClient elastic.API\n\tConfig common.StoreConfig\n}\n```\n\n```go\nfunc (store *ElasticStore) AddValue(bucket string, key []byte, value []byte) error\n```\n\n```go\nfunc (store *ElasticStore) AddValueCompress(bucket string, key []byte, value []byte) error\n```\n\n```go\nfunc (store *ElasticStore) Close() error\n```\n\n```go\nfunc (store *ElasticStore) DeleteBucket(bucket string) error\n```\n\n```go\nfunc (store *ElasticStore) DeleteKey(bucket string, key []byte) error\n```\n\n```go\nfunc (store *ElasticStore) ExistsKey(bucket string, key []byte) (bool, error)\n```\n\n```go\nfunc (store *ElasticStore) GetCompressedValue(bucket string, key []byte) ([]byte, error)\n```\n\n```go\nfunc (store *ElasticStore) GetValue(bucket string, key []byte) ([]byte, error)\n```\n\n```go\nfunc (store *ElasticStore) Open() error\n```\n\n","path":"github.com/infinitbyte/framework/modules/elastic","name":"elastic","synopsis":"","isRedistributable":true}
