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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(params url.Values) (query string, err error)

Sign fn

Types

type Dao

type Dao struct {
	DB *gorm.DB
	// contains filtered or unexported fields
}

Dao .

func New

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

New new a instance

func (*Dao) Close

func (d *Dao) Close()

Close close connection of db , mc.

func (*Dao) Upload

func (d *Dao) Upload(c context.Context, fileName string, fileType string, timing int64, data []byte, bfs *conf.Bfs) (location string, err error)

Upload upload picture or log file to bfs

func (*Dao) UploadNas

func (d *Dao) UploadNas(c context.Context, fileName string, data []byte, nas *conf.Bfs) (location string, err error)

UploadNas can upload the file into Nas Storage

func (*Dao) ZAddPush

func (d *Dao) ZAddPush(c context.Context, resID int) (err error)

ZAddPush adds one to push data into the redis sorted set

Jump to

Keyboard shortcuts

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