Versions in this module Expand all Collapse all v0 v0.0.5 Mar 16, 2026 v0.0.2 Mar 15, 2026 Changes in this version + const DefaultHistorySize + const DefaultMethod + const DefaultStatusCode + type Config struct + Delay time.Duration + EnableCORS bool + EnableControlAPI bool + HistorySize int + Port int + Verbose bool + type DataSource interface + Get func(path string) (any, bool) + type Dependencies struct + EnvSourceFactory EnvSourceFactory + ExpressionEvaluator ExpressionEvaluator + ExtensionProcessor ExtensionProcessor + HistoryStore HistoryStore + RequestSourceFactory RequestSourceFactory + RouteProvider RouteProvider + StateSourceFactory StateSourceFactory + StateStore StateStore + type EnvSourceFactory interface + NewEnvSource func() DataSource + type ExpressionEvaluator interface + AddSource func(name string, source DataSource) + Evaluate func(expr string) (any, error) + type ExtensionProcessor interface + EvaluateParamsMatch func(params map[string]any, eval ExpressionEvaluator) (bool, error) + ExtractHeaders func(example *openapi3.Example) (map[string]any, bool) + ExtractOnce func(example *openapi3.Example) bool + ExtractParamsMatch func(example *openapi3.Example) (map[string]any, bool) + ExtractSetState func(example *openapi3.Example) (map[string]any, bool) + ExtractSkip func(example *openapi3.Example) bool + type HistoryStore interface + Add func(record RequestRecord) + Capacity func() int + Clear func() + Count func() int + GetAll func() []RequestRecord + type RequestRecord struct + Body []byte + Headers http.Header + ID string + Method string + Path string + Query string + Response *ResponseRecord + Timestamp time.Time + type RequestSourceFactory interface + NewRequestSource func(r *http.Request, pathParams map[string]string) DataSource + type ResponseRecord struct + Body []byte + Duration time.Duration + Headers http.Header + StatusCode int + type RouteMapping struct + ChiPattern string + Method string + Operation *openapi3.Operation + Parameters openapi3.Parameters + Path string + Pattern string + Prefix string + Responses *openapi3.Responses + type RouteProvider interface + BuildRouteMappings func(schemas []SchemaInfo) ([]RouteMapping, error) + type SchemaInfo struct + Prefix string + Spec *openapi3.T + type Server struct + func New(config Config, schemas []loader.SchemaInfo) (*Server, error) + func NewWithDependencies(config Config, schemas []SchemaInfo, deps Dependencies) (*Server, error) + func (s *Server) Shutdown(ctx context.Context) error + func (s *Server) Start() error + type StateSourceFactory interface + NewStateSource func(namespace string) DataSource + type StateStore interface + Delete func(namespace, key string) + Get func(namespace, key string) (any, bool) + GetAll func() map[string]map[string]any + GetNamespace func(namespace string) map[string]any + Increment func(namespace, key string, delta float64) (float64, error) + Set func(namespace, key string, value any)