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
1198 1199 1200 |
# File 'lib/homura/runtime.rb', line 1198 def ai Cloudflare::Bindings.ai(env) end |
#bucket ⇒ Object
1195 1196 1197 |
# File 'lib/homura/runtime.rb', line 1195 def bucket env["cloudflare.BUCKET"] end |
#cache ⇒ Object
1213 1214 1215 |
# File 'lib/homura/runtime.rb', line 1213 def cache @__homura_cache ||= Cloudflare::Cache.default end |
#cf_ctx ⇒ Object
1183 1184 1185 |
# File 'lib/homura/runtime.rb', line 1183 def cf_ctx env["cloudflare.ctx"] end |
#cf_env ⇒ Object
1180 1181 1182 |
# File 'lib/homura/runtime.rb', line 1180 def cf_env env["cloudflare.env"] end |
#d1 ⇒ Object
1186 1187 1188 |
# File 'lib/homura/runtime.rb', line 1186 def d1 env["cloudflare.DB"] end |
#db ⇒ Object
1189 1190 1191 |
# File 'lib/homura/runtime.rb', line 1189 def db d1 end |
#do_counter ⇒ Object
1210 1211 1212 |
# File 'lib/homura/runtime.rb', line 1210 def do_counter env["cloudflare.DO_COUNTER"] end |
#durable_object(name, id_or_name = nil) ⇒ Object
1217 1218 1219 |
# File 'lib/homura/runtime.rb', line 1217 def durable_object(name, id_or_name = nil) Cloudflare::Bindings.durable_object(env, name, id_or_name) end |
#jobs_dlq ⇒ Object
1207 1208 1209 |
# File 'lib/homura/runtime.rb', line 1207 def jobs_dlq env["cloudflare.QUEUE_JOBS_DLQ"] end |
#jobs_queue ⇒ Object
1204 1205 1206 |
# File 'lib/homura/runtime.rb', line 1204 def jobs_queue env["cloudflare.QUEUE_JOBS"] end |
#kv ⇒ Object
1192 1193 1194 |
# File 'lib/homura/runtime.rb', line 1192 def kv env["cloudflare.KV"] end |
#send_email ⇒ Object
1201 1202 1203 |
# File 'lib/homura/runtime.rb', line 1201 def send_email env["cloudflare.SEND_EMAIL"] end |