types.ha 660 B

123456789101112131415161718192021222324252627282930313233343536
  1. use a::logger;
  2. export type Config = struct {
  3. verbose: bool,
  4. dry_run: bool,
  5. out_dir: str,
  6. ext_override: (void | str),
  7. threads: (void | size),
  8. memory: (void | str),
  9. logger: (void | logger::Logger),
  10. };
  11. export fn default_config() Config =
  12. Config {
  13. out_dir = ".",
  14. ext_override = void,
  15. threads = void,
  16. memory = void,
  17. logger = void,
  18. ...
  19. };
  20. export type ActionList = struct {
  21. archive: str,
  22. };
  23. export type ActionExtract = struct {
  24. archive: str,
  25. };
  26. export type ActionCreate = struct {
  27. archive: str,
  28. files: []str,
  29. };
  30. export type ActionListArchives = void;
  31. export type Action = (ActionList | ActionExtract | ActionCreate | ActionListArchives);