💾 Archived View for republic.circumlunar.space › users › dbane › gemlog › passwd-file.sig.txt captured on 2023-04-26 at 13:47:04.

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

(* I did consider mldoc, but decided to use NaturalDocs instead *)
signature PASSWD_FILE =
sig
    (*
       Class: passwd_file
       passwd_file is a password relation ADT.
    *)
    type passwd_file

    (*
       Function: mkPasswdFile

       Load a password relation from the CSV-format file "passwd.csv".

       Returns:

          A password relation abstract data type.

       See Also:

          <passwd_file>
    *)
    val mkPasswdFile: unit -> passwd_file

    (*
       Function: getPasswdByName

       This function looks up a password entry and returns the password.

       Parameters:

          pwdf - The password relation ADT.
          login - The user name to look up.

       Returns:

          The password for user 'login'. 
    *)
    val getPasswdByName: passwd_file * string -> string

    val appendEntry: passwd_file * string * string -> passwd_file
    val save: passwd_file -> unit

    (*
       Function: doit
       Run the unit tests
    *)
    val doit: unit -> unit
end