dao

package
v0.0.0-...-2bf1368 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTextItem

func AddTextItem(textItem *model.TextItem) error

AddTextItem 向数据库中添加留言项

func DownloadFile

func DownloadFile(id string) (string, error)

DownloadFile 获取下载链接

func FilterText

func FilterText(text string) (string, error)

FilterText 对用户发送的内容进行过滤

func GetPageByNo

func GetPageByNo(pageNo string) *model.Page

GetPageByNo 根据页面的ID从数据库中拿到页面的数据

func GetTextItems

func GetTextItems(pageNo, pageSize int64) (textItems []*model.TextItem, totalRecord int64, totalPageNo int64, err error)

GetTextItems 从数据库中拿到指定页面的数据

func UploadFile

func UploadFile(path string, file io.Reader) (string, error)

UploadFile 上传文件

Types

type Config

type Config struct {
	TcbEnv    string `yaml:"tcb_env"`
	AppID     string `yaml:"app_id"`
	AppSecret string `yaml:"app_secret"`
}

Config 配置信息

type FilterRes

type FilterRes struct {
	Text string `json:"text"`
}

FilterRes 过滤后的文本

Jump to

Keyboard shortcuts

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