event.go 349 B

12345678910111213141516171819202122
  1. package power
  2. type Type uint8
  3. const (
  4. SUSPEND Type = iota
  5. RESUME
  6. RESUMEAUTOMATIC // Because the user is not present, most applications should do nothing.
  7. )
  8. func (t Type) String() string {
  9. switch t {
  10. case SUSPEND:
  11. return "SUSPEND"
  12. case RESUME:
  13. return "RESUME"
  14. case RESUMEAUTOMATIC:
  15. return "RESUMEAUTOMATIC"
  16. default:
  17. return ""
  18. }
  19. }