jsext

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFileReader added in v1.39.0

func AddFileReader(vm *goja.Runtime) error

func AddPrinter

func AddPrinter(vm *goja.Runtime, logger *clog.CondLogger) error

func ConfigureRuntime added in v1.40.0

func ConfigureRuntime(vm *goja.Runtime) error

func ExportEnv added in v1.40.0

func ExportEnv(vm *goja.Runtime) error

func GetEnvSharedDynamicObject added in v1.40.0

func GetEnvSharedDynamicObject() *goja.Object

Types

type JSDstInfo

type JSDstInfo struct {
	Network      string  `json:"network"`
	OriginalHost string  `json:"originalHost"`
	ResolvedHost *string `json:"resolvedHost"`
	Port         uint16  `json:"port"`
}

func JSDstInfoFromContext

func JSDstInfoFromContext(ctx context.Context, network, address string) (*JSDstInfo, error)

type JSRequestInfo

type JSRequestInfo struct {
	Method           string      `json:"method"`
	URL              string      `json:"url"`
	Proto            string      `json:"proto"`
	ProtoMajor       int         `json:"protoMajor"`
	ProtoMinor       int         `json:"protoMinor"`
	Header           http.Header `json:"header"`
	ContentLength    int64       `json:"contentLength"`
	TransferEncoding []string    `json:"transferEncoding"`
	Host             string      `json:"host"`
	RemoteAddr       string      `json:"remoteAddr"`
	RequestURI       string      `json:"requestURI"`
}

func JSRequestInfoFromRequest

func JSRequestInfoFromRequest(req *http.Request) *JSRequestInfo

Jump to

Keyboard shortcuts

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