adapters

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtensionsAdapter

type ExtensionsAdapter struct{}

ExtensionsAdapter adapts extensions package to server.ExtensionProcessor interface.

func (*ExtensionsAdapter) EvaluateParamsMatch

func (a *ExtensionsAdapter) EvaluateParamsMatch(params map[string]any, eval server.ExpressionEvaluator) (bool, error)

func (*ExtensionsAdapter) ExtractHeaders

func (a *ExtensionsAdapter) ExtractHeaders(example *openapi3.Example) (map[string]any, bool)

func (*ExtensionsAdapter) ExtractOnce

func (a *ExtensionsAdapter) ExtractOnce(example *openapi3.Example) bool

func (*ExtensionsAdapter) ExtractParamsMatch

func (a *ExtensionsAdapter) ExtractParamsMatch(example *openapi3.Example) (map[string]any, bool)

func (*ExtensionsAdapter) ExtractSetState

func (a *ExtensionsAdapter) ExtractSetState(example *openapi3.Example) (map[string]any, bool)

func (*ExtensionsAdapter) ExtractSkip

func (a *ExtensionsAdapter) ExtractSkip(example *openapi3.Example) bool

type HistoryRingBufferAdapter

type HistoryRingBufferAdapter struct {
	// contains filtered or unexported fields
}

HistoryRingBufferAdapter adapts history.RingBuffer to server.HistoryStore interface.

func NewHistoryRingBufferAdapter

func NewHistoryRingBufferAdapter(buffer *history.RingBuffer) *HistoryRingBufferAdapter

func (*HistoryRingBufferAdapter) Add

func (*HistoryRingBufferAdapter) Capacity

func (a *HistoryRingBufferAdapter) Capacity() int

func (*HistoryRingBufferAdapter) Clear

func (a *HistoryRingBufferAdapter) Clear()

func (*HistoryRingBufferAdapter) Count

func (a *HistoryRingBufferAdapter) Count() int

func (*HistoryRingBufferAdapter) GetAll

type LoaderRouteAdapter

type LoaderRouteAdapter struct{}

LoaderRouteAdapter adapts loader package to server.RouteProvider interface.

func (*LoaderRouteAdapter) BuildRouteMappings

func (a *LoaderRouteAdapter) BuildRouteMappings(schemas []server.SchemaInfo) ([]server.RouteMapping, error)

type RuntimeEnvSourceAdapter

type RuntimeEnvSourceAdapter struct {
	// contains filtered or unexported fields
}

RuntimeEnvSourceAdapter adapts runtime.EnvSource to server.DataSource.

func NewRuntimeEnvSourceAdapter

func NewRuntimeEnvSourceAdapter(source *runtime.EnvSource) *RuntimeEnvSourceAdapter

func (*RuntimeEnvSourceAdapter) Get

func (a *RuntimeEnvSourceAdapter) Get(path string) (any, bool)

type RuntimeEnvSourceFactory

type RuntimeEnvSourceFactory struct{}

RuntimeEnvSourceFactory implements server.EnvSourceFactory using runtime package.

func (*RuntimeEnvSourceFactory) NewEnvSource

func (f *RuntimeEnvSourceFactory) NewEnvSource() server.DataSource

type RuntimeExpressionEvaluatorAdapter

type RuntimeExpressionEvaluatorAdapter struct {
	// contains filtered or unexported fields
}

RuntimeExpressionEvaluatorAdapter adapts runtime.Evaluator to server.ExpressionEvaluator.

func NewRuntimeExpressionEvaluatorAdapter

func NewRuntimeExpressionEvaluatorAdapter(eval runtime.Evaluator) *RuntimeExpressionEvaluatorAdapter

func (*RuntimeExpressionEvaluatorAdapter) AddSource

func (a *RuntimeExpressionEvaluatorAdapter) AddSource(name string, source server.DataSource)

func (*RuntimeExpressionEvaluatorAdapter) Evaluate

func (a *RuntimeExpressionEvaluatorAdapter) Evaluate(expr string) (any, error)

type RuntimeRequestSourceAdapter

type RuntimeRequestSourceAdapter struct {
	// contains filtered or unexported fields
}

RuntimeRequestSourceAdapter adapts runtime.RequestSource to server.DataSource.

func NewRuntimeRequestSourceAdapter

func NewRuntimeRequestSourceAdapter(source *runtime.RequestSource) *RuntimeRequestSourceAdapter

func (*RuntimeRequestSourceAdapter) Get

func (a *RuntimeRequestSourceAdapter) Get(path string) (any, bool)

type RuntimeRequestSourceFactory

type RuntimeRequestSourceFactory struct{}

RuntimeRequestSourceFactory implements server.RequestSourceFactory using runtime package.

func (*RuntimeRequestSourceFactory) NewRequestSource

func (f *RuntimeRequestSourceFactory) NewRequestSource(r *http.Request, pathParams map[string]string) server.DataSource

type RuntimeStateSourceAdapter

type RuntimeStateSourceAdapter struct {
	// contains filtered or unexported fields
}

RuntimeStateSourceAdapter adapts runtime.StateSource to server.DataSource.

func NewRuntimeStateSourceAdapter

func NewRuntimeStateSourceAdapter(source *runtime.StateSource) *RuntimeStateSourceAdapter

func (*RuntimeStateSourceAdapter) Get

func (a *RuntimeStateSourceAdapter) Get(path string) (any, bool)

type RuntimeStateSourceFactory

type RuntimeStateSourceFactory struct {
	// contains filtered or unexported fields
}

RuntimeStateSourceFactory implements server.StateSourceFactory using runtime package.

func NewRuntimeStateSourceFactory

func NewRuntimeStateSourceFactory(stateStore server.StateStore) *RuntimeStateSourceFactory

func (*RuntimeStateSourceFactory) NewStateSource

func (f *RuntimeStateSourceFactory) NewStateSource(namespace string) server.DataSource

type StateManagerAdapter

type StateManagerAdapter struct {
	// contains filtered or unexported fields
}

StateManagerAdapter adapts state.Manager to server.StateStore interface.

func NewStateManagerAdapter

func NewStateManagerAdapter(manager *state.Manager) *StateManagerAdapter

func (*StateManagerAdapter) Delete

func (a *StateManagerAdapter) Delete(namespace, key string)

func (*StateManagerAdapter) Get

func (a *StateManagerAdapter) Get(namespace, key string) (any, bool)

func (*StateManagerAdapter) GetAll

func (a *StateManagerAdapter) GetAll() map[string]map[string]any

func (*StateManagerAdapter) GetNamespace

func (a *StateManagerAdapter) GetNamespace(namespace string) map[string]any

func (*StateManagerAdapter) Increment

func (a *StateManagerAdapter) Increment(namespace, key string, delta float64) (float64, error)

func (*StateManagerAdapter) Set

func (a *StateManagerAdapter) Set(namespace, key string, value any)

Jump to

Keyboard shortcuts

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