Documentation
¶
Index ¶
- Constants
- func GetGinApp() *gin.Engine
- func GetNextTime(second int64) *time.Time
- func GetSQLDir() string
- func MustGetwd() string
- func RecoverPanic(err *error)
- func RunSQLScript(conf dtmcli.DBConf, script string, skipDrop bool)
- func WrapHandler2(fn func(*gin.Context) interface{}) gin.HandlerFunc
- type DB
- type ModelBase
Constants ¶
View Source
const ( // DefaultHTTPServer default url for http server. used by test and examples DefaultHTTPServer = "http://localhost:36789/api/dtmsvr" // DefaultGrpcServer default url for grpc server. used by test and examples DefaultGrpcServer = "localhost:36790" )
Variables ¶
This section is empty.
Functions ¶
func GetSQLDir ¶ added in v1.9.1
func GetSQLDir() string
GetSQLDir 获取调用该函数的caller源代码的目录,主要用于测试时,查找相关文件
func RunSQLScript ¶
RunSQLScript 1
func WrapHandler2 ¶ added in v1.10.0
func WrapHandler2(fn func(*gin.Context) interface{}) gin.HandlerFunc
WrapHandler2 wrap a function te bo the handler of gin request
Types ¶
Click to show internal directories.
Click to hide internal directories.