goes

package
v1.2.15 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() *client

func ESClient

func ESClient() *elastic.Client

func Init

func Init(conf Config, options ...elastic.ClientOptionFunc) (err error)

func New

func New(conf Config, options ...elastic.ClientOptionFunc) (cli *client, err error)

Types

type BoolQueryAction

type BoolQueryAction string
var (
	BoolQueryMust    BoolQueryAction = "must"
	BoolQueryFilter  BoolQueryAction = "filter"
	BoolQueryShould  BoolQueryAction = "should"
	BoolQueryMustNot BoolQueryAction = "must_not"
)

type Config

type Config struct {
	Addr      string `json:"addr" yaml:"addr"`
	User      string `json:"user" yaml:"user"`
	Password  string `json:"password" yaml:"password"`
	EnableLog bool   `json:"enable_log" yaml:"enable_log"`
}

type Pagination

type Pagination struct {
	Sort   string // 排序字段
	Order  bool   // true=升序 false=降序
	Offset int
	Limit  int
}

Jump to

Keyboard shortcuts

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