models

package
v0.0.0-...-d8edefe Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlogInfo map[string]string

Functions

func AddArticle

func AddArticle(article Article) string

func AddUser

func AddUser(user *User)

func DeleteArticle

func DeleteArticle(idStr string) bool

func UpdateArticle

func UpdateArticle(article Article) bool

Types

type Article

type Article struct {
	Id      bson.ObjectId `json:"id" bson:"_id"`
	Title   string        `json:"title"`
	Author  string        `json:"author"`
	Date    string        `json:"date"`
	Tags    string        `json:"tags"`
	Content string        `json:"content"`
	Status  string        `json:"status"`
}

func AllArticles

func AllArticles() []Article

func ArticleById

func ArticleById(id string) *Article

func ArticleByTitle

func ArticleByTitle(title string) *Article

func ArticlesByStatus

func ArticlesByStatus(status string) []Article

type User

type User struct {
	Username string `json:"username"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

func FindUser

func FindUser(user *User) *User

func GetUserByEmail

func GetUserByEmail(email string) *User

Jump to

Keyboard shortcuts

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