cfruntimecontext

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrValueNotFound = errors.New("execution context value for specified key not found")

Functions

func GetRuntimeContextValue

func GetRuntimeContextValue(ctx context.Context, key string) (js.Value, error)

GetRuntimeContextValue gets value for specified key from RuntimeContext. - if the value is undefined, return error.

func MustGetRuntimeContextEnv

func MustGetRuntimeContextEnv(ctx context.Context) js.Value

MustGetRuntimeContextEnv gets object which holds environment variables bound to Cloudflare worker. - see: https://github.com/cloudflare/workers-types/blob/c8d9533caa4415c2156d2cf1daca75289d01ae70/index.d.ts#L566

func MustGetRuntimeContextValue

func MustGetRuntimeContextValue(ctx context.Context, key string) js.Value

MustGetRuntimeContextValue gets value for specified key from RuntimeContext. - if the value is undefined, this function panics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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