{"modulePath":"github.com/wavetermdev/waveterm/wavesrv","version":"v0.7.6","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package userinput\n\nProvides a mechanism for the backend to request user input from the frontend.\n\n## Constants\n\n```go\nconst UserInputRequestStr = \"userinputrequest\"\n```\n\n```go\nconst UserInputResponsePacketStr = \"userinputresp\"\n```\n\n## Types\n\n```go\ntype UserInputRequestType struct {\n\tRequestId    string `json:\"requestid\"`\n\tQueryText    string `json:\"querytext\"`\n\tResponseType string `json:\"responsetype\"`\n\tTitle        string `json:\"title\"`\n\tMarkdown     bool   `json:\"markdown\"`\n\tTimeoutMs    int    `json:\"timeoutms\"`\n\tCheckBoxMsg  string `json:\"checkboxmsg\"`\n\tPublicText   bool   `json:\"publictext\"`\n}\n```\nAn RpcPacket for requesting user input from the client\n\n```go\nfunc (*UserInputRequestType) GetType() string\n```\n\n```go\nfunc (req *UserInputRequestType) SetReqId(reqId string)\n```\n\n```go\nfunc (req *UserInputRequestType) SetTimeoutMs(timeoutMs int)\n```\n\n```go\ntype UserInputResponsePacketType struct {\n\tType         string `json:\"type\"`\n\tRequestId    string `json:\"requestid\"`\n\tText         string `json:\"text,omitempty\"`\n\tConfirm      bool   `json:\"confirm,omitempty\"`\n\tErrorMsg     string `json:\"errormsg,omitempty\"`\n\tCheckboxStat bool   `json:\"checkboxstat,omitempty\"`\n}\n```\nAn RpcResponse for user input requests\n\n```go\nfunc GetUserInput(ctx context.Context, bus *scbus.RpcBus, userInputRequest *UserInputRequestType) (*UserInputResponsePacketType, error)\n```\nSend a user input request to the frontend and wait for a response\n\n```go\nfunc (pk *UserInputResponsePacketType) GetError() string\n```\n\n```go\nfunc (*UserInputResponsePacketType) GetType() string\n```\n\n```go\nfunc (pk *UserInputResponsePacketType) SetError(err string)\n```\n\n","path":"github.com/wavetermdev/waveterm/wavesrv/pkg/userinput","name":"userinput","synopsis":"Provides a mechanism for the backend to request user input from the frontend.","isRedistributable":true}
