Documentation
¶
Index ¶
- Constants
- Variables
- func Func(method, path string, f func(ctx *gin.Context)) error
- func HostDockerInternal() string
- func JSON(method, path string, response map[string]any, statusCode int) error
- func RecordKey(method, path string) string
- type CustomResponseWriter
- type Input
- type Output
- type Record
- type Records
Constants ¶
View Source
const (
DefaultFakeServicePort = 9111
)
Variables ¶
View Source
var (
R = NewRecords()
)
View Source
var (
Service *gin.Engine
)
Functions ¶
func HostDockerInternal ¶
func HostDockerInternal() string
HostDockerInternal returns host.docker.internal that works both locally and in GHA
Types ¶
type CustomResponseWriter ¶
type CustomResponseWriter struct {
gin.ResponseWriter
// contains filtered or unexported fields
}
CustomResponseWriter wraps gin.ResponseWriter to capture response data
type Output ¶
type Output struct {
UseCache bool `toml:"use_cache"`
BaseURLHost string `toml:"base_url_host"`
BaseURLDocker string `toml:"base_url_docker"`
}
func NewDockerFakeDataProvider ¶
NewDockerFakeDataProvider creates new fake data provider in Docker using testcontainers-go
func NewFakeDataProvider ¶
NewFakeDataProvider creates new fake data provider
Click to show internal directories.
Click to hide internal directories.