Documentation ¶
Overview ¶
*
- @description 配置文件INI
- @homepage http://www.hemacms.com/
- @author Nicholas Mars
- @date 2018-02-18
*
- @description 正则数据验证
- @homepage http://www.hemacms.com/
- @author Nicholas Mars
- @date 2018-02-18
Index ¶
- Variables
- func Config() *configCtrl
- func Regexp() *regexpCtrl
- func Sess() *scs.Manager
- func Sql() *sqlx.DB
- type BaseCtrl
- func (c *BaseCtrl) Cache() *CacheCtrl
- func (c *BaseCtrl) Config() *configCtrl
- func (c *BaseCtrl) DateToTimestamp(date, format string) int64
- func (c *BaseCtrl) FormatUrl(s string) string
- func (c *BaseCtrl) Log() *LogCtrl
- func (c *BaseCtrl) Md5(s string) string
- func (c *BaseCtrl) MultiLanguage(str string, value string, field ...string) string
- func (c *BaseCtrl) MultiLanguageAddSql(str string, value string, field ...string) string
- func (c *BaseCtrl) Pagination(page, row string) int
- func (c *BaseCtrl) Regexp() *regexpCtrl
- func (c *BaseCtrl) ResponseData(data interface{}, w io.Writer, r *http.Request)
- func (c *BaseCtrl) ResponseJson(status interface{}, info interface{}, w io.Writer, r *http.Request)
- func (c *BaseCtrl) RowsJson(rows interface{}) string
- func (c *BaseCtrl) Sess() *scs.Manager
- func (c *BaseCtrl) SetCookie(key string, value string, age int, w http.ResponseWriter)
- func (c *BaseCtrl) Sha1(s string) string
- func (c *BaseCtrl) Sha1PlusMd5(s string) string
- func (c *BaseCtrl) Sql() *sqlx.DB
- func (c *BaseCtrl) TaobaoIP(ip string) *IPInfo
- func (c *BaseCtrl) Template(w io.Writer, r *http.Request, data interface{}, filenames ...string)
- func (c *BaseCtrl) TimeString(r *http.Request, contextName string) string
- type CacheCtrl
- func (c *CacheCtrl) Del(key string)
- func (c *CacheCtrl) Get(key string) (interface{}, bool)
- func (c *CacheCtrl) Items() map[string]gocache.Item
- func (c *CacheCtrl) ScanDel(key string)
- func (c *CacheCtrl) ScanKey(key string)
- func (c *CacheCtrl) ScanValue(key string)
- func (c *CacheCtrl) SetAlwaysTime(key string, val interface{})
- func (c *CacheCtrl) SetConfineTime(key string, val interface{})
- type IP
- type IPInfo
- type LogCtrl
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sqlx.DB
Functions ¶
Types ¶
type BaseCtrl ¶
type BaseCtrl struct { }
func (*BaseCtrl) DateToTimestamp ¶
date转化时间戳
func (*BaseCtrl) MultiLanguage ¶
多语言
func (*BaseCtrl) MultiLanguageAddSql ¶
多语言增加sql
func (*BaseCtrl) ResponseData ¶
响应数据
func (*BaseCtrl) ResponseJson ¶
响应json
type CacheCtrl ¶
type CacheCtrl struct { }
func (*CacheCtrl) SetAlwaysTime ¶
func (*CacheCtrl) SetConfineTime ¶
Click to show internal directories.
Click to hide internal directories.