server

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockServer

type MockServer struct {
	TestServer *httptest.Server
	// contains filtered or unexported fields
}

MockServer is an in-memory HTTP server that implements the CREC API for testing. It provides channels, watchers, wallets, and operations endpoints with no persistence.

func NewMockServer

func NewMockServer() *MockServer

NewMockServer creates and starts a new MockServer with an in-memory store. Call Close when done to shut down the HTTP server.

func (*MockServer) Close

func (s *MockServer) Close()

Close shuts down the mock HTTP server and releases resources.

func (*MockServer) GetChannels

func (s *MockServer) GetChannels(w http.ResponseWriter, r *http.Request, params stdserver.GetChannelsParams)

func (*MockServer) GetChannelsChannelId

func (s *MockServer) GetChannelsChannelId(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID)

func (*MockServer) GetChannelsChannelIdEvents

func (s *MockServer) GetChannelsChannelIdEvents(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID, params stdserver.GetChannelsChannelIdEventsParams)

func (*MockServer) GetChannelsChannelIdEventsSearch

func (s *MockServer) GetChannelsChannelIdEventsSearch(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID, params stdserver.GetChannelsChannelIdEventsSearchParams)

func (*MockServer) GetChannelsChannelIdEventsSearchEventId

func (s *MockServer) GetChannelsChannelIdEventsSearchEventId(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID, eventId openapiTypes.UUID)

func (*MockServer) GetChannelsChannelIdOperations

func (s *MockServer) GetChannelsChannelIdOperations(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID, params stdserver.GetChannelsChannelIdOperationsParams)

func (*MockServer) GetChannelsChannelIdOperationsOperationId

func (s *MockServer) GetChannelsChannelIdOperationsOperationId(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID, operationId openapiTypes.UUID)

func (*MockServer) GetChannelsChannelIdWatchers

func (s *MockServer) GetChannelsChannelIdWatchers(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID, params stdserver.GetChannelsChannelIdWatchersParams)

func (*MockServer) GetChannelsChannelIdWatchersWatcherId

func (s *MockServer) GetChannelsChannelIdWatchersWatcherId(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID, watcherId openapiTypes.UUID)

func (*MockServer) GetHealthCheck

func (s *MockServer) GetHealthCheck(w http.ResponseWriter, r *http.Request)

GetHealthCheck handles GET /health and returns a healthy status.

func (*MockServer) GetNetworks

func (s *MockServer) GetNetworks(w http.ResponseWriter, r *http.Request)

GetNetworks handles GET /networks and returns an empty network list.

func (*MockServer) GetWallets

func (s *MockServer) GetWallets(w http.ResponseWriter, r *http.Request, params stdserver.GetWalletsParams)

func (*MockServer) GetWalletsWalletId

func (s *MockServer) GetWalletsWalletId(w http.ResponseWriter, r *http.Request, walletId openapiTypes.UUID)

func (*MockServer) PatchChannelsChannelId

func (s *MockServer) PatchChannelsChannelId(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID)

func (*MockServer) PatchChannelsChannelIdWatchersWatcherId

func (s *MockServer) PatchChannelsChannelIdWatchersWatcherId(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID, watcherId openapiTypes.UUID)

func (*MockServer) PatchWalletsWalletId

func (s *MockServer) PatchWalletsWalletId(w http.ResponseWriter, r *http.Request, walletId openapiTypes.UUID)

func (*MockServer) PostChannels

func (s *MockServer) PostChannels(w http.ResponseWriter, r *http.Request)

func (*MockServer) PostChannelsChannelIdOperations

func (s *MockServer) PostChannelsChannelIdOperations(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID)

func (*MockServer) PostChannelsChannelIdWatchers

func (s *MockServer) PostChannelsChannelIdWatchers(w http.ResponseWriter, r *http.Request, channelId openapiTypes.UUID)

func (*MockServer) PostEvents

func (s *MockServer) PostEvents(w http.ResponseWriter, r *http.Request)

func (*MockServer) PostOperationStatus

func (s *MockServer) PostOperationStatus(w http.ResponseWriter, r *http.Request)

func (*MockServer) PostWallets

func (s *MockServer) PostWallets(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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