plinth/cloudflare/durable_object

Types

pub type AlarmInvocationInfo {
  AlarmInvocationInfo(retry_count: Int, is_retry: Bool)
}

Constructors

  • AlarmInvocationInfo(retry_count: Int, is_retry: Bool)
pub type GetOptions {
  GetOptions(allow_concurrency: Bool, no_cache: Bool)
}

Constructors

  • GetOptions(allow_concurrency: Bool, no_cache: Bool)
pub type Id
pub type Namespace
pub type NonConcurrentPromise(t)
pub type Sql
pub type SqlStorageCursor
pub type State
pub type Storage
pub type Stub
pub type UpdateOptions {
  UpdateOptions(allow_unconfirmed: Bool, no_cache: Bool)
}

Constructors

  • UpdateOptions(allow_unconfirmed: Bool, no_cache: Bool)

Values

pub fn alarm_invocation_info_decoder(
  ,
) -> decode.Decoder(AlarmInvocationInfo)
pub fn await(
  p: NonConcurrentPromise(t),
  then: fn(t) -> NonConcurrentPromise(u),
) -> NonConcurrentPromise(u)
pub fn block_concurrency_while(
  state: State,
  action: fn() -> promise.Promise(t),
) -> NonConcurrentPromise(t)
pub fn database_size(storage: Sql) -> Int
pub fn delete_alarm(
  storage: Storage,
) -> NonConcurrentPromise(Nil)
pub fn equals(id: Id, other: Id) -> Bool
pub fn exec(
  storage: Sql,
  query: String,
  bindings: List(String),
) -> SqlStorageCursor
pub fn get(
  namespace: Namespace,
  id: Id,
  location_hint: option.Option(String),
) -> Stub
pub fn get_alarm(
  storage: Storage,
) -> NonConcurrentPromise(Result(Int, Nil))
pub fn get_default() -> GetOptions
pub fn get_many(
  storage: Storage,
  keys: List(String),
  options: GetOptions,
) -> NonConcurrentPromise(Result(dynamic.Dynamic, Nil))
pub fn get_one(
  storage: Storage,
  key: String,
  options: GetOptions,
) -> NonConcurrentPromise(Result(dynamic.Dynamic, Nil))
pub fn id_from_name(namespace: Namespace, name: String) -> Id
pub fn id_from_string(namespace: Namespace, id: String) -> Id

This is the string value of the objects id, not its name.

pub fn jurisdiction(
  namespace: Namespace,
  jurisdiction: String,
) -> Namespace
pub fn name(id: Id) -> String
pub fn new_unique_id(jurisdiction: option.Option(String)) -> Id
pub fn put_one(
  storage: Storage,
  key: String,
  value: json.Json,
  options: UpdateOptions,
) -> NonConcurrentPromise(Nil)
pub fn resolve(value: t) -> NonConcurrentPromise(t)
pub fn rpc(
  stub: Stub,
  method: String,
  args: List(json.Json),
) -> promise.Promise(Result(json.Json, String))
pub fn set_alarm(
  storage: Storage,
  scheduled_time: Int,
) -> NonConcurrentPromise(Nil)
pub fn sql(storage: Storage) -> Sql
pub fn state_id(state: State) -> Id
pub fn storage(state: State) -> Storage
pub fn stub_id(stub: Stub) -> Id
pub fn to_promise(
  p: NonConcurrentPromise(t),
) -> promise.Promise(t)
pub fn to_string(id: Id) -> String
pub fn update_default() -> UpdateOptions
Search Document