viipertypes

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	// Status is the HTTP-style status code (e.g., 400, 404, 500)
	Status int `json:"status"`
	// Title is a short, human-readable summary of the problem type
	Title string `json:"title"`
	// Detail is a human-readable explanation specific to this occurrence
	Detail string `json:"detail"`
}

APIError represents an RFC 7807 (problem+json) error response.

func (APIError) Error

func (e APIError) Error() string

type BusCreateResponse

type BusCreateResponse struct {
	BusID uint32 `json:"busId"`
}

type BusListResponse

type BusListResponse struct {
	Buses []uint32 `json:"buses"`
}

type BusRemoveResponse

type BusRemoveResponse struct {
	BusID uint32 `json:"busId"`
}

type Device

type Device struct {
	BusID          uint32         `json:"busId"`
	DevID          string         `json:"devId"`
	Vid            string         `json:"vid"`
	Pid            string         `json:"pid"`
	Type           string         `json:"type"`
	DeviceSpecific map[string]any `json:"deviceSpecific"`
}

type DeviceCreateRequest

type DeviceCreateRequest struct {
	Type           *string        `json:"type"`
	IDVendor       *uint16        `json:"idVendor,omitempty"`
	IDProduct      *uint16        `json:"idProduct,omitempty"`
	DeviceSpecific map[string]any `json:"deviceSpecific,omitempty"`
}

func (*DeviceCreateRequest) UnmarshalJSON

func (d *DeviceCreateRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements custom unmarshaling to accept both uint16 and hex string formats for idVendor and idProduct (e.g., "0x12ac" or 4780).

type DeviceRemoveResponse

type DeviceRemoveResponse struct {
	BusID uint32 `json:"busId"`
	DevID string `json:"devId"`
}

type DevicesListResponse

type DevicesListResponse struct {
	Devices []Device `json:"devices"`
}

type PingResponse

type PingResponse struct {
	Server  string `json:"server"`
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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