onviftesting

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CameraCapture

type CameraCapture struct {
	CameraName string
	Exchanges  []CapturedExchange
}

CameraCapture holds all captured exchanges for a camera

func LoadCaptureFromArchive

func LoadCaptureFromArchive(archivePath string) (*CameraCapture, error)

LoadCaptureFromArchive loads all captured exchanges from a tar.gz archive

type CapturedExchange

type CapturedExchange struct {
	Timestamp     string `json:"timestamp"`
	Operation     int    `json:"operation"`
	OperationName string `json:"operation_name,omitempty"`
	Endpoint      string `json:"endpoint"`
	RequestBody   string `json:"request_body"`
	ResponseBody  string `json:"response_body"`
	StatusCode    int    `json:"status_code"`
	Error         string `json:"error,omitempty"`
}

CapturedExchange represents a single SOAP request/response pair

type MockSOAPServer

type MockSOAPServer struct {
	Server  *httptest.Server
	Capture *CameraCapture
}

MockSOAPServer creates a test HTTP server that replays captured SOAP responses

func NewMockSOAPServer

func NewMockSOAPServer(archivePath string) (*MockSOAPServer, error)

NewMockSOAPServer creates a new mock server from a capture archive

func (*MockSOAPServer) Close

func (m *MockSOAPServer) Close()

Close shuts down the mock server

func (*MockSOAPServer) URL

func (m *MockSOAPServer) URL() string

URL returns the mock server's URL

Jump to

Keyboard shortcuts

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