Documentation ¶
Index ¶
- Variables
- type API
- type ActionParam
- type AliasAction
- type AliasExists
- type AliasExistsRequest
- type AliasGet
- type AliasGetRequest
- type Aliases
- type AliasesRequest
- type BaseRequest
- type BulkAction
- type BulkItem
- type Cat
- type CatIndices
- type CatIndicesRequest
- type Doc
- type Document
- type DocumentBulk
- type DocumentBulkRequest
- type DocumentIndex
- type DocumentIndexRequest
- type Get
- type GetRequest
- type IndexCreate
- type IndexCreateRequest
- type IndexDelete
- type IndexDeleteRequest
- type IndexExists
- type IndexExistsRequest
- type IndexGetMapping
- type IndexGetMappingRequest
- type Indexer
- type Ping
- type PingRequest
- type Request
- type Response
- type Search
- func (f Search) WithBody(v *[]byte) func(*SearchRequest)
- func (f Search) WithIndex(v ...string) func(*SearchRequest)
- func (f Search) WithSource(v ...string) func(*SearchRequest)
- func (f Search) WithSourceExcludes(v ...string) func(*SearchRequest)
- func (f Search) WithSourceIncludes(v ...string) func(*SearchRequest)
- func (f Search) WithTrackTotalHits(v bool) func(*SearchRequest)
- type SearchRequest
- type Searcher
- type SettingsGet
- type SettingsGetRequest
- type Transport
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MethodPostFunc = func() string { return http.MethodPost } MethodPutFunc = func() string { return http.MethodPut } MethodGetFunc = func() string { return http.MethodGet } MethodDeleteFunc = func() string { return http.MethodDelete } MethodHeadFunc = func() string { return http.MethodHead } )
Functions ¶
This section is empty.
Types ¶
type ActionParam ¶
type ActionParam struct { Index string `json:"index,omitempty"` Indices []string `json:"indices,omitempty"` Alias string `json:"alias,omitempty"` Aliases []string `json:"aliases,omitempty"` Filter map[string]interface{} `json:"filter,omitempty"` IsHidden bool `json:"is_hidden,omitempty"` MustExist bool `json:"must_exist,omitempty"` IsWriteIndex bool `json:"is_write_index,omitempty"` Routing string `json:"routing,omitempty"` IndexRouting string `json:"index_routing,omitempty"` SearchRouting string `json:"search_routing,omitempty"` }
type AliasAction ¶
type AliasAction struct { Add *ActionParam `json:"add,omitempty"` Remove *ActionParam `json:"remove,omitempty"` RemoveIndex *ActionParam `json:"remove_index,omitempty"` }
type AliasExists ¶
type AliasExists func(alias []string, o ...func(request *AliasExistsRequest)) (*Response, error)
func (AliasExists) WithIndex ¶
func (f AliasExists) WithIndex(v ...string) func(*AliasExistsRequest)
type AliasExistsRequest ¶
type AliasExistsRequest struct { BaseRequest Alias []string }
type AliasGet ¶
type AliasGet func(o ...func(*AliasGetRequest)) (*Response, error)
func (AliasGet) WithAlias ¶
func (f AliasGet) WithAlias(v ...string) func(*AliasGetRequest)
func (AliasGet) WithIndex ¶
func (f AliasGet) WithIndex(v ...string) func(*AliasGetRequest)
type AliasGetRequest ¶
type AliasGetRequest struct { BaseRequest Alias []string }
type Aliases ¶
type Aliases func(actions []*AliasAction, o ...func(*AliasesRequest)) (*Response, error)
type AliasesRequest ¶
type AliasesRequest struct {
BaseRequest
}
type BaseRequest ¶
func (*BaseRequest) AddParam ¶
func (b *BaseRequest) AddParam(key, value string)
type BulkAction ¶
type Cat ¶
type Cat struct {
Indices CatIndices
}
type CatIndices ¶
type CatIndices func(o ...func(*CatIndicesRequest)) (*Response, error)
func (*CatIndices) WithColumns ¶
func (f *CatIndices) WithColumns(v ...string) func(*CatIndicesRequest)
func (*CatIndices) WithFormat ¶
func (f *CatIndices) WithFormat(v string) func(*CatIndicesRequest)
func (*CatIndices) WithIndex ¶
func (f *CatIndices) WithIndex(v ...string) func(*CatIndicesRequest)
type CatIndicesRequest ¶
type CatIndicesRequest struct { BaseRequest H string Format string }
type Doc ¶
type Doc interface { BulkAction() *BulkAction Content() []byte GetUUID() string }
type Document ¶
type Document struct { Index DocumentIndex Bulk DocumentBulk Get Get }
type DocumentBulk ¶
type DocumentBulk func(docs []Doc, o ...func(*DocumentBulkRequest)) (*Response, error)
func (DocumentBulk) WithFilterPath ¶ added in v0.0.3
func (f DocumentBulk) WithFilterPath(filterPath string) func(request *DocumentBulkRequest)
func (DocumentBulk) WithIndex ¶
func (f DocumentBulk) WithIndex(v string) func(*DocumentBulkRequest)
type DocumentBulkRequest ¶
type DocumentBulkRequest struct {
BaseRequest
}
type DocumentIndex ¶
type DocumentIndex func(index string, doc Doc, o ...func(*DocumentIndexRequest)) (*Response, error)
func (DocumentIndex) WithDocumentID ¶
func (f DocumentIndex) WithDocumentID(v string) func(*DocumentIndexRequest)
func (DocumentIndex) WithOpType ¶
func (f DocumentIndex) WithOpType(v string) func(*DocumentIndexRequest)
type DocumentIndexRequest ¶
type DocumentIndexRequest struct { BaseRequest DocumentID string OpType string }
type Get ¶
type Get func(index, _id string, o ...func(*GetRequest)) (*Response, error)
func (Get) WithExcludes ¶
func (g Get) WithExcludes(v ...string) func(*GetRequest)
func (Get) WithIncludes ¶
func (g Get) WithIncludes(v ...string) func(*GetRequest)
type GetRequest ¶
type GetRequest struct { BaseRequest DocumentID string }
type IndexCreate ¶
type IndexCreate func(index string, o ...func(request *IndexCreateRequest)) (*Response, error)
func (IndexCreate) WithBody ¶
func (f IndexCreate) WithBody(v *[]byte) func(*IndexCreateRequest)
type IndexCreateRequest ¶
type IndexCreateRequest struct {
BaseRequest
}
type IndexDelete ¶
type IndexDelete func(index []string, o ...func(*IndexDeleteRequest)) (*Response, error)
type IndexDeleteRequest ¶
type IndexDeleteRequest struct {
BaseRequest
}
type IndexExists ¶
type IndexExists func(o ...func(*IndexExistsRequest)) (*Response, error)
func (IndexExists) WithIndex ¶
func (f IndexExists) WithIndex(v string) func(*IndexExistsRequest)
type IndexExistsRequest ¶
type IndexExistsRequest struct {
BaseRequest
}
type IndexGetMapping ¶
type IndexGetMapping func(o ...func(request *IndexGetMappingRequest)) (*Response, error)
func (IndexGetMapping) WithIndex ¶
func (f IndexGetMapping) WithIndex(v string) func(*IndexGetMappingRequest)
type IndexGetMappingRequest ¶
type IndexGetMappingRequest struct {
BaseRequest
}
type Indexer ¶
type Indexer struct { Create IndexCreate Delete IndexDelete GetMapping IndexGetMapping Exists IndexExists AliasExists AliasExists AliasGet AliasGet Aliases Aliases SettingsGet SettingsGet }
type PingRequest ¶
type PingRequest struct {
BaseRequest
}
type Response ¶
func (*Response) ResultBytes ¶
func (*Response) ResultJson ¶
func (*Response) ResultString ¶
type Search ¶
type Search func(o ...func(*SearchRequest)) (*Response, error)
func (Search) WithBody ¶
func (f Search) WithBody(v *[]byte) func(*SearchRequest)
func (Search) WithIndex ¶
func (f Search) WithIndex(v ...string) func(*SearchRequest)
func (Search) WithSource ¶
func (f Search) WithSource(v ...string) func(*SearchRequest)
func (Search) WithSourceExcludes ¶
func (f Search) WithSourceExcludes(v ...string) func(*SearchRequest)
func (Search) WithSourceIncludes ¶
func (f Search) WithSourceIncludes(v ...string) func(*SearchRequest)
func (Search) WithTrackTotalHits ¶
func (f Search) WithTrackTotalHits(v bool) func(*SearchRequest)
type SearchRequest ¶
type SearchRequest struct { BaseRequest Source []string SourceExcludes []string SourceIncludes []string TrackTotalHits bool }
type SettingsGet ¶
type SettingsGet func(o ...func(*SettingsGetRequest)) (*Response, error)
func (SettingsGet) WithIndex ¶
func (f SettingsGet) WithIndex(v ...string) func(*SettingsGetRequest)
func (SettingsGet) WithSettings ¶
func (f SettingsGet) WithSettings(v ...string) func(*SettingsGetRequest)
type SettingsGetRequest ¶
type SettingsGetRequest struct { BaseRequest Settings []string FlatSettings bool }
Source Files ¶
- api._.go
- api._cat.indices.go
- api.document.bulk.go
- api.document.get.go
- api.document.index.go
- api.index._alias_exists.go
- api.index._alias_get.go
- api.index._aliases.go
- api.index.create.go
- api.index.delete.go
- api.index.exists.go
- api.index.getmapping.go
- api.index.settings_get.go
- api.ping.go
- api.request.go
- api.response.go
- api.search.go
- model.go
- transport.go
Click to show internal directories.
Click to hide internal directories.