Package dev.gmitch215.bytebox.binding


package dev.gmitch215.bytebox.binding
The Cloudflare bindings, reached through Env.

Each binding is an interface over the JavaScript object Cloudflare provides, with its blocking methods written as default methods over the promise-returning ones. So env.kv().get("key") returns a value, and the promise underneath is not something a caller has to see.

Names are assigned by the Gradle plugin and default to a type-derived value: KV for the first KV namespace, DB for the first D1 database, BLOB for the first R2 bucket, and a numeric suffix for each repeat. Every accessor on Env takes the default, and the name-taking overload is for the repeats.

Anything here performs I/O, which Cloudflare Workers forbid outside a request context. Reading a binding during module evaluation fails however it is spelled.

Since:
1.0.0