dao

package
v0.0.0-...-8580c6f Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: GPL-3.0, GPL-3.0-or-later Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAdmin = adminDao{}
View Source
var DefaultArticle = article{}
View Source
var DefaultCate = Cate{}
View Source
var DefaultConfig = config{}
View Source
var DefaultFiles = Files{}
View Source
var DefaultLinks = links{}
View Source
var DefaultTags = tag{}

Functions

This section is empty.

Types

type Cate

type Cate struct {
}

func (Cate) Create

func (c Cate) Create(cate *models.Cate) error

创建分类

func (Cate) Delete

func (a Cate) Delete(where string) (int, bool)

删除数据

func (Cate) EditCate

func (c Cate) EditCate(form url.Values) error

修改一个分类

func (Cate) FindAll

func (c Cate) FindAll(where string) ([]map[string]string, error)

获取所有分类

func (Cate) FindOne

func (c Cate) FindOne(where string) (map[string]interface{}, error)

获取一条记录

func (Cate) GetCateLevel1

func (c Cate) GetCateLevel1() (map[int]string, error)

获取所有一级分类

type Files

type Files struct {
}

*

  • 文件curd todo 未完待续...

func (Files) Count

func (f Files) Count() (int, error)

获取条数

func (Files) Create

func (f Files) Create(files *models.Files) error

添加文件

func (Files) Delete

func (f Files) Delete()

删除文件

func (Files) Find

func (f Files) Find(order string) ([]map[string]string, error)

文件列表

func (Files) FindOne

func (f Files) FindOne()

查找一个文件

Jump to

Keyboard shortcuts

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