Documentation
¶
Index ¶
- func FileExists(name string) bool
- func FormValueArray(key string, postForm url.Values) []string
- func GenerateUniqueID() string
- func GetTodayZeroPoint() int64
- func GetTodayZeroPointTime() time.Time
- func GetURLParams(params map[string]string) string
- func GetYesterdayZeroPoint() int64
- func InArray(val string, arr []string) (index int, exist bool)
- func IntNumberSet(ids []int) []int
- func MD532(text string) string
- func MD5file(file multipart.File) string
- func Md5(s string) string
- func Md5Bytes(data []byte) string
- func Md5File(path string) string
- func Now() int64
- func ParseAddr(addr string) (ip string, port string)
- func ParseHttpAddr(addr string) string
- func ParseRedisAddr(addrOrigin string) (addr string)
- func RemoveDuplicatesAndEmpty(a []string) (ret []string)
- func Round(f float64, n int) float64
- func ShortTag(longstr string, number int) string
- func String2Timestamp(str string) int64
- func String2md5(str string) string
- func StringInArray(needle string, haystack []string) bool
- func StringPkg(str string) (ok bool, depth int)
- func StringToInt64(s string) int64
- func Substr(str string, start int, length int) string
- func Timestamp2String(timestamp int) string
- func Timestamp2String64(timestamp int64) string
- func TokenValid(token string) bool
- func ValidUrl(url string) bool
- type DSN
- type DataProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
FileExists reports whether the named file or directory exists.
func FormValueArray ¶
FormValueArray 从post form中获取数组参数
func ParseHttpAddr ¶
func RemoveDuplicatesAndEmpty ¶
RemoveDuplicatesAndEmpty 去重
func StringInArray ¶
func Timestamp2String64 ¶
func TokenValid ¶
Types ¶
type DSN ¶
type DSN struct {
User string // Username
Passwd string // TplPassword (requires User)
Net string // Network type
Addr string // Network address (requires Net)
DBName string // Database name
Params map[string]string // Connection parameters
}
DSN ...
type DataProvider ¶
func NewDataProvider ¶
func NewDataProvider(content []byte) *DataProvider
func (*DataProvider) Read ¶
func (d *DataProvider) Read() (data map[string]interface{}, err error)
func (*DataProvider) Watch ¶
func (d *DataProvider) Watch(dataCall func(map[string]interface{}))
func (*DataProvider) Write ¶
func (d *DataProvider) Write(conf map[string]interface{}) (err error)
Click to show internal directories.
Click to hide internal directories.