Documentation ¶
Index ¶
- Constants
- func Cost(msg string) func()
- func CreateFolder(path string) error
- func Errf(fomart string, v ...any)
- func GetCaller(d int) (string, int)
- func GetRealIP(req *http.Request) string
- func HeadSeparator(path string) string
- func LoadJSON(name string, data any) error
- func LoadOrSaveJSON(name string, res any, def func() any) (err error)
- func LoadOrSaveToml(name string, data any, def func() any) (err error)
- func LoadOrSaveYaml(name string, data any, def func() any) (err error)
- func LoadToml(name string, data any) error
- func LoadYaml(name string, data any) error
- func LogErr(err error, msg string)
- func Logf(fomart string, v ...any)
- func MD5(src string) string
- func RandomString(n int) string
- func Run(app IApp)
- func SaveJSON(name string, data any) error
- func SaveToml(name string, data any) error
- func SaveYaml(name string, data any) error
- func TailSeparator(path string) string
- func UUID() string
- func Warnf(fomart string, v ...any)
- type IApp
- type IQueue
- type IServer
- type QueueManager
- type Serial
- type TStamp
- type XmlMap
Constants ¶
View Source
const ( // TimeLayout1 2006-01-02 15:04:05 TimeLayout1 = "2006-01-02 15:04:05" // TimeLayout2 2006-01-02 TimeLayout2 = "2006-01-02" // TimeLayout3 15:04:05 TimeLayout3 = "15:04:05" // TimeLayout4 20060102150405 TimeLayout4 = "20060102150405" // TimeLayout5 20060102 TimeLayout5 = "20060102" // TimeLayout6 150405 TimeLayout6 = "150405" // TimeLayout7 2006.01.02 TimeLayout7 = "2006.01.02" // TimeLayout8 2006/01/02 TimeLayout8 = "2006/01/02" )
timestamp format layout
Variables ¶
This section is empty.
Functions ¶
func LoadOrSaveJSON ¶
LoadOrSaveJSON 解析name.json,不存在保存
func LoadOrSaveToml ¶
LoadOrSaveToml 解析name.toml,不存在保存
func LoadOrSaveYaml ¶ added in v0.2.1
LoadOrSaveYaml 解析name.yaml,不存在保存
Types ¶
type QueueManager ¶ added in v0.0.2
type QueueManager struct {
// contains filtered or unexported fields
}
QueueManager 队列管理器
func (*QueueManager) AddQueue ¶ added in v0.0.2
func (qm *QueueManager) AddQueue(q IQueue)
AddQueue 管理器中添加队列
func (*QueueManager) GetQueue ¶ added in v0.0.2
func (qm *QueueManager) GetQueue(i int) IQueue
GetQueue 管理器中获取队列
func (*QueueManager) PushQueue ¶ added in v0.0.2
func (qm *QueueManager) PushQueue(i int, args interface{})
PushQueue 添加任务到管理器队列中
func (*QueueManager) StartQueues ¶ added in v0.2.1
func (qm *QueueManager) StartQueues()
StartQueue 管理器启动所有队列
type TStamp ¶
type TStamp int64
TStamp custom type for int64
func (TStamp) MarshalJSON ¶
MarshalJSON implement Marshaler
func (*TStamp) UnmarshalJSON ¶
UnmarshalJSON implement Unmarshaler
type XmlMap ¶
XmlMap xml转换map
func (XmlMap) MarshalXML ¶
MarshalXML marshals the map to XML
func (*XmlMap) UnmarshalXML ¶
UnmarshalXML unmarshals the XML into a map of string to strings
Click to show internal directories.
Click to hide internal directories.