Documentation ¶
Index ¶
- Constants
- Variables
- func CWD() string
- func CloseLogWriter()
- func Conf() *ini.File
- func ConfFile() string
- func ConfFileDev() string
- func DBFile() string
- func DBFileDev() string
- func DataDir() string
- func EXEName() string
- func Ellipsis(text string, length int) string
- func EnsureDir(dir string) (err error)
- func ErrorLogFilename() string
- func Exist(path string) bool
- func ExpandHomeDir(path string) string
- func GetHttpCustomPath(roomName string) (string, error)
- func GetLogWriter() io.Writer
- func GetOutPutUrl(roomName, transType, customPath string) string
- func GetRequestHostname(r *http.Request) (hostname string)
- func GetRequestHref(r *http.Request) string
- func HasChinese(str string) bool
- func HomeDir() string
- func IsPortInUse(port int) bool
- func LocalIP() string
- func Log(msg ...interface{})
- func LogDir() string
- func Logf(format string, msg ...interface{})
- func MD5(str string) string
- func PauseExit()
- func RedirectStderr() (err error)
- func ReloadConf() *ini.File
- func ShortID() string
- func UpTime() time.Duration
- func UpTimeString() string
- type DateTime
- type PageForm
- type PageResult
- type StatikFileSystem
- type StringArray
Constants ¶
View Source
const ( DateLayout = "2006-01-02" DateTimeLayout = "2006-01-02 15:04:05" BuildTimeLayout = "2006.0102.150405" TimestampLayout = "20060102150405" )
Variables ¶
View Source
var Debug = true
View Source
var FlagVarConfFile string
View Source
var FlagVarDBFile string
View Source
var StartTime = time.Now()
Functions ¶
func CloseLogWriter ¶
func CloseLogWriter()
func ConfFileDev ¶
func ConfFileDev() string
func ErrorLogFilename ¶
func ErrorLogFilename() string
func ExpandHomeDir ¶
func GetHttpCustomPath ¶
func GetLogWriter ¶
func GetOutPutUrl ¶
func GetRequestHostname ¶
func GetRequestHref ¶
func HasChinese ¶
func IsPortInUse ¶
func ReloadConf ¶
func UpTimeString ¶
func UpTimeString() string
Types ¶
type PageForm ¶
type PageForm struct { Start int `form:"start"` Limit int `form:"limit"` Q string `form:"q"` Sort string `form:"sort"` Order string `form:"order"` }
func NewPageForm ¶
func NewPageForm() *PageForm
type PageResult ¶
type PageResult struct { Total int `json:"total"` Rows interface{} `json:"rows"` }
func NewPageResult ¶
func NewPageResult(rows interface{}) *PageResult
func (*PageResult) Slice ¶
func (pr *PageResult) Slice(start, limit int) *PageResult
func (*PageResult) Sort ¶
func (pr *PageResult) Sort(by, order string) *PageResult
type StatikFileSystem ¶
type StatikFileSystem struct {
http.FileSystem
}
type StringArray ¶
type StringArray string
func (StringArray) MarshalJSON ¶
func (r StringArray) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.