builder-web/lib/model.mli

56 lines
2.2 KiB
OCaml
Raw Normal View History

2021-01-21 16:51:58 +00:00
type error = [ Caqti_error.call_or_retrieve | `Not_found | `File_error of Fpath.t | `Msg of string ]
2020-12-02 13:33:15 +00:00
val pp_error : Format.formatter -> error -> unit
2021-03-24 13:49:23 +00:00
val staging : Fpath.t -> Fpath.t
val cleanup_staging : Fpath.t -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
(unit, [> `Msg of string ]) result Lwt.t
2021-03-24 13:49:23 +00:00
val build_artifact : Fpath.t -> Uuidm.t -> Fpath.t -> Caqti_lwt.connection ->
(string * Cstruct.t, [> error ]) result Lwt.t
val build_artifacts : Builder_db.id -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
(Builder_db.file list, [> Caqti_error.call_or_retrieve ]) result Lwt.t
2020-12-02 13:33:15 +00:00
val build : Uuidm.t -> Caqti_lwt.connection ->
(Builder_db.id * Builder_db.Build.t, [> error ]) result Lwt.t
val build_meta : Builder_db.id -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
((Builder_db.Build.Meta.t * Builder_db.file option) option, [> Caqti_error.call_or_retrieve ]) result Lwt.t
val build_hash : Cstruct.t -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
((string * Builder_db.Build.t) option, [> Caqti_error.call_or_retrieve ]) result Lwt.t
val build_exists : Uuidm.t -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
(bool, [> Caqti_error.call_or_retrieve ]) result Lwt.t
val latest_build_uuid : Builder_db.id -> Caqti_lwt.connection ->
(Uuidm.t, [> error ]) result Lwt.t
val build_previous : Builder_db.id -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
(Builder_db.Build.Meta.t option, [> Caqti_error.call_or_retrieve ]) result Lwt.t
val main_binary : Builder_db.id -> Fpath.t option -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
(Builder_db.file option, [> Caqti_error.call_or_retrieve ]) result Lwt.t
val job : string -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
((Builder_db.Build.Meta.t * Builder_db.file option) list, [> Caqti_error.call_or_retrieve ]) result Lwt.t
val jobs : Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
((Builder_db.id * string) list, [> Caqti_error.call_or_retrieve ]) result Lwt.t
2021-02-15 10:48:10 +00:00
val job_name : Builder_db.id -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
(string, [> Caqti_error.call_or_retrieve ]) result Lwt.t
2021-02-15 10:48:10 +00:00
val user : string -> Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
(Builder_web_auth.scrypt Builder_web_auth.user_info option, [> Caqti_error.call_or_retrieve ]) result Lwt.t
val add_build :
2021-01-21 16:51:58 +00:00
Fpath.t ->
(Builder.job * Uuidm.t * (int * string) list * Ptime.t * Ptime.t *
Builder.execution_result * (Fpath.t * string) list) ->
Caqti_lwt.connection ->
2021-06-01 08:33:35 +00:00
(unit, [> Caqti_error.call_or_retrieve | `Msg of string ]) result Lwt.t