Documentation ¶
Index ¶
- func CreateAPIProviderWithGetResponses[K providertypes.ResponseKey, V providertypes.ResponseValue](t *testing.T, logger *zap.Logger, cfg config.ProviderConfig, ids []K, ...) *base.Provider[K, V]
- func CreateAPIProviderWithResponseFn[K providertypes.ResponseKey, V providertypes.ResponseValue](t *testing.T, logger *zap.Logger, cfg config.ProviderConfig, ids []K, ...) *base.Provider[K, V]
- func CreateAPIQueryHandlerWithGetResponses[K providertypes.ResponseKey, V providertypes.ResponseValue](t *testing.T, logger *zap.Logger, responses []providertypes.GetResponse[K, V], ...) handlers.APIQueryHandler[K, V]
- func CreateAPIQueryHandlerWithResponseFn[K providertypes.ResponseKey, V providertypes.ResponseValue](t *testing.T, fn func(context.Context, chan<- providertypes.GetResponse[K, V])) handlers.APIQueryHandler[K, V]
- func CreateResponseFromJSON(m string) *http.Response
- func CreateWebSocketProviderWithGetResponses[K providertypes.ResponseKey, V providertypes.ResponseValue](t *testing.T, timeout time.Duration, ids []K, cfg config.ProviderConfig, ...) *base.Provider[K, V]
- func CreateWebSocketProviderWithResponseFn[K providertypes.ResponseKey, V providertypes.ResponseValue](t *testing.T, cfg config.ProviderConfig, logger *zap.Logger, ...) *base.Provider[K, V]
- func CreateWebSocketQueryHandlerWithGetResponses[K providertypes.ResponseKey, V providertypes.ResponseValue](t *testing.T, timeout time.Duration, logger *zap.Logger, ...) handlers.WebSocketQueryHandler[K, V]
- func CreateWebSocketQueryHandlerWithResponseFn[K providertypes.ResponseKey, V providertypes.ResponseValue](t *testing.T, fn func(context.Context, chan<- providertypes.GetResponse[K, V])) handlers.WebSocketQueryHandler[K, V]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAPIProviderWithGetResponses ¶
func CreateAPIProviderWithGetResponses[K providertypes.ResponseKey, V providertypes.ResponseValue]( t *testing.T, logger *zap.Logger, cfg config.ProviderConfig, ids []K, responses []providertypes.GetResponse[K, V], timeout time.Duration, ) *base.Provider[K, V]
CreateAPIProviderWithGetResponses creates a new provider with the given responses.
func CreateAPIProviderWithResponseFn ¶
func CreateAPIProviderWithResponseFn[K providertypes.ResponseKey, V providertypes.ResponseValue]( t *testing.T, logger *zap.Logger, cfg config.ProviderConfig, ids []K, fn func(context.Context, chan<- providertypes.GetResponse[K, V]), ) *base.Provider[K, V]
CreateAPIProviderWithResponseFn creates a new provider with the given response function.
func CreateAPIQueryHandlerWithGetResponses ¶
func CreateAPIQueryHandlerWithGetResponses[K providertypes.ResponseKey, V providertypes.ResponseValue]( t *testing.T, logger *zap.Logger, responses []providertypes.GetResponse[K, V], timeout time.Duration, ) handlers.APIQueryHandler[K, V]
CreateAPIQueryHandlerWithGetResponses creates a mock query handler that returns the given responses every time it is invoked.
func CreateAPIQueryHandlerWithResponseFn ¶
func CreateAPIQueryHandlerWithResponseFn[K providertypes.ResponseKey, V providertypes.ResponseValue]( t *testing.T, fn func(context.Context, chan<- providertypes.GetResponse[K, V]), ) handlers.APIQueryHandler[K, V]
CreateAPIQueryHandlerWithResponseFn creates a mock query handler that invokes the given function every time it is invoked. The function should utilize the response channel to send responses to the provider.
func CreateResponseFromJSON ¶
CreateResponseFromJSON creates a http response from a json string.
func CreateWebSocketProviderWithGetResponses ¶
func CreateWebSocketProviderWithGetResponses[K providertypes.ResponseKey, V providertypes.ResponseValue]( t *testing.T, timeout time.Duration, ids []K, cfg config.ProviderConfig, logger *zap.Logger, responses []providertypes.GetResponse[K, V], ) *base.Provider[K, V]
CreateWebSocketProviderWithGetResponses creates a new websocket provider with the given responses.
func CreateWebSocketProviderWithResponseFn ¶
func CreateWebSocketProviderWithResponseFn[K providertypes.ResponseKey, V providertypes.ResponseValue]( t *testing.T, cfg config.ProviderConfig, logger *zap.Logger, fn func(context.Context, chan<- providertypes.GetResponse[K, V]), ) *base.Provider[K, V]
CreateWebSocketProviderWithResponseFn creates a new websocket provider with the given response function.
func CreateWebSocketQueryHandlerWithGetResponses ¶
func CreateWebSocketQueryHandlerWithGetResponses[K providertypes.ResponseKey, V providertypes.ResponseValue]( t *testing.T, timeout time.Duration, logger *zap.Logger, responses []providertypes.GetResponse[K, V], ) handlers.WebSocketQueryHandler[K, V]
CreateWebSocketQueryHandlerWithGetResponses creates a mock query handler that returns the given responses every time it is invoked.
func CreateWebSocketQueryHandlerWithResponseFn ¶
func CreateWebSocketQueryHandlerWithResponseFn[K providertypes.ResponseKey, V providertypes.ResponseValue]( t *testing.T, fn func(context.Context, chan<- providertypes.GetResponse[K, V]), ) handlers.WebSocketQueryHandler[K, V]
CreateWebSocketQueryHandlerWithResponseFn creates a mock query handler that invokes the given function every time it is invoked. The function should utilize the response channel to send responses to the provider.
Types ¶
This section is empty.