Documentation
¶
Overview ¶
Package mock provides core lifecycle management for devx OpenAPI mock servers. Mock servers are powered by Stoplight Prism (stoplight/prism:5) and run as long-lived background containers, similar to devx-managed databases.
Each mock is identified by a user-defined name (e.g. "stripe") and responds to HTTP requests according to the remote OpenAPI spec it is initialized with.
Environment variable injected by `devx mock list`:
MOCK_<NAME>_URL=http://localhost:<port>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockInfo ¶
type MockInfo struct {
Name string `json:"name"`
ContainerName string `json:"container"`
SpecURL string `json:"spec_url"`
Port int `json:"port"`
EnvVar string `json:"env_var"`
Status string `json:"status"`
}
MockInfo describes a running devx mock container for the list command.
type MockServer ¶
MockServer holds metadata about a running (or desired) mock server.
Click to show internal directories.
Click to hide internal directories.