(ctx context.Context, data wshrpc.CommandBlockInputData)
| 318 | } |
| 319 | |
| 320 | func (ws *WshServer) ControllerInputCommand(ctx context.Context, data wshrpc.CommandBlockInputData) error { |
| 321 | inputUnion := &blockcontroller.BlockInputUnion{ |
| 322 | SigName: data.SigName, |
| 323 | TermSize: data.TermSize, |
| 324 | } |
| 325 | if len(data.InputData64) > 0 { |
| 326 | inputBuf := make([]byte, base64.StdEncoding.DecodedLen(len(data.InputData64))) |
| 327 | nw, err := base64.StdEncoding.Decode(inputBuf, []byte(data.InputData64)) |
| 328 | if err != nil { |
| 329 | return fmt.Errorf("error decoding input data: %w", err) |
| 330 | } |
| 331 | inputUnion.InputData = inputBuf[:nw] |
| 332 | } |
| 333 | return blockcontroller.SendInput(data.BlockId, inputUnion) |
| 334 | } |
| 335 | |
| 336 | func (ws *WshServer) ControllerAppendOutputCommand(ctx context.Context, data wshrpc.CommandControllerAppendOutputData) error { |
| 337 | outputBuf := make([]byte, base64.StdEncoding.DecodedLen(len(data.Data64))) |
nothing calls this directly
no test coverage detected