dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromError

func PromError(name, format string, args ...interface{})

PromError prometheus error count.

Types

type BulkItem

type BulkItem interface {
	IndexName() string
	IndexType() string
	IndexID() string
}

BulkItem .

type BulkMapItem

type BulkMapItem interface {
	IndexName() string
	IndexType() string
	IndexID() string
	PField() map[string]interface{}
}

BulkMapItem .

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

func New

func New(c *conf.Config) (d *Dao)

New init dao

func (*Dao) DmDateSearch

func (d *Dao) DmDateSearch(c context.Context, p *model.DmDateParams) (res *model.SearchResult, err error)

func (*Dao) DmHistory

func (d *Dao) DmHistory(c context.Context, p *model.DmHistoryParams) (res *model.SearchResult, err error)

func (*Dao) DmSearch

func (d *Dao) DmSearch(c context.Context, p *model.DmSearchParams) (res *model.SearchResult, err error)

DmSearch .

func (*Dao) PgcMedia

func (d *Dao) PgcMedia(c context.Context, p *model.PgcMediaParams) (res *model.SearchResult, err error)

PgcMedia .

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping health of db.

func (*Dao) ReplyRecord

func (d *Dao) ReplyRecord(c context.Context, p *model.ReplyRecordParams) (res *model.SearchResult, err error)

ReplyRecord search reply record from ES.

func (*Dao) SendSMS

func (d *Dao) SendSMS(msg string) (err error)

func (*Dao) UpdateBulk

func (d *Dao) UpdateBulk(c context.Context, esName string, bulkData []BulkItem) (err error)

func (*Dao) UpdateMapBulk

func (d *Dao) UpdateMapBulk(c context.Context, esName string, bulkData []BulkMapItem) (err error)

UpdateMapBulk .

Jump to

Keyboard shortcuts

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