Documentation ¶
Index ¶
- Variables
- func GetOptions() map[string]string
- func Init()
- func Md5(buf []byte) string
- func NewCache() cache.Cache
- func Rawurlencode(str string) string
- func TableName(str string) string
- type LocalCache
- func (this *LocalCache) ClearAll() error
- func (this *LocalCache) Decr(key string) error
- func (this *LocalCache) Delete(key string) error
- func (this *LocalCache) Get(key string) interface{}
- func (this *LocalCache) Incr(key string) error
- func (this *LocalCache) IsExist(key string) bool
- func (this *LocalCache) Put(key string, val interface{}, timeout int64) error
- func (this *LocalCache) StartAndGC(config string) error
- type Option
- type Pager
- type Post
- func (m *Post) ColorTitle() string
- func (m *Post) Delete() error
- func (m *Post) Excerpt() string
- 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 ¶
View Source
var Cache cache.Cache
Functions ¶
func GetOptions ¶
func Rawurlencode ¶
Types ¶
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func (*LocalCache) ClearAll ¶
func (this *LocalCache) ClearAll() error
func (*LocalCache) Decr ¶
func (this *LocalCache) Decr(key string) error
func (*LocalCache) Delete ¶
func (this *LocalCache) Delete(key string) error
func (*LocalCache) Get ¶
func (this *LocalCache) Get(key string) interface{}
func (*LocalCache) Incr ¶
func (this *LocalCache) Incr(key string) error
func (*LocalCache) IsExist ¶
func (this *LocalCache) IsExist(key string) bool
func (*LocalCache) Put ¶
func (this *LocalCache) Put(key string, val interface{}, timeout int64) error
func (*LocalCache) StartAndGC ¶
func (this *LocalCache) StartAndGC(config string) error
type Pager ¶
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 }
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.