appplay

package
v0.8.0-test1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdPlay = &cli.Command{
	Name:  "play",
	Usage: "start Wa playground",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "http",
			Value: ":2023",
			Usage: "set http address",
		},
	},
	Action: func(c *cli.Context) error {
		err := RunPlayground(c.String("http"))
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
		return nil
	},
}

Functions

func RunPlayground

func RunPlayground(addr string) error

Types

type Event

type Event struct {
	Message string
	Kind    string        // "stdout" or "stderr"
	Delay   time.Duration // time to wait before printing Message
}

type Request

type Request struct {
	Body string
}

type Response

type Response struct {
	Errors string
	Events []Event
}

type Snippet

type Snippet struct {
	Body []byte
}

type WebServer

type WebServer struct {
	// contains filtered or unexported fields
}

func NewWebServer

func NewWebServer() *WebServer

func (*WebServer) Run

func (p *WebServer) Run(addr string) error

Jump to

Keyboard shortcuts

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