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
1177 1178 1179 |
# File 'lib/homura/runtime.rb', line 1177 def ai Cloudflare::Bindings.ai(env) end |
#bucket ⇒ Object
1174 1175 1176 |
# File 'lib/homura/runtime.rb', line 1174 def bucket env["cloudflare.BUCKET"] end |
#cache ⇒ Object
1192 1193 1194 |
# File 'lib/homura/runtime.rb', line 1192 def cache @__homura_cache ||= Cloudflare::Cache.default end |
#cf_ctx ⇒ Object
1162 1163 1164 |
# File 'lib/homura/runtime.rb', line 1162 def cf_ctx env["cloudflare.ctx"] end |
#cf_env ⇒ Object
1159 1160 1161 |
# File 'lib/homura/runtime.rb', line 1159 def cf_env env["cloudflare.env"] end |
#d1 ⇒ Object
1165 1166 1167 |
# File 'lib/homura/runtime.rb', line 1165 def d1 env["cloudflare.DB"] end |
#db ⇒ Object
1168 1169 1170 |
# File 'lib/homura/runtime.rb', line 1168 def db d1 end |
#do_counter ⇒ Object
1189 1190 1191 |
# File 'lib/homura/runtime.rb', line 1189 def do_counter env["cloudflare.DO_COUNTER"] end |
#durable_object(name, id_or_name = nil) ⇒ Object
1196 1197 1198 |
# File 'lib/homura/runtime.rb', line 1196 def durable_object(name, id_or_name = nil) Cloudflare::Bindings.durable_object(env, name, id_or_name) end |
#jobs_dlq ⇒ Object
1186 1187 1188 |
# File 'lib/homura/runtime.rb', line 1186 def jobs_dlq env["cloudflare.QUEUE_JOBS_DLQ"] end |
#jobs_queue ⇒ Object
1183 1184 1185 |
# File 'lib/homura/runtime.rb', line 1183 def jobs_queue env["cloudflare.QUEUE_JOBS"] end |
#kv ⇒ Object
1171 1172 1173 |
# File 'lib/homura/runtime.rb', line 1171 def kv env["cloudflare.KV"] end |
#send_email ⇒ Object
1180 1181 1182 |
# File 'lib/homura/runtime.rb', line 1180 def send_email env["cloudflare.SEND_EMAIL"] end |