EasyVQD/internal/core/host/device.go
2026-01-15 19:32:33 +08:00

25 lines
443 B
Go

package host
import (
"context"
"encoding/json"
)
func (c Core) FindDevices(ctx context.Context, in *FindDevicesInput) (*FindDeviceOutput, error) {
marshal, err := json.Marshal(in)
if err != nil {
return nil, err
}
result, err := c.Plugin.CallHost("findDevices", marshal)
if err != nil {
return nil, err
}
out := FindDeviceOutput{}
if err = json.Unmarshal(result, &out); err != nil {
return nil, err
}
return &out, nil
}