lanonna/pam/lib/datatypes.ml

26 lines
644 B
OCaml
Raw Permalink Normal View History

2024-04-23 09:52:53 +02:00
type client_id = | MqClient | HttpClient
module MatrixRoom = struct
type t = string
let make str = str
end
2024-04-24 09:45:20 +02:00
type forgejo_issue_data = { (* from an issue in forgejo get a reminder *)
2024-04-23 09:52:53 +02:00
url: string;
title: string;
due_date: string option;
body: string;
matrix_target: MatrixRoom.t
}
type Riot.Message.t +=
| RegisterClient of (client_id * Riot.Pid.t)
| LookupClient of client_id
2024-04-30 12:01:58 +02:00
| ListIssues
2024-04-24 09:45:20 +02:00
| Reminder of forgejo_issue_data
2024-05-02 12:26:01 +02:00
| InternalFailure of (MatrixRoom.t * string)
2024-04-23 09:52:53 +02:00
2024-04-24 09:45:20 +02:00
let forgejo_issues issues = issues |> List.map (fun r -> Reminder r)
2024-05-02 12:26:01 +02:00
let internal_failure matrix_room reason = InternalFailure (matrix_room, reason)