Documentation ¶
Index ¶
- Variables
- func GetHosts(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func GetMetadata(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func InitSchema()
- func InitTemplate(force bool)
- type Blob
- type ElasticModule
- type ElasticORM
- func (handler *ElasticORM) Count(o interface{}, query interface{}) (int64, error)
- func (handler *ElasticORM) Delete(ctx *api.Context, o interface{}) error
- func (handler *ElasticORM) DeleteBy(o interface{}, query interface{}) error
- func (handler *ElasticORM) Get(o interface{}) (bool, error)
- func (handler *ElasticORM) GetBy(field string, value interface{}, t interface{}) (error, api.Result)
- func (handler *ElasticORM) GetIndexName(o interface{}) string
- func (handler *ElasticORM) GetWildcardIndexName(o interface{}) string
- func (handler *ElasticORM) GroupBy(t interface{}, selectField, groupField string, haveQuery string, ...) (error, map[string]interface{})
- func (handler *ElasticORM) RegisterSchemaWithIndexName(t interface{}, indexName string) error
- func (handler *ElasticORM) Save(ctx *api.Context, o interface{}) error
- func (handler *ElasticORM) Search(t interface{}, q *api.Query) (error, api.Result)
- func (handler *ElasticORM) Update(ctx *api.Context, o interface{}) error
- func (handler *ElasticORM) UpdateBy(o interface{}, query interface{}) error
- type ElasticStore
- func (store *ElasticStore) AddValue(bucket string, key []byte, value []byte) error
- func (store *ElasticStore) AddValueCompress(bucket string, key []byte, value []byte) error
- func (store *ElasticStore) Close() error
- func (store *ElasticStore) DeleteBucket(bucket string) error
- func (store *ElasticStore) DeleteKey(bucket string, key []byte) error
- func (store *ElasticStore) ExistsKey(bucket string, key []byte) (bool, error)
- func (store *ElasticStore) GetCompressedValue(bucket string, key []byte) ([]byte, error)
- func (store *ElasticStore) GetValue(bucket string, key []byte) ([]byte, error)
- func (store *ElasticStore) Open() error
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 ¶
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) 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
Click to show internal directories.
Click to hide internal directories.