lanonna/pam/lib/datatypes.ml

26 lines
600 B
OCaml
Raw 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-04-23 09:52:53 +02:00
| InternalFailure of string
2024-04-24 09:45:20 +02:00
let forgejo_issues issues = issues |> List.map (fun r -> Reminder r)
let internal_failure reason = InternalFailure reason