Documentation
¶
Index ¶
- Variables
- func GetOptions() (map[string]string, error)
- func PostArchive() ([]map[string]string, error)
- func PostCommentNum(postIds []int) (map[int]int, error)
- type CateArtivleCount
- type Cates
- type CommentNum
- type Comments
- type Links
- type Moods
- type NewComment
- type Options
- type Posts
- type Reminds
- type UserMoods
- type UserPosts
- type Users
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetOptions ¶
func PostArchive ¶
Types ¶
type CateArtivleCount ¶
func CateArtivleCountGetList ¶
func CateArtivleCountGetList(start int, num int) ([]*CateArtivleCount, error)
func GetAllCates ¶
func GetAllCates() []*CateArtivleCount
type Cates ¶
type Cates struct {
Id int `form:"id" json:"id" db:"id"`
Name string `form:"name" json:"name" db:"name"`
Desc string `form:"desc" json:"desc" db:"desc"`
Domain string `form:"domain" json:"domain" db:"domain"`
CreatedAt time.Time `form:"-" json:"created_at" db:"created_at"`
UpdatedAt time.Time `form:"-" json:"updated_at" db:"updated_at"`
}
func (*Cates) AfterChange ¶
func (c *Cates) AfterChange()
type CommentNum ¶
type Comments ¶
type Comments struct {
Id int `form:"id" json:"id" db:"id"`
PostId int `form:"post_id" json:"post_id" db:"post_id"`
Pid int `form:"pid" json:"pid" db:"pid"`
Name string `form:"name" json:"name" db:"name"`
Content string `form:"content" json:"content" db:"content"`
IP string `form:"-" json:"ip" db:"ip"`
CreatedAt time.Time `form:"-" json:"created_at" db:"created_at"`
}
func PostComments ¶
func (*Comments) AfterChange ¶
func (c *Comments) AfterChange()
type Links ¶
type Links struct {
Id int `form:"id" json:"id" db:"id"`
Name string `form:"name" json:"name" db:"name"`
Url string `form:"url" json:"url" db:"url"`
Desc string `form:"desc" json:"desc" db:"desc"`
CreatedAt time.Time `form:"-" json:"created_at" db:"created_at"`
}
func GetAllLinks ¶
func GetAllLinks() []*Links
func (*Links) AfterChange ¶
func (p *Links) AfterChange()
type Moods ¶
type Moods struct {
Id int `form:"id" json:"id" db:"id"`
Content string `form:"content" json:"content" db:"content"`
UserId int `form:"user_id" json:"user_id" db:"user_id"`
CreatedAt time.Time `form:"-" json:"created_at" db:"created_at"`
}
func (*Moods) AfterChange ¶
func (m *Moods) AfterChange()
type NewComment ¶
type NewComment struct {
Comments
Type int `db:"type"`
ArticleTitle string `db:"title"`
Url string `db:"url"`
}
func CommentList ¶
func CommentList(start, num int) ([]*NewComment, error)
func NewComments ¶
func NewComments() ([]*NewComment, error)
type Options ¶
type Options struct {
Id int `form:"id" json:"id" db:"id"`
OptionKey string `form:"option_key" json:"option_key" db:"option_key"`
OptionValue string `form:"option_value" json:"option_value" db:"option_value"`
}
func (*Options) AfterChange ¶
func (o *Options) AfterChange()
type Posts ¶
type Posts struct {
Id int `form:"id" json:"id" db:"id"`
CateId int `form:"cate_id" json:"cate_id" db:"cate_id"`
Type int `form:"type" json:"type" db:"type"`
UserId int `form:"user_id" json:"user_id" db:"user_id"`
Title string `form:"title" json:"title" db:"title"`
Url string `form:"url" json:"url" db:"url"`
Content string `form:"content" json:"content" db:"content"`
ViewNum int `form:"view_num" json:"view_num" db:"view_num"`
CreatedAt time.Time `form:"-" json:"created_at" db:"created_at"`
UpdatedAt time.Time `form:"-" json:"updated_at" db:"updated_at"`
}
func (*Posts) AfterChange ¶
func (p *Posts) AfterChange()
type Reminds ¶
type Reminds struct {
Id int `form:"id" json:"id" db:"id"`
Type int `form:"type" json:"type" db:"type"`
At string `form:"at" json:"at" db:"at"`
Content string `form:"content" json:"content" db:"content"`
RemindDate time.Time `form:"remind_date" json:"remind_date" db:"remind_date" time_format:"2006-01-02 15:04:05"`
CreatedAt time.Time `form:"-" json:"created_at" db:"created_at"`
}
type UserPosts ¶
type Users ¶
type Users struct {
Id int `form:"id" json:"id" db:"id"`
Name string `form:"name" json:"name" db:"name"`
Password string `form:"password" json:"password" db:"password"`
NickName string `form:"nick_name" json:"nick_name" db:"nick_name"`
Email string `form:"email" json:"email" db:"email"`
Status int `form:"status" json:"status" db:"status"`
Type int `form:"type" json:"type" db:"type"`
CreatedAt time.Time `form:"-" json:"created_at" db:"created_at"`
UpdatedAt time.Time `form:"-" json:"updated_at" db:"updated_at"`
}
func (*Users) AfterChange ¶
func (u *Users) AfterChange()
Click to show internal directories.
Click to hide internal directories.