Documentation
¶
Index ¶
- func DisableTelemetryMiddleware()
- func EnableTelemetryMiddleware()
- func TelemetryHTTPMiddleware(publish func(events.Event) (events.Envelope, bool)) func(http.Handler) http.Handler
- func TelemetryMiddlewareEnabled() bool
- func TelemetryStrictMiddleware() oapi.StrictMiddlewareFunc
- type ApiService
- func (s *ApiService) BatchComputerAction(ctx context.Context, request oapi.BatchComputerActionRequestObject) (oapi.BatchComputerActionResponseObject, error)
- func (s *ApiService) ChromiumConfigure(ctx context.Context, request oapi.ChromiumConfigureRequestObject) (resp oapi.ChromiumConfigureResponseObject, err error)
- func (s *ApiService) ClickMouse(ctx context.Context, request oapi.ClickMouseRequestObject) (oapi.ClickMouseResponseObject, error)
- func (s *ApiService) CreateDirectory(ctx context.Context, req oapi.CreateDirectoryRequestObject) (oapi.CreateDirectoryResponseObject, error)
- func (s *ApiService) DeleteDirectory(ctx context.Context, req oapi.DeleteDirectoryRequestObject) (oapi.DeleteDirectoryResponseObject, error)
- func (s *ApiService) DeleteFile(ctx context.Context, req oapi.DeleteFileRequestObject) (oapi.DeleteFileResponseObject, error)
- func (s *ApiService) DeleteRecording(ctx context.Context, req oapi.DeleteRecordingRequestObject) (oapi.DeleteRecordingResponseObject, error)
- func (s *ApiService) DisableScaleToZero(ctx context.Context, _ oapi.DisableScaleToZeroRequestObject) (oapi.DisableScaleToZeroResponseObject, error)
- func (s *ApiService) DownloadDirZip(ctx context.Context, request oapi.DownloadDirZipRequestObject) (oapi.DownloadDirZipResponseObject, error)
- func (s *ApiService) DownloadDirZstd(ctx context.Context, request oapi.DownloadDirZstdRequestObject) (oapi.DownloadDirZstdResponseObject, error)
- func (s *ApiService) DownloadRecording(ctx context.Context, req oapi.DownloadRecordingRequestObject) (oapi.DownloadRecordingResponseObject, error)
- func (s *ApiService) DragMouse(ctx context.Context, request oapi.DragMouseRequestObject) (oapi.DragMouseResponseObject, error)
- func (s *ApiService) EnableScaleToZero(ctx context.Context, _ oapi.EnableScaleToZeroRequestObject) (oapi.EnableScaleToZeroResponseObject, error)
- func (s *ApiService) ExecutePlaywrightCode(ctx context.Context, request oapi.ExecutePlaywrightCodeRequestObject) (oapi.ExecutePlaywrightCodeResponseObject, error)
- func (s *ApiService) FileInfo(ctx context.Context, req oapi.FileInfoRequestObject) (oapi.FileInfoResponseObject, error)
- func (s *ApiService) GetMousePosition(ctx context.Context, request oapi.GetMousePositionRequestObject) (oapi.GetMousePositionResponseObject, error)
- func (s *ApiService) GetTelemetry(_ context.Context, _ oapi.GetTelemetryRequestObject) (oapi.GetTelemetryResponseObject, error)
- func (s *ApiService) HandleProcessAttachWS(w http.ResponseWriter, r *http.Request, id string)
- func (s *ApiService) ListFiles(ctx context.Context, req oapi.ListFilesRequestObject) (oapi.ListFilesResponseObject, error)
- func (s *ApiService) ListRecorders(ctx context.Context, _ oapi.ListRecordersRequestObject) (oapi.ListRecordersResponseObject, error)
- func (s *ApiService) LogsStream(ctx context.Context, request oapi.LogsStreamRequestObject) (oapi.LogsStreamResponseObject, error)
- func (s *ApiService) MoveMouse(ctx context.Context, request oapi.MoveMouseRequestObject) (oapi.MoveMouseResponseObject, error)
- func (s *ApiService) MovePath(ctx context.Context, req oapi.MovePathRequestObject) (oapi.MovePathResponseObject, error)
- func (s *ApiService) PatchChromiumFlags(ctx context.Context, request oapi.PatchChromiumFlagsRequestObject) (oapi.PatchChromiumFlagsResponseObject, error)
- func (s *ApiService) PatchChromiumPolicies(ctx context.Context, request oapi.PatchChromiumPoliciesRequestObject) (oapi.PatchChromiumPoliciesResponseObject, error)
- func (s *ApiService) PatchDisplay(ctx context.Context, req oapi.PatchDisplayRequestObject) (oapi.PatchDisplayResponseObject, error)
- func (s *ApiService) PatchTelemetry(_ context.Context, req oapi.PatchTelemetryRequestObject) (oapi.PatchTelemetryResponseObject, error)
- func (s *ApiService) PressKey(ctx context.Context, request oapi.PressKeyRequestObject) (oapi.PressKeyResponseObject, error)
- func (s *ApiService) ProcessExec(ctx context.Context, request oapi.ProcessExecRequestObject) (oapi.ProcessExecResponseObject, error)
- func (s *ApiService) ProcessKill(ctx context.Context, request oapi.ProcessKillRequestObject) (oapi.ProcessKillResponseObject, error)
- func (s *ApiService) ProcessResize(ctx context.Context, request oapi.ProcessResizeRequestObject) (oapi.ProcessResizeResponseObject, error)
- func (s *ApiService) ProcessSpawn(ctx context.Context, request oapi.ProcessSpawnRequestObject) (oapi.ProcessSpawnResponseObject, error)
- func (s *ApiService) ProcessStatus(ctx context.Context, request oapi.ProcessStatusRequestObject) (oapi.ProcessStatusResponseObject, error)
- func (s *ApiService) ProcessStdin(ctx context.Context, request oapi.ProcessStdinRequestObject) (oapi.ProcessStdinResponseObject, error)
- func (s *ApiService) ProcessStdoutStream(ctx context.Context, request oapi.ProcessStdoutStreamRequestObject) (oapi.ProcessStdoutStreamResponseObject, error)
- func (s *ApiService) PublishTelemetryEvent(_ context.Context, req oapi.PublishTelemetryEventRequestObject) (oapi.PublishTelemetryEventResponseObject, error)
- func (s *ApiService) PutTelemetry(ctx context.Context, req oapi.PutTelemetryRequestObject) (oapi.PutTelemetryResponseObject, error)
- func (s *ApiService) ReadClipboard(ctx context.Context, request oapi.ReadClipboardRequestObject) (oapi.ReadClipboardResponseObject, error)
- func (s *ApiService) ReadFile(ctx context.Context, req oapi.ReadFileRequestObject) (oapi.ReadFileResponseObject, error)
- func (s *ApiService) Scroll(ctx context.Context, request oapi.ScrollRequestObject) (oapi.ScrollResponseObject, error)
- func (s *ApiService) SetCursor(ctx context.Context, request oapi.SetCursorRequestObject) (oapi.SetCursorResponseObject, error)
- func (s *ApiService) SetFilePermissions(ctx context.Context, req oapi.SetFilePermissionsRequestObject) (oapi.SetFilePermissionsResponseObject, error)
- func (s *ApiService) Shutdown(ctx context.Context) error
- func (s *ApiService) StartFsWatch(ctx context.Context, req oapi.StartFsWatchRequestObject) (oapi.StartFsWatchResponseObject, error)
- func (s *ApiService) StartRecording(ctx context.Context, req oapi.StartRecordingRequestObject) (oapi.StartRecordingResponseObject, error)
- func (s *ApiService) StopFsWatch(ctx context.Context, req oapi.StopFsWatchRequestObject) (oapi.StopFsWatchResponseObject, error)
- func (s *ApiService) StopRecording(ctx context.Context, req oapi.StopRecordingRequestObject) (oapi.StopRecordingResponseObject, error)
- func (s *ApiService) StreamFsEvents(ctx context.Context, req oapi.StreamFsEventsRequestObject) (oapi.StreamFsEventsResponseObject, error)
- func (s *ApiService) StreamTelemetryEvents(ctx context.Context, req oapi.StreamTelemetryEventsRequestObject) (oapi.StreamTelemetryEventsResponseObject, error)
- func (s *ApiService) TakeScreenshot(ctx context.Context, request oapi.TakeScreenshotRequestObject) (oapi.TakeScreenshotResponseObject, error)
- func (s *ApiService) TypeText(ctx context.Context, request oapi.TypeTextRequestObject) (oapi.TypeTextResponseObject, error)
- func (s *ApiService) UploadExtensionsAndRestart(ctx context.Context, request oapi.UploadExtensionsAndRestartRequestObject) (oapi.UploadExtensionsAndRestartResponseObject, error)
- func (s *ApiService) UploadFiles(ctx context.Context, request oapi.UploadFilesRequestObject) (oapi.UploadFilesResponseObject, error)
- func (s *ApiService) UploadZip(ctx context.Context, request oapi.UploadZipRequestObject) (oapi.UploadZipResponseObject, error)
- func (s *ApiService) UploadZstd(ctx context.Context, request oapi.UploadZstdRequestObject) (oapi.UploadZstdResponseObject, error)
- func (s *ApiService) WriteClipboard(ctx context.Context, request oapi.WriteClipboardRequestObject) (oapi.WriteClipboardResponseObject, error)
- func (s *ApiService) WriteFile(ctx context.Context, req oapi.WriteFileRequestObject) (oapi.WriteFileResponseObject, error)
- type XdoTool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableTelemetryMiddleware ¶
func DisableTelemetryMiddleware()
DisableTelemetryMiddleware turns api_call event emission off.
func EnableTelemetryMiddleware ¶
func EnableTelemetryMiddleware()
EnableTelemetryMiddleware turns on api_call event emission.
func TelemetryHTTPMiddleware ¶
func TelemetryHTTPMiddleware(publish func(events.Event) (events.Envelope, bool)) func(http.Handler) http.Handler
TelemetryHTTPMiddleware emits a BrowserApiCallEvent per documented operation, capturing the final status and wall-clock duration. publish is wired to TelemetrySession.Publish; the middleware ignores the returns.
func TelemetryMiddlewareEnabled ¶
func TelemetryMiddlewareEnabled() bool
TelemetryMiddlewareEnabled reports the current state.
func TelemetryStrictMiddleware ¶
func TelemetryStrictMiddleware() oapi.StrictMiddlewareFunc
TelemetryStrictMiddleware records the matched OpenAPI operationId onto the per-request scratch so TelemetryHTTPMiddleware can include it in the event.
Types ¶
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func New ¶
func New( recordManager recorder.RecordManager, factory recorder.FFmpegRecorderFactory, upstreamMgr *devtoolsproxy.UpstreamManager, stz scaletozero.PinnedController, nekoAuthClient *nekoclient.AuthClient, telemetrySession *telemetry.TelemetrySession, eventStream *events.EventStream, displayNum int, ) (*ApiService, error)
func (*ApiService) BatchComputerAction ¶
func (s *ApiService) BatchComputerAction(ctx context.Context, request oapi.BatchComputerActionRequestObject) (oapi.BatchComputerActionResponseObject, error)
func (*ApiService) ChromiumConfigure ¶
func (s *ApiService) ChromiumConfigure(ctx context.Context, request oapi.ChromiumConfigureRequestObject) (resp oapi.ChromiumConfigureResponseObject, err error)
ChromiumConfigure batched Chromium/session configuration plus optional navigation.
func (*ApiService) ClickMouse ¶
func (s *ApiService) ClickMouse(ctx context.Context, request oapi.ClickMouseRequestObject) (oapi.ClickMouseResponseObject, error)
func (*ApiService) CreateDirectory ¶
func (s *ApiService) CreateDirectory(ctx context.Context, req oapi.CreateDirectoryRequestObject) (oapi.CreateDirectoryResponseObject, error)
CreateDirectory creates a new directory (recursively) with an optional mode.
func (*ApiService) DeleteDirectory ¶
func (s *ApiService) DeleteDirectory(ctx context.Context, req oapi.DeleteDirectoryRequestObject) (oapi.DeleteDirectoryResponseObject, error)
DeleteDirectory removes a directory and its contents.
func (*ApiService) DeleteFile ¶
func (s *ApiService) DeleteFile(ctx context.Context, req oapi.DeleteFileRequestObject) (oapi.DeleteFileResponseObject, error)
DeleteFile removes a single file.
func (*ApiService) DeleteRecording ¶
func (s *ApiService) DeleteRecording(ctx context.Context, req oapi.DeleteRecordingRequestObject) (oapi.DeleteRecordingResponseObject, error)
func (*ApiService) DisableScaleToZero ¶
func (s *ApiService) DisableScaleToZero(ctx context.Context, _ oapi.DisableScaleToZeroRequestObject) (oapi.DisableScaleToZeroResponseObject, error)
func (*ApiService) DownloadDirZip ¶
func (s *ApiService) DownloadDirZip(ctx context.Context, request oapi.DownloadDirZipRequestObject) (oapi.DownloadDirZipResponseObject, error)
func (*ApiService) DownloadDirZstd ¶
func (s *ApiService) DownloadDirZstd(ctx context.Context, request oapi.DownloadDirZstdRequestObject) (oapi.DownloadDirZstdResponseObject, error)
func (*ApiService) DownloadRecording ¶
func (s *ApiService) DownloadRecording(ctx context.Context, req oapi.DownloadRecordingRequestObject) (oapi.DownloadRecordingResponseObject, error)
func (*ApiService) DragMouse ¶
func (s *ApiService) DragMouse(ctx context.Context, request oapi.DragMouseRequestObject) (oapi.DragMouseResponseObject, error)
func (*ApiService) EnableScaleToZero ¶
func (s *ApiService) EnableScaleToZero(ctx context.Context, _ oapi.EnableScaleToZeroRequestObject) (oapi.EnableScaleToZeroResponseObject, error)
func (*ApiService) ExecutePlaywrightCode ¶
func (s *ApiService) ExecutePlaywrightCode(ctx context.Context, request oapi.ExecutePlaywrightCodeRequestObject) (oapi.ExecutePlaywrightCodeResponseObject, error)
func (*ApiService) FileInfo ¶
func (s *ApiService) FileInfo(ctx context.Context, req oapi.FileInfoRequestObject) (oapi.FileInfoResponseObject, error)
FileInfo returns metadata about a file or directory.
func (*ApiService) GetMousePosition ¶
func (s *ApiService) GetMousePosition(ctx context.Context, request oapi.GetMousePositionRequestObject) (oapi.GetMousePositionResponseObject, error)
func (*ApiService) GetTelemetry ¶
func (s *ApiService) GetTelemetry(_ context.Context, _ oapi.GetTelemetryRequestObject) (oapi.GetTelemetryResponseObject, error)
GetTelemetry handles GET /telemetry. Returns the current telemetry configuration. Returns 404 if telemetry is not configured.
func (*ApiService) HandleProcessAttachWS ¶
func (s *ApiService) HandleProcessAttachWS(w http.ResponseWriter, r *http.Request, id string)
HandleProcessAttachWS handles PTY attach via WebSocket for bidirectional streaming. Protocol:
- Client sends BinaryMessage for stdin data
- Server sends BinaryMessage for stdout data
- Client sends TextMessage with JSON for control (e.g., resize)
- Server sends TextMessage with JSON for events (e.g., exit code)
This endpoint is intentionally not defined in OpenAPI.
func (*ApiService) ListFiles ¶
func (s *ApiService) ListFiles(ctx context.Context, req oapi.ListFilesRequestObject) (oapi.ListFilesResponseObject, error)
ListFiles returns FileInfo entries for the contents of a directory.
func (*ApiService) ListRecorders ¶
func (s *ApiService) ListRecorders(ctx context.Context, _ oapi.ListRecordersRequestObject) (oapi.ListRecordersResponseObject, error)
ListRecorders returns a list of all registered recorders and whether each one is currently recording.
func (*ApiService) LogsStream ¶
func (s *ApiService) LogsStream(ctx context.Context, request oapi.LogsStreamRequestObject) (oapi.LogsStreamResponseObject, error)
LogsStream implements Server-Sent Events log streaming. (GET /logs/stream)
func (*ApiService) MoveMouse ¶
func (s *ApiService) MoveMouse(ctx context.Context, request oapi.MoveMouseRequestObject) (oapi.MoveMouseResponseObject, error)
func (*ApiService) MovePath ¶
func (s *ApiService) MovePath(ctx context.Context, req oapi.MovePathRequestObject) (oapi.MovePathResponseObject, error)
MovePath renames or moves a file/directory.
func (*ApiService) PatchChromiumFlags ¶
func (s *ApiService) PatchChromiumFlags(ctx context.Context, request oapi.PatchChromiumFlagsRequestObject) (oapi.PatchChromiumFlagsResponseObject, error)
PatchChromiumFlags handles updating Chromium launch flags at runtime. It merges the provided flags with existing flags in /chromium/flags, writes the updated flags file, restarts Chromium via supervisord, and waits until DevTools is ready.
func (*ApiService) PatchChromiumPolicies ¶
func (s *ApiService) PatchChromiumPolicies(ctx context.Context, request oapi.PatchChromiumPoliciesRequestObject) (oapi.PatchChromiumPoliciesResponseObject, error)
PatchChromiumPolicies applies user-provided Chromium enterprise policy overrides to policy.json, restarts Chromium, and waits for DevTools to be ready.
func (*ApiService) PatchDisplay ¶
func (s *ApiService) PatchDisplay(ctx context.Context, req oapi.PatchDisplayRequestObject) (oapi.PatchDisplayResponseObject, error)
PatchDisplay updates the display configuration. When require_idle is true (default), it refuses to resize while live view or recording/replay is active. This method automatically detects whether the system is running with Xorg (headful) or Xvfb (headless) and uses the appropriate method to change resolution.
func (*ApiService) PatchTelemetry ¶
func (s *ApiService) PatchTelemetry(_ context.Context, req oapi.PatchTelemetryRequestObject) (oapi.PatchTelemetryResponseObject, error)
PatchTelemetry handles PATCH /telemetry. Partially updates the telemetry configuration. Returns 404 if not configured. Setting all five categories to enabled:false clears the configuration (200).
func (*ApiService) PressKey ¶
func (s *ApiService) PressKey(ctx context.Context, request oapi.PressKeyRequestObject) (oapi.PressKeyResponseObject, error)
func (*ApiService) ProcessExec ¶
func (s *ApiService) ProcessExec(ctx context.Context, request oapi.ProcessExecRequestObject) (oapi.ProcessExecResponseObject, error)
Execute a command synchronously (POST /process/exec)
func (*ApiService) ProcessKill ¶
func (s *ApiService) ProcessKill(ctx context.Context, request oapi.ProcessKillRequestObject) (oapi.ProcessKillResponseObject, error)
Send signal to process (POST /process/{process_id}/kill)
func (*ApiService) ProcessResize ¶
func (s *ApiService) ProcessResize(ctx context.Context, request oapi.ProcessResizeRequestObject) (oapi.ProcessResizeResponseObject, error)
Resize PTY-backed process (POST /process/{process_id}/resize)
func (*ApiService) ProcessSpawn ¶
func (s *ApiService) ProcessSpawn(ctx context.Context, request oapi.ProcessSpawnRequestObject) (oapi.ProcessSpawnResponseObject, error)
Execute a command asynchronously (POST /process/spawn)
func (*ApiService) ProcessStatus ¶
func (s *ApiService) ProcessStatus(ctx context.Context, request oapi.ProcessStatusRequestObject) (oapi.ProcessStatusResponseObject, error)
Get process status (GET /process/{process_id}/status)
func (*ApiService) ProcessStdin ¶
func (s *ApiService) ProcessStdin(ctx context.Context, request oapi.ProcessStdinRequestObject) (oapi.ProcessStdinResponseObject, error)
Write to process stdin (POST /process/{process_id}/stdin)
func (*ApiService) ProcessStdoutStream ¶
func (s *ApiService) ProcessStdoutStream(ctx context.Context, request oapi.ProcessStdoutStreamRequestObject) (oapi.ProcessStdoutStreamResponseObject, error)
Stream process stdout/stderr (SSE) (GET /process/{process_id}/stdout/stream)
func (*ApiService) PublishTelemetryEvent ¶
func (s *ApiService) PublishTelemetryEvent(_ context.Context, req oapi.PublishTelemetryEventRequestObject) (oapi.PublishTelemetryEventResponseObject, error)
PublishTelemetryEvent handles POST /telemetry/events. Routes a caller-supplied event through the active telemetry session so it picks up category filtering and the telemetry_session_id metadata stamp. Returns 200 with the assigned envelope when the event is admitted, 204 when filtered (no active session or the category is disabled), or 400 on validation failure.
func (*ApiService) PutTelemetry ¶
func (s *ApiService) PutTelemetry(ctx context.Context, req oapi.PutTelemetryRequestObject) (oapi.PutTelemetryResponseObject, error)
PutTelemetry handles PUT /telemetry. Sets the telemetry configuration. Returns 201 if not previously configured, 200 if it was. Setting all five categories to enabled:false clears the configuration (200).
func (*ApiService) ReadClipboard ¶
func (s *ApiService) ReadClipboard(ctx context.Context, request oapi.ReadClipboardRequestObject) (oapi.ReadClipboardResponseObject, error)
func (*ApiService) ReadFile ¶
func (s *ApiService) ReadFile(ctx context.Context, req oapi.ReadFileRequestObject) (oapi.ReadFileResponseObject, error)
ReadFile returns the contents of a file specified by the path param.
func (*ApiService) Scroll ¶
func (s *ApiService) Scroll(ctx context.Context, request oapi.ScrollRequestObject) (oapi.ScrollResponseObject, error)
func (*ApiService) SetCursor ¶
func (s *ApiService) SetCursor(ctx context.Context, request oapi.SetCursorRequestObject) (oapi.SetCursorResponseObject, error)
func (*ApiService) SetFilePermissions ¶
func (s *ApiService) SetFilePermissions(ctx context.Context, req oapi.SetFilePermissionsRequestObject) (oapi.SetFilePermissionsResponseObject, error)
SetFilePermissions changes mode (and optionally owner/group) of a path.
func (*ApiService) StartFsWatch ¶
func (s *ApiService) StartFsWatch(ctx context.Context, req oapi.StartFsWatchRequestObject) (oapi.StartFsWatchResponseObject, error)
StartFsWatch is not implemented in this basic filesystem handler. It returns a 400 error to the client.
func (*ApiService) StartRecording ¶
func (s *ApiService) StartRecording(ctx context.Context, req oapi.StartRecordingRequestObject) (oapi.StartRecordingResponseObject, error)
func (*ApiService) StopFsWatch ¶
func (s *ApiService) StopFsWatch(ctx context.Context, req oapi.StopFsWatchRequestObject) (oapi.StopFsWatchResponseObject, error)
func (*ApiService) StopRecording ¶
func (s *ApiService) StopRecording(ctx context.Context, req oapi.StopRecordingRequestObject) (oapi.StopRecordingResponseObject, error)
func (*ApiService) StreamFsEvents ¶
func (s *ApiService) StreamFsEvents(ctx context.Context, req oapi.StreamFsEventsRequestObject) (oapi.StreamFsEventsResponseObject, error)
func (*ApiService) StreamTelemetryEvents ¶
func (s *ApiService) StreamTelemetryEvents(ctx context.Context, req oapi.StreamTelemetryEventsRequestObject) (oapi.StreamTelemetryEventsResponseObject, error)
StreamTelemetryEvents handles GET /telemetry/stream. Opens an SSE stream of telemetry event envelopes from the telemetry stream ring buffer. Supports reconnection via the Last-Event-ID header. Emits a keepalive comment frame every 15 s when no event arrives.
func (*ApiService) TakeScreenshot ¶
func (s *ApiService) TakeScreenshot(ctx context.Context, request oapi.TakeScreenshotRequestObject) (oapi.TakeScreenshotResponseObject, error)
func (*ApiService) TypeText ¶
func (s *ApiService) TypeText(ctx context.Context, request oapi.TypeTextRequestObject) (oapi.TypeTextResponseObject, error)
func (*ApiService) UploadExtensionsAndRestart ¶
func (s *ApiService) UploadExtensionsAndRestart(ctx context.Context, request oapi.UploadExtensionsAndRestartRequestObject) (oapi.UploadExtensionsAndRestartResponseObject, error)
UploadExtensionsAndRestart handles multipart upload of one or more extension zips, extracts them under /home/kernel/extensions/<name>, writes /chromium/flags to enable them, restarts Chromium via supervisord, and waits (via UpstreamManager) until DevTools is ready.
func (*ApiService) UploadFiles ¶
func (s *ApiService) UploadFiles(ctx context.Context, request oapi.UploadFilesRequestObject) (oapi.UploadFilesResponseObject, error)
UploadFiles handles multipart form uploads for one or more files. It supports the following field name encodings:
- files[<index>].file and files[<index>].dest_path
- files[<index>][file] and files[<index>][dest_path]
- files.<index>.file and files.<index>.dest_path
Additionally, for single-file uploads it accepts:
- file and dest_path
func (*ApiService) UploadZip ¶
func (s *ApiService) UploadZip(ctx context.Context, request oapi.UploadZipRequestObject) (oapi.UploadZipResponseObject, error)
UploadZip handles a multipart upload of a zip archive and extracts it to dest_path.
func (*ApiService) UploadZstd ¶
func (s *ApiService) UploadZstd(ctx context.Context, request oapi.UploadZstdRequestObject) (oapi.UploadZstdResponseObject, error)
func (*ApiService) WriteClipboard ¶
func (s *ApiService) WriteClipboard(ctx context.Context, request oapi.WriteClipboardRequestObject) (oapi.WriteClipboardResponseObject, error)
func (*ApiService) WriteFile ¶
func (s *ApiService) WriteFile(ctx context.Context, req oapi.WriteFileRequestObject) (oapi.WriteFileResponseObject, error)
WriteFile creates or overwrites a file with the supplied data stream.
type XdoTool ¶
type XdoTool struct {
// contains filtered or unexported fields
}
XdoTool is a thin wrapper around the xdotool CLI utility. It ensures the DISPLAY environment variable is set correctly when invoking xdotool.
Usage:
output, err := defaultXdoTool.Run(ctx, "mousemove", "100", "100")
If you need a different display, construct your own instance using NewXdoTool(display).
func NewXdoTool ¶
NewXdoTool returns a new XdoTool configured to target the given X11 display. The display string should be in the form ":<num>", e.g. ":0" or ":1".