cli_client

package
v0.0.0-...-b320325 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIMEOUT_SHORT  = time.Second * 5
	TIMEOUT_MEDIUM = time.Second * 10
	TIMEOUT_LONG   = time.Second * 30
)

Variables

View Source
var (
	StrRemoteHost string
	StrRemotePort string

	BoolJson bool
)

Functions

func ClientConnectServer

func ClientConnectServer(rpcHost string, rpcPort string) (
	connection *grpc.ClientConn,
	client pb.P4WNP1Client,
	ctx context.Context,
	cancel context.CancelFunc,
	err error)

func ClientCreateTempDir

func ClientCreateTempDir(host string, port string, dir string, prefix string) (resultPath string, err error)

func ClientCreateTempFile

func ClientCreateTempFile(host string, port string, dir string, prefix string) (resultPath string, err error)

func ClientDBBackup

func ClientDBBackup(timeout time.Duration, host string, port string, name string) (err error)

func ClientDBList

func ClientDBList(timeout time.Duration, host string, port string) (names []string, err error)

func ClientDBRestore

func ClientDBRestore(timeout time.Duration, host string, port string, name string) (err error)

func ClientDeployEthernetInterfaceSettings

func ClientDeployEthernetInterfaceSettings(host string, port string, settings *pb.EthernetInterfaceSettings) (err error)

func ClientDeployGadgetSettings

func ClientDeployGadgetSettings(host string, port string, newGs *pb.GadgetSettings) (gs *pb.GadgetSettings, err error)

func ClientDeployTemplateType

func ClientDeployTemplateType(timeout time.Duration, host string, port string, ttype pb.ActionDeploySettingsTemplate_TemplateType, name string) (err error)

func ClientDeployWifiSettings

func ClientDeployWifiSettings(host string, port string, settings *pb.WiFiSettings) (state *pb.WiFiState, err error)

func ClientGetDeployedGadgetSettings

func ClientGetDeployedGadgetSettings(host string, port string) (gs *pb.GadgetSettings, err error)

func ClientGetLED

func ClientGetLED(host string, port string) (ls *pb.LEDSettings, err error)

func ClientHIDCancelScriptJob

func ClientHIDCancelScriptJob(host string, port string, jobID uint32) (err error)

func ClientHIDGetScriptJobResult

func ClientHIDGetScriptJobResult(host string, port string, jobID uint32) (scriptRes *pb.HIDScriptResult, err error)

func ClientHIDRunScript

func ClientHIDRunScript(host string, port string, ctx context.Context, scriptPath string, timeoutSeconds uint32) (scriptRes *pb.HIDScriptResult, err error)

func ClientHIDRunScriptJob

func ClientHIDRunScriptJob(host string, port string, scriptPath string, timeoutSeconds uint32) (scriptJob *pb.HIDScriptJob, err error)

func ClientListTemplateType

func ClientListTemplateType(timeout time.Duration, host string, port string, ttype pb.ActionDeploySettingsTemplate_TemplateType) (res []string, err error)

func ClientMountUMSImage

func ClientMountUMSImage(host string, port string, file string, cdrom bool) (err error)

func ClientReboot

func ClientReboot(host string, port string, timeout time.Duration) (err error)

func ClientRegisterEvent

func ClientRegisterEvent(host string, port string, evtType int64) (err error)

func ClientSetLED

func ClientSetLED(host string, port string, ls pb.LEDSettings) (err error)

func ClientShutdown

func ClientShutdown(host string, port string, timeout time.Duration) (err error)

func ClientTriggerGroupSend

func ClientTriggerGroupSend(host string, port string, groupname string, value int32) (err error)

func ClientTriggerGroupWait

func ClientTriggerGroupWait(host string, port string, groupname string, value int32) (err error)

func ClientUploadFile

func ClientUploadFile(host string, port string, src io.Reader, folder pb.AccessibleFolder, filename string, forceOverwrite bool) (err error)

func Execute

func Execute()

func GenBashComplete

func GenBashComplete()

func PrintGadgetSettings

func PrintGadgetSettings(gs *pb.GadgetSettings, useJson bool)

func TriggerCheckFlags

func TriggerCheckFlags(cmd *cobra.Command)

Types

This section is empty.

Jump to

Keyboard shortcuts

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