extism-manifest-0.0.1: Extism manifest bindings
Safe HaskellSafe-Inferred
LanguageHaskell2010

Extism.Manifest

Synopsis

Documentation

newtype Memory Source #

Memory options

Constructors

Memory 

Instances

Instances details
JSON Memory Source # 
Instance details

Defined in Extism.Manifest

Methods

readJSON :: JSValue -> Result Memory

showJSON :: Memory -> JSValue

readJSONs :: JSValue -> Result [Memory]

showJSONs :: [Memory] -> JSValue

data HTTPRequest Source #

HTTP request

Constructors

HTTPRequest 

Instances

Instances details
JSON HTTPRequest Source # 
Instance details

Defined in Extism.Manifest

Methods

readJSON :: JSValue -> Result HTTPRequest

showJSON :: HTTPRequest -> JSValue

readJSONs :: JSValue -> Result [HTTPRequest]

showJSONs :: [HTTPRequest] -> JSValue

makeKV :: JSON a => [(String, a)] -> JSValue Source #

requestObj :: HTTPRequest -> [(String, JSValue)] Source #

data WasmFile Source #

WASM from file

Instances

Instances details
JSON WasmFile Source # 
Instance details

Defined in Extism.Manifest

Methods

readJSON :: JSValue -> Result WasmFile

showJSON :: WasmFile -> JSValue

readJSONs :: JSValue -> Result [WasmFile]

showJSONs :: [WasmFile] -> JSValue

data WasmData Source #

WASM from raw bytes

Instances

Instances details
JSON WasmData Source # 
Instance details

Defined in Extism.Manifest

Methods

readJSON :: JSValue -> Result WasmData

showJSON :: WasmData -> JSValue

readJSONs :: JSValue -> Result [WasmData]

showJSONs :: [WasmData] -> JSValue

data WasmURL Source #

WASM from a URL

Instances

Instances details
JSON WasmURL Source # 
Instance details

Defined in Extism.Manifest

Methods

readJSON :: JSValue -> Result WasmURL

showJSON :: WasmURL -> JSValue

readJSONs :: JSValue -> Result [WasmURL]

showJSONs :: [WasmURL] -> JSValue

data Wasm Source #

Specifies where to get WASM module data

Instances

Instances details
JSON Wasm Source # 
Instance details

Defined in Extism.Manifest

Methods

readJSON :: JSValue -> Result Wasm

showJSON :: Wasm -> JSValue

readJSONs :: JSValue -> Result [Wasm]

showJSONs :: [Wasm] -> JSValue

data Manifest Source #

The Manifest type is used to provide WASM data and configuration to the | Extism runtime

Instances

Instances details
JSON Manifest Source # 
Instance details

Defined in Extism.Manifest

Methods

readJSON :: JSValue -> Result Manifest

showJSON :: Manifest -> JSValue

readJSONs :: JSValue -> Result [Manifest]

showJSONs :: [Manifest] -> JSValue

manifest :: [Wasm] -> Manifest Source #

Create a new Manifest from a list of Wasm

withConfig :: Manifest -> [(String, String)] -> Manifest Source #

Update the config values

withHosts :: Manifest -> [String] -> Manifest Source #

Update allowed hosts for extism_http_request

withPaths :: Manifest -> [(String, String)] -> Manifest Source #

Update allowed paths

withTimeout :: Manifest -> Int -> Manifest Source #

Update plugin timeout (in milliseconds)

toString :: JSON a => a -> String Source #