2
0

flags.go 771 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package daemon
  2. import (
  3. "git.beejay.kim/tool/service/config"
  4. "github.com/urfave/cli/v2"
  5. )
  6. var flags = []cli.Flag{
  7. &cli.PathFlag{
  8. Name: "config",
  9. Usage: "config file path",
  10. Required: true,
  11. Aliases: []string{"C"},
  12. TakesFile: false,
  13. Action: config.Load[Configuration],
  14. },
  15. &cli.StringFlag{
  16. Name: "pid",
  17. Usage: "platform ID",
  18. Required: true,
  19. Destination: &pid,
  20. },
  21. &cli.StringFlag{
  22. Name: "bid",
  23. Usage: "broadcaster ID",
  24. Required: true,
  25. Destination: &bid,
  26. },
  27. &cli.PathFlag{
  28. Name: "record",
  29. TakesFile: false,
  30. Destination: &pathRecord,
  31. },
  32. &cli.StringFlag{
  33. Name: "player",
  34. Usage: "whether we want to watch stream in realtime",
  35. Destination: &pathPlayer,
  36. },
  37. }