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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

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

Dao dao

func New

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

New init mysql db

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) Flush

func (d *Dao) Flush()

Flush force update data from cache to index

func (*Dao) Has

func (d *Dao) Has(id uint64) bool

Has return DocId exists

func (*Dao) IncrementBackup

func (d *Dao) IncrementBackup(c context.Context, stime, etime time.Time) (docs []*model.Document, err error)

IncrementBackup select mtime>now-24h data

func (*Dao) Insert

func (d *Dao) Insert(id uint64, content string, forceUpdate bool)

Insert doc into index...

func (*Dao) Ping

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

Ping dao ping

func (*Dao) Remove

func (d *Dao) Remove(id uint64, forceUpdate bool)

Remove remove a doc from index

func (*Dao) Search

func (d *Dao) Search(arg *model.RiotSearchReq) *model.DocumentsResp

Search return archives info

func (*Dao) SearchIDOnly

func (d *Dao) SearchIDOnly(arg *model.RiotSearchReq) *model.IDsResp

SearchIDOnly only return aids

Jump to

Keyboard shortcuts

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