models

package
v0.0.0-...-fff701a Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddArticle

func AddArticle(title, cid, content string) error

func AddCatagory

func AddCatagory(title string) error

func AddUser

func AddUser() error

func DelArticle

func DelArticle(id string) error

func DelCatagory

func DelCatagory(id string) error

func GetArticleCount

func GetArticleCount() (int64, error)

Types

type Article

type Article struct {
	Id         int64
	Title      string
	Content    string
	Author     string
	CatagoryId int64
	ViewCount  int64
	Created    time.Time
}

func GetArticle

func GetArticle(id string) (*Article, error)

func GetArticles

func GetArticles() ([]*Article, error)

type ArticleCatagory

type ArticleCatagory struct {
	Article  `xorm:"extends"`
	Catagory `xorm:"extends"`
}

func GetArticleCatagory

func GetArticleCatagory(page int64) ([]*ArticleCatagory, error)

type Catagory

type Catagory struct {
	Id           int64
	Title        string
	ArticleCount int64
	Created      time.Time
}

func GetCatagories

func GetCatagories() ([]*Catagory, error)

type User

type User struct {
	Id      int64
	Name    string
	Address string
}

func GetUsers

func GetUsers() ([]*User, error)

Jump to

Keyboard shortcuts

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