startup

package
v0.0.0-...-12cef5b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB() *gorm.DB

func InitLogger

func InitLogger() *slog.Logger

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL