Documentation ¶
Index ¶
- func GetPrivateIP() string
- type MockServersService
- type MockServersServiceImp
- func (s *MockServersServiceImp) IsMockServerRunningOnGivenPortAndProctocol(port int, protocol string) bool
- func (s *MockServersServiceImp) Start(cfg *models.StartMockServerRequestBody) error
- func (s *MockServersServiceImp) StartHTTPSServer(port int, protocol string, cert string, key string) error
- func (s *MockServersServiceImp) StartHTTPServer(port int, protocol string) error
- func (s *MockServersServiceImp) StartTCPServer(port int, protocol string) error
- func (s *MockServersServiceImp) StartUDPServer(port int, protocol string) error
- func (s *MockServersServiceImp) Stop(cfg *models.StopMockServerRequestBody) error
- func (s *MockServersServiceImp) StopHTTPSServer(port int, protocol string) error
- func (s *MockServersServiceImp) StopHTTPServer(port int, protocol string) error
- func (s *MockServersServiceImp) StopTCPServer(port int, protocol string) error
- func (s *MockServersServiceImp) StopUDPServer(port int, protocol string) error
- type MockServersServiceMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockServersService ¶
type MockServersService interface { Start(cfg *models.StartMockServerRequestBody) error Stop(cfg *models.StopMockServerRequestBody) error }
type MockServersServiceImp ¶
type MockServersServiceImp struct {
// contains filtered or unexported fields
}
MockServerService provides functionality to start mock servers.
func NewMockServersServiceImp ¶
func NewMockServersServiceImp(logger logger.Logger) *MockServersServiceImp
func (*MockServersServiceImp) IsMockServerRunningOnGivenPortAndProctocol ¶
func (s *MockServersServiceImp) IsMockServerRunningOnGivenPortAndProctocol(port int, protocol string) bool
IsMockServerRunning returns true if on given port and protocol any server is running.
func (*MockServersServiceImp) Start ¶
func (s *MockServersServiceImp) Start(cfg *models.StartMockServerRequestBody) error
Start starts a mock server of the given type and port.
func (*MockServersServiceImp) StartHTTPSServer ¶
func (*MockServersServiceImp) StartHTTPServer ¶
func (s *MockServersServiceImp) StartHTTPServer(port int, protocol string) error
func (*MockServersServiceImp) StartTCPServer ¶
func (s *MockServersServiceImp) StartTCPServer(port int, protocol string) error
func (*MockServersServiceImp) StartUDPServer ¶
func (s *MockServersServiceImp) StartUDPServer(port int, protocol string) error
func (*MockServersServiceImp) Stop ¶
func (s *MockServersServiceImp) Stop(cfg *models.StopMockServerRequestBody) error
Stop stops a mock server of the given type on given port.
func (*MockServersServiceImp) StopHTTPSServer ¶
func (s *MockServersServiceImp) StopHTTPSServer(port int, protocol string) error
func (*MockServersServiceImp) StopHTTPServer ¶
func (s *MockServersServiceImp) StopHTTPServer(port int, protocol string) error
func (*MockServersServiceImp) StopTCPServer ¶
func (s *MockServersServiceImp) StopTCPServer(port int, protocol string) error
func (*MockServersServiceImp) StopUDPServer ¶
func (s *MockServersServiceImp) StopUDPServer(port int, protocol string) error
type MockServersServiceMock ¶
type MockServersServiceMock struct { StartFunc func(cfg *models.StartMockServerRequestBody) error StopFunc func(cfg *models.StopMockServerRequestBody) error }
func (*MockServersServiceMock) Start ¶
func (mss *MockServersServiceMock) Start(cfg *models.StartMockServerRequestBody) error
func (*MockServersServiceMock) Stop ¶
func (mss *MockServersServiceMock) Stop(cfg *models.StopMockServerRequestBody) error
Click to show internal directories.
Click to hide internal directories.