Documentation
¶
Index ¶
- func InitDB() *gorm.DB
- func InitLogger() *slog.Logger
- func StartHttpServer(port string)
- type HttpServer
- func (u *HttpServer) Error(ctx *gin.Context)
- func (u *HttpServer) ExploreFailed(ctx *gin.Context)
- func (u *HttpServer) ExploreSuccess(ctx *gin.Context)
- func (u *HttpServer) Fail(ctx *gin.Context)
- func (u *HttpServer) RegisterRouter(server *gin.Engine)
- func (u *HttpServer) Running(ctx *gin.Context)
- func (u *HttpServer) Success(ctx *gin.Context)
- func (u *HttpServer) Timeout(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
func StartHttpServer ¶
func StartHttpServer(port string)
Types ¶
type HttpServer ¶
type HttpServer struct { // 记录当前是第几个请求 Count int }
HttpServer 模拟业务方的返回
var Srv *HttpServer
fixme 为了 能够并发的测试, 在每个测试用例结束后 把count 清0
func (*HttpServer) Error ¶
func (u *HttpServer) Error(ctx *gin.Context)
func (*HttpServer) ExploreFailed ¶
func (u *HttpServer) ExploreFailed(ctx *gin.Context)
func (*HttpServer) ExploreSuccess ¶
func (u *HttpServer) ExploreSuccess(ctx *gin.Context)
func (*HttpServer) Fail ¶
func (u *HttpServer) Fail(ctx *gin.Context)
func (*HttpServer) RegisterRouter ¶
func (u *HttpServer) RegisterRouter(server *gin.Engine)
func (*HttpServer) Running ¶
func (u *HttpServer) Running(ctx *gin.Context)
func (*HttpServer) Success ¶
func (u *HttpServer) Success(ctx *gin.Context)
func (*HttpServer) Timeout ¶
func (u *HttpServer) Timeout(ctx *gin.Context)
Click to show internal directories.
Click to hide internal directories.