Documentation ¶
Index ¶
- func GetOptions() map[string]string
- func Md5(buf []byte) string
- func Rawurlencode(str string) string
- func TableName(str string) string
- type Album
- type Link
- type LocalCache
- type Mood
- type Option
- type Pager
- type Photo
- type Post
- func (m *Post) ColorTitle() string
- func (m *Post) Delete() error
- func (m *Post) Excerpt() string
- func (post *Post) GetPreAndNext() (pre, next *Post)
- func (m *Post) Insert() error
- func (m *Post) Link() string
- func (m *Post) Query() orm.QuerySeter
- func (m *Post) Read(fields ...string) error
- func (m *Post) TableName() string
- func (m *Post) TagsLink() string
- func (m *Post) Update(fields ...string) error
- type Tag
- type TagPost
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOptions ¶
func Rawurlencode ¶
Types ¶
type Album ¶
type Album struct { Id int64 Name string `orm:"size(100)"` Cover string `orm:"size(70)"` Posttime time.Time `orm:"type(datetime);index"` Ishide int8 Rank int8 Photonum int64 }
相册表
func (*Album) Query ¶
func (m *Album) Query() orm.QuerySeter
type Link ¶
type Link struct { Id int64 Sitename string `orm:"size(80)"` Url string `orm:"size(200)"` Rank int8 }
友情链接
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
var Cache *LocalCache = NewCache()
func NewCache ¶
func NewCache() *LocalCache
func (*LocalCache) Delete ¶
func (this *LocalCache) Delete(key string) error
func (*LocalCache) Get ¶
func (this *LocalCache) Get(key string) interface{}
func (*LocalCache) IsExist ¶
func (this *LocalCache) IsExist(key string) bool
func (*LocalCache) Put ¶
func (this *LocalCache) Put(key string, val interface{}) error
type Mood ¶
type Mood struct { Id int64 Content string `orm:"type(text)"` Cover string `orm:"size(70)"` Posttime time.Time `orm:"type(datetime);index"` }
心情表
func (*Mood) Query ¶
func (m *Mood) Query() orm.QuerySeter
type Pager ¶
type Photo ¶
type Photo struct { Id int64 Albumid int64 Des string `orm:"size(100)"` Posttime time.Time `orm:"type(datetime);index"` Url string `orm:"size(70)"` Small string `orm:"-"` }
相册表
func (*Photo) Query ¶
func (m *Photo) Query() orm.QuerySeter
type Post ¶
type Post struct { Id int64 Userid int64 `orm:"index"` Author string `orm:"size(15)"` Title string `orm:"size(100)"` Color string `orm:"size(7)"` Urlname string `orm:"size(100);index"` Urltype int8 `` Content string `orm:"type(text)"` Tags string `orm:"size(100)"` Posttime time.Time `orm:"type(datetime);index"` Views int64 `` Status int8 `` Updated time.Time `orm:"type(datetime)"` Istop int8 `` Cover string `orm:"size(70)"` }
func GetHotBlog ¶
func GetHotBlog() []*Post
func GetLatestBlog ¶
func GetLatestBlog() []*Post
func (*Post) GetPreAndNext ¶
func (*Post) Query ¶
func (m *Post) Query() orm.QuerySeter
type TagPost ¶
type TagPost struct { Id int64 Tagid int64 `orm:"index"` Postid int64 Poststatus int8 Posttime time.Time }
标签内容关系表
func (*TagPost) Query ¶
func (m *TagPost) Query() orm.QuerySeter
type User ¶
type User struct { Id int64 Username string `orm:"unique;size(15)"` Password string `orm:"size(32)"` Email string `orm:"size(50)"` Lastlogin time.Time `orm:"auto_now_add;type(datetime)"` Logincount int64 Lastip string `orm:"size(32)"` Authkey string `orm:"size(10)"` Active int8 }
用户表模型
func (*User) Query ¶
func (m *User) Query() orm.QuerySeter
Click to show internal directories.
Click to hide internal directories.