lightbulb/providers/memory_provider

Types

pub type MemoryProvider =
  Subject(Message)
pub type Message {
  Shutdown
  GetActiveJwk(reply_with: Subject(Result(Jwk, Nil)))
  GetAllJwks(reply_with: Subject(List(Jwk)))
  CreateJwk(jwk: Jwk)
  SetActiveJwk(kid: String)
  CreateNonce(reply_with: Subject(Result(Nonce, Nil)))
  ValidateNonce(
    value: String,
    reply_with: Subject(Result(Nil, Nil)),
  )
  CleanupExpiredNonces
  CreateRegistration(
    registration: Registration,
    reply_with: Subject(Result(#(Int, Registration), Nil)),
  )
  GetRegistration(
    id: Int,
    reply_with: Subject(Result(#(Int, Registration), Nil)),
  )
  GetRegistrationBy(
    issuer: String,
    client_id: String,
    reply_with: Subject(Result(#(Int, Registration), Nil)),
  )
  GetAllRegistrations(
    reply_with: Subject(List(#(Int, Registration))),
  )
  DeleteRegistration(id: Int)
  CreateDeployment(
    deployment: Deployment,
    reply_with: Subject(Result(#(Int, Deployment), Nil)),
  )
  GetDeployment(
    issuer: String,
    client_id: String,
    deployment_id: String,
    reply_with: Subject(Result(#(Int, Deployment), String)),
  )
}

Constructors

  • Shutdown
  • GetActiveJwk(reply_with: Subject(Result(Jwk, Nil)))
  • GetAllJwks(reply_with: Subject(List(Jwk)))
  • CreateJwk(jwk: Jwk)
  • SetActiveJwk(kid: String)
  • CreateNonce(reply_with: Subject(Result(Nonce, Nil)))
  • ValidateNonce(
      value: String,
      reply_with: Subject(Result(Nil, Nil)),
    )
  • CleanupExpiredNonces
  • CreateRegistration(
      registration: Registration,
      reply_with: Subject(Result(#(Int, Registration), Nil)),
    )
  • GetRegistration(
      id: Int,
      reply_with: Subject(Result(#(Int, Registration), Nil)),
    )
  • GetRegistrationBy(
      issuer: String,
      client_id: String,
      reply_with: Subject(Result(#(Int, Registration), Nil)),
    )
  • GetAllRegistrations(
      reply_with: Subject(List(#(Int, Registration))),
    )
  • DeleteRegistration(id: Int)
  • CreateDeployment(
      deployment: Deployment,
      reply_with: Subject(Result(#(Int, Deployment), Nil)),
    )
  • GetDeployment(
      issuer: String,
      client_id: String,
      deployment_id: String,
      reply_with: Subject(Result(#(Int, Deployment), String)),
    )

Values

pub fn cleanup(actor: Subject(Message)) -> Nil
pub fn cleanup_expired_nonces(actor: Subject(Message)) -> Nil
pub fn create_deployment(
  actor: Subject(Message),
  deployment: Deployment,
) -> Result(#(Int, Deployment), Nil)
pub fn create_jwk(actor: Subject(Message), jwk: Jwk) -> Nil
pub fn create_nonce(
  actor: Subject(Message),
) -> Result(Nonce, Nil)
pub fn create_registration(
  actor: Subject(Message),
  registration: Registration,
) -> Result(#(Int, Registration), Nil)
pub fn data_provider(
  memory_provider: Subject(Message),
) -> Result(DataProvider, String)
pub fn delete_registration(
  actor: Subject(Message),
  id: Int,
) -> Result(Int, a)
pub fn get_active_jwk(
  actor: Subject(Message),
) -> Result(Jwk, Nil)
pub fn get_all_jwks(actor: Subject(Message)) -> List(Jwk)
pub fn get_deployment(
  actor: Subject(Message),
  issuer: String,
  client_id: String,
  deployment_id: String,
) -> Result(#(Int, Deployment), String)
pub fn get_registration(
  actor: Subject(Message),
  id: Int,
) -> Result(#(Int, Registration), Nil)
pub fn get_registration_by(
  actor: Subject(Message),
  issuer: String,
  client_id: String,
) -> Result(#(Int, Registration), Nil)
pub fn list_registrations(
  actor: Subject(Message),
) -> List(#(Int, Registration))
pub fn start() -> Result(Subject(Message), StartError)
pub fn validate_nonce(
  actor: Subject(Message),
  value: String,
) -> Result(Nil, Nil)
Search Document