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: 15 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 {
	DB *gorm.DB
	// contains filtered or unexported fields
}

Dao struct user of Dao.

func New

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

New create a instance of Dao and return.

func (*Dao) ActSubject

func (d *Dao) ActSubject(c context.Context, sid int64) (rp *model.ActSubject, err error)

ActSubject get likesubject from db.

func (*Dao) AddTags

func (d *Dao) AddTags(c context.Context, tags string, ip string) (err error)

AddTags add tags from http request.

func (*Dao) BatchLike

func (d *Dao) BatchLike(c context.Context, item *model.Like, wids []int64, ipv6 []byte) (err error)

BatchLike .

func (*Dao) Close

func (d *Dao) Close()

Close close connection of db , mc.

func (*Dao) GetLikeContent

func (d *Dao) GetLikeContent(c context.Context, ids []int64) (outRes map[int64]*model.LikeContent, err error)

GetLikeContent .

func (*Dao) Musics

func (d *Dao) Musics(c context.Context, aids []int64, ip string) (music *model.MusicRes, err error)

Musics get music info .

func (*Dao) Ping

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

Ping check connection of db , mc.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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