mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
173 lines
7.2 KiB
Go
173 lines
7.2 KiB
Go
// Copyright 2024, Command Line Inc.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// generated by cmd/generatewshclient/main-generatewshclient.go
|
|
|
|
package wshclient
|
|
|
|
import (
|
|
"github.com/wavetermdev/thenextwave/pkg/wshutil"
|
|
"github.com/wavetermdev/thenextwave/pkg/wshrpc"
|
|
"github.com/wavetermdev/thenextwave/pkg/waveobj"
|
|
)
|
|
|
|
// command "announce", wshserver.AnnounceCommand
|
|
func AnnounceCommand(w *wshutil.WshRpc, data string, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "announce", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "authenticate", wshserver.AuthenticateCommand
|
|
func AuthenticateCommand(w *wshutil.WshRpc, data string, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "authenticate", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "controllerinput", wshserver.ControllerInputCommand
|
|
func ControllerInputCommand(w *wshutil.WshRpc, data wshrpc.CommandBlockInputData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "controllerinput", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "controllerrestart", wshserver.ControllerRestartCommand
|
|
func ControllerRestartCommand(w *wshutil.WshRpc, data wshrpc.CommandBlockRestartData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "controllerrestart", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "createblock", wshserver.CreateBlockCommand
|
|
func CreateBlockCommand(w *wshutil.WshRpc, data wshrpc.CommandCreateBlockData, opts *wshrpc.RpcOpts) (waveobj.ORef, error) {
|
|
resp, err := sendRpcRequestCallHelper[waveobj.ORef](w, "createblock", data, opts)
|
|
return resp, err
|
|
}
|
|
|
|
// command "deleteblock", wshserver.DeleteBlockCommand
|
|
func DeleteBlockCommand(w *wshutil.WshRpc, data wshrpc.CommandDeleteBlockData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "deleteblock", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "eventpublish", wshserver.EventPublishCommand
|
|
func EventPublishCommand(w *wshutil.WshRpc, data wshrpc.WaveEvent, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "eventpublish", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "eventrecv", wshserver.EventRecvCommand
|
|
func EventRecvCommand(w *wshutil.WshRpc, data wshrpc.WaveEvent, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "eventrecv", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "eventsub", wshserver.EventSubCommand
|
|
func EventSubCommand(w *wshutil.WshRpc, data wshrpc.SubscriptionRequest, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "eventsub", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "eventunsub", wshserver.EventUnsubCommand
|
|
func EventUnsubCommand(w *wshutil.WshRpc, data wshrpc.SubscriptionRequest, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "eventunsub", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "eventunsuball", wshserver.EventUnsubAllCommand
|
|
func EventUnsubAllCommand(w *wshutil.WshRpc, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "eventunsuball", nil, opts)
|
|
return err
|
|
}
|
|
|
|
// command "fileappend", wshserver.FileAppendCommand
|
|
func FileAppendCommand(w *wshutil.WshRpc, data wshrpc.CommandFileData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "fileappend", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "fileappendijson", wshserver.FileAppendIJsonCommand
|
|
func FileAppendIJsonCommand(w *wshutil.WshRpc, data wshrpc.CommandAppendIJsonData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "fileappendijson", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "fileread", wshserver.FileReadCommand
|
|
func FileReadCommand(w *wshutil.WshRpc, data wshrpc.CommandFileData, opts *wshrpc.RpcOpts) (string, error) {
|
|
resp, err := sendRpcRequestCallHelper[string](w, "fileread", data, opts)
|
|
return resp, err
|
|
}
|
|
|
|
// command "filewrite", wshserver.FileWriteCommand
|
|
func FileWriteCommand(w *wshutil.WshRpc, data wshrpc.CommandFileData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "filewrite", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "getmeta", wshserver.GetMetaCommand
|
|
func GetMetaCommand(w *wshutil.WshRpc, data wshrpc.CommandGetMetaData, opts *wshrpc.RpcOpts) (waveobj.MetaMapType, error) {
|
|
resp, err := sendRpcRequestCallHelper[waveobj.MetaMapType](w, "getmeta", data, opts)
|
|
return resp, err
|
|
}
|
|
|
|
// command "message", wshserver.MessageCommand
|
|
func MessageCommand(w *wshutil.WshRpc, data wshrpc.CommandMessageData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "message", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "remotefileinfo", wshserver.RemoteFileInfoCommand
|
|
func RemoteFileInfoCommand(w *wshutil.WshRpc, data string, opts *wshrpc.RpcOpts) (*wshrpc.FileInfo, error) {
|
|
resp, err := sendRpcRequestCallHelper[*wshrpc.FileInfo](w, "remotefileinfo", data, opts)
|
|
return resp, err
|
|
}
|
|
|
|
// command "remotestreamfile", wshserver.RemoteStreamFileCommand
|
|
func RemoteStreamFileCommand(w *wshutil.WshRpc, data wshrpc.CommandRemoteStreamFileData, opts *wshrpc.RpcOpts) chan wshrpc.RespOrErrorUnion[wshrpc.CommandRemoteStreamFileRtnData] {
|
|
return sendRpcRequestResponseStreamHelper[wshrpc.CommandRemoteStreamFileRtnData](w, "remotestreamfile", data, opts)
|
|
}
|
|
|
|
// command "remotewritefile", wshserver.RemoteWriteFileCommand
|
|
func RemoteWriteFileCommand(w *wshutil.WshRpc, data wshrpc.CommandRemoteWriteFileData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "remotewritefile", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "resolveids", wshserver.ResolveIdsCommand
|
|
func ResolveIdsCommand(w *wshutil.WshRpc, data wshrpc.CommandResolveIdsData, opts *wshrpc.RpcOpts) (wshrpc.CommandResolveIdsRtnData, error) {
|
|
resp, err := sendRpcRequestCallHelper[wshrpc.CommandResolveIdsRtnData](w, "resolveids", data, opts)
|
|
return resp, err
|
|
}
|
|
|
|
// command "setmeta", wshserver.SetMetaCommand
|
|
func SetMetaCommand(w *wshutil.WshRpc, data wshrpc.CommandSetMetaData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "setmeta", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "setview", wshserver.SetViewCommand
|
|
func SetViewCommand(w *wshutil.WshRpc, data wshrpc.CommandBlockSetViewData, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "setview", data, opts)
|
|
return err
|
|
}
|
|
|
|
// command "streamcpudata", wshserver.StreamCpuDataCommand
|
|
func StreamCpuDataCommand(w *wshutil.WshRpc, data wshrpc.CpuDataRequest, opts *wshrpc.RpcOpts) chan wshrpc.RespOrErrorUnion[wshrpc.CpuDataType] {
|
|
return sendRpcRequestResponseStreamHelper[wshrpc.CpuDataType](w, "streamcpudata", data, opts)
|
|
}
|
|
|
|
// command "streamtest", wshserver.StreamTestCommand
|
|
func StreamTestCommand(w *wshutil.WshRpc, opts *wshrpc.RpcOpts) chan wshrpc.RespOrErrorUnion[int] {
|
|
return sendRpcRequestResponseStreamHelper[int](w, "streamtest", nil, opts)
|
|
}
|
|
|
|
// command "streamwaveai", wshserver.StreamWaveAiCommand
|
|
func StreamWaveAiCommand(w *wshutil.WshRpc, data wshrpc.OpenAiStreamRequest, opts *wshrpc.RpcOpts) chan wshrpc.RespOrErrorUnion[wshrpc.OpenAIPacketType] {
|
|
return sendRpcRequestResponseStreamHelper[wshrpc.OpenAIPacketType](w, "streamwaveai", data, opts)
|
|
}
|
|
|
|
// command "test", wshserver.TestCommand
|
|
func TestCommand(w *wshutil.WshRpc, data string, opts *wshrpc.RpcOpts) error {
|
|
_, err := sendRpcRequestCallHelper[any](w, "test", data, opts)
|
|
return err
|
|
}
|
|
|
|
|