package sihl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parameters

module Repo : sig ... end

Signature

val lifecycle : Sihl__.Core_container.Lifecycle.t
val get_all : Core.Ctx.t -> query:Data.Ql.t -> (Sihl__.User_core.User.t list * Data.Repo.Meta.t, string) Stdlib.Result.t Lwt.t
val get : Core.Ctx.t -> user_id:string -> (Sihl__.User_core.User.t option, string) Stdlib.Result.t Lwt.t
val get_by_email : Core.Ctx.t -> email:string -> (Sihl__.User_core.User.t option, string) Stdlib.Result.t Lwt.t
val update_password : Core.Ctx.t -> ?password_policy:(string -> (unit, string) Stdlib.Result.t) -> user:Sihl__.User_core.User.t -> old_password:string -> new_password:string -> new_password_confirmation:string -> unit -> ((Sihl__.User_core.User.t, string) Stdlib.Result.t, string) Stdlib.Result.t Lwt.t
val update_details : Core.Ctx.t -> user:Sihl__.User_core.User.t -> email:string -> username:string option -> (Sihl__.User_core.User.t, string) Stdlib.Result.t Lwt.t
val set_password : Core.Ctx.t -> ?password_policy:(string -> (unit, string) Stdlib.Result.t) -> user:Sihl__.User_core.User.t -> password:string -> password_confirmation:string -> unit -> ((Sihl__.User_core.User.t, string) Stdlib.Result.t, string) Stdlib.Result.t Lwt.t
val create_user : Core.Ctx.t -> email:string -> password:string -> username:string option -> (Sihl__.User_core.User.t, string) Stdlib.Result.t Lwt.t
val create_admin : Core.Ctx.t -> email:string -> password:string -> username:string option -> (Sihl__.User_core.User.t, string) Stdlib.Result.t Lwt.t
val register : Sihl__.Core_ctx.t -> ?password_policy:(string -> (unit, string) Stdlib.result) -> ?username:string -> email:string -> password:string -> password_confirmation:string -> unit -> ((Sihl__.User_core.User.t, string) Stdlib.result, string) Lwt_result.t
val login : Sihl__.Core_ctx.t -> email:string -> password:string -> ((Sihl__.User_core.User.t, string) Stdlib.result, string) Lwt_result.t
OCaml

Innovation. Community. Security.