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
-
ClassDescriptionThe Workers AI binding.An AI Search binding.An Analytics Engine dataset.A data point under construction.A Containers binding.A D1 database.What
D1Database.exec(String)answers.What a statement cost.What a statement produced.A prepared statement.A Workers for Platforms dispatch namespace.A Durable Object binding.An instance's identity.A handle on one instance.An email sending binding.Anything reachable by sending it a request.A Hyperdrive configuration.The Images binding.A transformation under construction.A Workers KV namespace.A value and the metadata stored with it.One key in a listing.One page of a key listing.A Pipelines binding.A Queue producer.An R2 bucket.An object's metadata.An object's metadata together with its body.One page of an object listing.A rate limiting binding.Whether a key was within its allowance.One secret from a Secrets Store.A Vectorize index.Which version of the Worker is running.A Workflows binding.One workflow instance.