package
0.0.0-20210110105337-674084c9f8ae
Repository: https://github.com/jkcfg/jk.git
Documentation: pkg.go.dev
# Functions
MakeDirectoryListing returns a response to a Dir request, encoded ready to send to the V8 worker.
MakeFileInfo returns a response to a FileInfo request, encoded ready to send to the V8 worker.
Module returns the std source corresponding to the 'std' import.
NewModuleResources initialises a new ModuleResources.
NewParams creates an empty set of parameters.
NewParamsFromFile creates Params from a JSON or YAML file.
NewParamsFromJSON creates Params from a JSON object.
NewParamsFromYAML creates Params from a YAML object.
NewStd creates a new instance of the standard library.
Parse accepts a stringified object, and the format in which it was stringified, and returns a JSON stringified object.
Unparse accepts a JSON stringified object, and a format for reserialising it, and returns the reserialised object.
# Constants
NativeEndian is the platform-specific endianness.
# Structs
Directory is the result from an std.dir RPC.
FileInfo is the result from a std.fileinfo RPC (and used to represent each file, within Directory).
ModuleAccess represents access to a module's resources.
ModuleResources keeps track of the base paths for modules, as well as generating the magic modules when they are imported.
Options are global configuration options to tweak the behavior of the standard library.
Sandbox mediates access to the filesystem by resolving relative paths to the host filesystem and resources (module-relative paths).
Std represents the standard library.
# Interfaces
ModuleAccesser is an interface for getting the module back from a token.