Documentation ¶
Index ¶
- Variables
- func AESDecrypt(src, k, n string) (string, error)
- func AESEncrypt(src, k, n string) (string, error)
- func CacheDestroy(name string)
- func CacheGet(name string) cache.Entity
- func CacheNew(name string) cache.Entity
- func DEBUG(fn func(string))
- func DELETE(path string, handler gottp.Handler)
- func DefaultRouter() *gottp.Router
- func DirecotoryExists(path string) (bool, error)
- func ERROR(fn func(error))
- func GET(path string, handler gottp.Handler)
- func GetIP() string
- func GetMyPath() string
- func HEAD(path string, handler gottp.Handler)
- func InitCacheManager(provider string, expiredTime int64)
- func InitGoQL(g *goql.GQL, path string, cfg *handler.Config)
- func InitGraphQL(g *gql.GQL, path string, cfg *handler.Config)
- func Ip2long(ipstr string) uint32
- func JoinPath(basePath string, relatePath string) string
- func Long2ip(ipLong uint32) string
- func MD5(val string) string
- func MakeDirecotories(path string) bool
- func POST(path string, handler gottp.Handler)
- func PUT(path string, handler gottp.Handler)
- func ParseJSONFile(file string, v interface{}) error
- func UUID() string
- func WriteJSONFile(file string, v interface{}) error
- type TF
- func (tf *TF) FormatDate(time time.Time) string
- func (tf *TF) FormatDateTime(time time.Time) string
- func (tf *TF) FormatDateTimeM(time time.Time) string
- func (tf *TF) FormatTime(time time.Time) string
- func (tf *TF) FormatTimeM(time time.Time) string
- func (tf *TF) GetDateTemplate() string
- func (tf *TF) GetDatetimeMTemplate() string
- func (tf *TF) GetDatetimeTemplate() string
- func (tf *TF) GetTimeTemplate() string
- func (tf *TF) ParseDate(date string) (time.Time, error)
- func (tf *TF) ParseDatetime(date string) (time.Time, error)
- func (tf *TF) ParseDatetimeM(date string) (time.Time, error)
- func (tf *TF) ParseTime(date string) (time.Time, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CacheManager *cache.Manager
CacheManager 缓存管理
Functions ¶
func InitCacheManager ¶
InitCacheManager 初始化缓存管理器 不用自己维护,使用全局的 CacheManager @param expiredTime 秒
func InitGraphQL ¶
InitGraphQL 初始化 GraphQL
Types ¶
type TF ¶
type TF struct { //年月日之间的分隔符 Y string // 年 M string // 月 D string // 日 // YMD string //日期和时间之间的分隔符 DT string //时分秒之间的分隔符 H string Mn string S string // contains filtered or unexported fields }
TF 时间格式化
func NewTimeFormatter ¶
func NewTimeFormatter() *TF
NewTimeFormatter 创建时间格式化对象 默认使用 yyyy-mm-dd hh:mm:ss 形式
func (*TF) FormatDateTime ¶
FormatDateTime 格式化时间
func (*TF) FormatDateTimeM ¶
FormatDateTimeM 格式化时间,末尾带毫秒
func (*TF) GetDatetimeMTemplate ¶
GetDatetimeMTemplate 获取日期及时间(含毫秒)格式模板
func (*TF) GetDatetimeTemplate ¶
GetDatetimeTemplate 获取日期及时间格式模板
func (*TF) ParseDatetime ¶
ParseDatetime 解析日期及时间
func (*TF) ParseDatetimeM ¶
ParseDatetimeM 解析日期及时间(含毫秒)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.