babashka

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteDescribeResponse

func WriteDescribeResponse(describeResponse *DescribeResponse)

func WriteErrorResponse

func WriteErrorResponse(inputMessage *Message, err error)

func WriteInvokeResponse

func WriteInvokeResponse(inputMessage *Message, value string) error

Types

type DescribeResponse

type DescribeResponse struct {
	Format     string      "format"
	Namespaces []Namespace "namespaces"
}

type ErrorResponse

type ErrorResponse struct {
	Id        string   "id"
	Status    []string "status"
	ExMessage string   "ex-message"
	ExData    string   "ex-data,omitempty"
}

type InvokeResponse

type InvokeResponse struct {
	Id     string   "id"
	Value  string   "value" // stringified json response
	Status []string "status"
}

type Message

type Message struct {
	Op   string
	Id   string
	Args string
	Var  string
}

func ReadMessage

func ReadMessage() (*Message, error)

type Namespace

type Namespace struct {
	Name string "name"
	Vars []Var  "vars"
}

type Var

type Var struct {
	Name string "name"
	Code string `bencode:"code,omitempty"`
}

Jump to

Keyboard shortcuts

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