Documentation ¶
Index ¶
Constants ¶
View Source
const ( ZERO = iota ONE TWO )
View Source
const ( UNDELETED // 未删除 DELETED // 已删除 )
View Source
const ( BUSINESS_SYSTEM_OP BUSINESS_ERROR_LOG BUSINESS_USER_LOGIN BUSINESS_GLOBAL_VISIT BUSINESS_ARTICLE_VISIT BUSINESS_ARTICLE_LIKE BUSINESS_ARTICLE_UNLIKE BUSINESS_ARTICLE_COMMENT BUSINESS_COMMENT_LIKE BUSINESS_COMMENT_UNLIKE BUSINESS_COMMENT_REPLY BUSINESS_REPLY_LIKE BUSINESS_REPLY_UNLIKE )
business_kind * 1.系统操作;2.错误日志;3.用户登录;4.全站浏览;5.文章浏览;6.文章赞;7.文章踩;8.文章评论;9.评论赞;10.评论踩;11.评论回复;12.回复赞;13.回复踩
View Source
const ( ARTICLE_NORMAL = iota + 1 ARTICLE_ABOUT ARTICLE_NOTE )
article kind
View Source
const ( ADMIN = "admin" COLOR = "#000000" ITV = 3600 * 24 // 有效时间 )
View Source
const ( KEY_1 = "admin.pass" KEY_2 = "cmnt.open" KEY_3 = "cmnt.check" )
quanta key
View Source
const ( LV0 = iota // 游客 LV1 // 普通 LV2 // 观察者 LV3 // 测试者 LV4 LV5 LV6 LV7 LV8 // 管理员 LV9 // 系统管理员 )
View Source
const ( X_ID = "i" X_ROLE = "r" X_TIME = "t" X_USER = "x" X_TRACE = "c" )
View Source
const PERMISSION = LV8
View Source
const USER_AGENT = "User-Agent"
Variables ¶
Functions ¶
func NewYuEmail ¶
Types ¶
type BaseCache ¶
type BaseCache struct {
// contains filtered or unexported fields
}
基础缓存
func (*BaseCache) SetTracker ¶
func (b *BaseCache) SetTracker(tracker *Tracker)
type BaseController ¶
type BaseController struct {
// contains filtered or unexported fields
}
基础控制器
func (BaseController) Error ¶
func (s BaseController) Error(traceId string, err error, param ...interface{}) bool
func (BaseController) Info ¶
func (s BaseController) Info(traceId string, param ...interface{})
func (*BaseController) SetTracker ¶
func (b *BaseController) SetTracker(tracker *Tracker)
type BaseDao ¶
type BaseDao struct {
// contains filtered or unexported fields
}
基础dao
func (*BaseDao) SetTracker ¶
func (b *BaseDao) SetTracker(tracker *Tracker)
type BaseService ¶
type BaseService struct {
// contains filtered or unexported fields
}
基础服务
func (*BaseService) Error ¶
func (s *BaseService) Error(err error, param ...interface{}) bool
func (*BaseService) Info ¶
func (s *BaseService) Info(param ...interface{})
func (*BaseService) SetTracker ¶
func (b *BaseService) SetTracker(tracker *Tracker)
type MessageContent ¶
func NewMessageContent ¶
func NewMessageContent(fromUserName, content string) *MessageContent
type Page ¶
type Page struct { PageNum int `json:"pageNum" validate:"required,gt=0"` // 当前页码 PageSize int `json:"pageSize" validate:"required,gt=0"` // 每页记录条数 Total int `json:"total"` // 记录总量 PageMax int `json:"pageMax"` // 最大页码 PrePage int `json:"prePage"` // 上一页码,如果没有为 0 NextPage int `json:"nextPage"` // 下一页码,如果没有为 0 HasPrePage bool `json:"hasPrePage"` // 是否有上一页 HasNextPage bool `json:"hasNextPage"` // 是否有下一页 Remainder int `json:"remainder"` // 剩余数据量 StartRow int `json:"-"` // 记录开始行 StopRow int `json:"-"` // 记录结束行 // contains filtered or unexported fields }
func NewPageAll ¶
func NewPageAll() *Page
func NewPageOne ¶
func NewPageOne() *Page
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
func NewSimpleTracker ¶
func (*Tracker) GetStartTime ¶
func (*Tracker) GetTraceId ¶
Click to show internal directories.
Click to hide internal directories.