Documentation
¶
Overview ¶
Package testutil provides utility functions and types for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFreeTCPPort ¶ added in v0.1.0
GetFreeTCPPort asks the kernel for a free open port that is ready to use.
Types ¶
type Base ¶ added in v0.1.0
type Base struct {
Logger *slog.Logger
Dependencies map[string]Dependency
CacheDir string
// contains filtered or unexported fields
}
Base is a utility struct that provides common resources and utilities for testing.
func (*Base) ForController ¶ added in v0.1.0
func (b *Base) ForController() *ControllerBase
ForController creates a new instance of ControllerBase with a Base.
func (*Base) GetFreeTCPPort ¶ added in v0.1.0
GetFreeTCPPort returns a free TCP port that is ready to use.
type Controller ¶
type Controller interface {
RoutesInfo() gin.RoutesInfo
}
Controller is an interface that defines the methods for a controller.
type ControllerBase ¶
ControllerBase is a struct that provides a base for controllers.
func (*ControllerBase) SetupRouter ¶
func (b *ControllerBase) SetupRouter(controller Controller)
SetupRouter sets up the router for the controller.
Click to show internal directories.
Click to hide internal directories.