homescript

package
v0.8.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Silent bool

Functions

func Run

func Run(scriptCode string, serverUrl string, cookies []*http.Cookie) int

func RunFile

func RunFile(filename string, serverUrl string, cookies []*http.Cookie)

func StartSpinner

func StartSpinner(text string, ch *chan bool)

Types

type ANSICode

type ANSICode string
var (
	ANSIRedFg   ANSICode = "\x1b[31m"
	ANSIClearFg ANSICode = "\x1b[0m"
)

type HomescriptError

type HomescriptError struct {
	ErrorType string   `json:"errorType"`
	Location  Location `json:"location"`
	Message   string   `json:"message"`
}

type HomescriptResponse

type HomescriptResponse struct {
	Success  bool              `json:"success"`
	Exitcode int               `json:"exitCode"`
	Message  string            `json:"message"`
	Output   string            `json:"output"`
	Errors   []HomescriptError `json:"error"`
}

type Location

type Location struct {
	Filename string `json:"filename"`
	Line     uint   `json:"line"`
	Column   uint   `json:"column"`
	Index    uint   `json:"index"`
}

type RunRequest

type RunRequest struct {
	Code string `json:"code"`
}

Jump to

Keyboard shortcuts

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