Module: Cloudflare::BindingHelpers
- Defined in:
- lib/homura/runtime.rb
Instance Method Summary collapse
- #ai ⇒ Object
- #bucket ⇒ Object
- #cache ⇒ Object
- #cf_ctx ⇒ Object
- #cf_env ⇒ Object
- #d1 ⇒ Object
- #db ⇒ Object
- #do_counter ⇒ Object
- #durable_object(name, id_or_name = nil) ⇒ Object
- #jobs_dlq ⇒ Object
- #jobs_queue ⇒ Object
- #kv ⇒ Object
- #send_email ⇒ Object
Instance Method Details
#ai ⇒ Object
1229 1230 1231 |
# File 'lib/homura/runtime.rb', line 1229 def ai Cloudflare::Bindings.ai(env) end |
#bucket ⇒ Object
1225 1226 1227 |
# File 'lib/homura/runtime.rb', line 1225 def bucket env["cloudflare.BUCKET"] end |
#cache ⇒ Object
1249 1250 1251 |
# File 'lib/homura/runtime.rb', line 1249 def cache @__homura_cache ||= Cloudflare::Cache.default end |
#cf_ctx ⇒ Object
1209 1210 1211 |
# File 'lib/homura/runtime.rb', line 1209 def cf_ctx env["cloudflare.ctx"] end |
#cf_env ⇒ Object
1205 1206 1207 |
# File 'lib/homura/runtime.rb', line 1205 def cf_env env["cloudflare.env"] end |
#d1 ⇒ Object
1213 1214 1215 |
# File 'lib/homura/runtime.rb', line 1213 def d1 env["cloudflare.DB"] end |
#db ⇒ Object
1217 1218 1219 |
# File 'lib/homura/runtime.rb', line 1217 def db d1 end |
#do_counter ⇒ Object
1245 1246 1247 |
# File 'lib/homura/runtime.rb', line 1245 def do_counter env["cloudflare.DO_COUNTER"] end |
#durable_object(name, id_or_name = nil) ⇒ Object
1253 1254 1255 |
# File 'lib/homura/runtime.rb', line 1253 def durable_object(name, id_or_name = nil) Cloudflare::Bindings.durable_object(env, name, id_or_name) end |
#jobs_dlq ⇒ Object
1241 1242 1243 |
# File 'lib/homura/runtime.rb', line 1241 def jobs_dlq env["cloudflare.QUEUE_JOBS_DLQ"] end |
#jobs_queue ⇒ Object
1237 1238 1239 |
# File 'lib/homura/runtime.rb', line 1237 def jobs_queue env["cloudflare.QUEUE_JOBS"] end |
#kv ⇒ Object
1221 1222 1223 |
# File 'lib/homura/runtime.rb', line 1221 def kv env["cloudflare.KV"] end |
#send_email ⇒ Object
1233 1234 1235 |
# File 'lib/homura/runtime.rb', line 1233 def send_email env["cloudflare.SEND_EMAIL"] end |