enum_gen.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // generated file; DO NOT EDIT - use go generate in directory with source
  2. package capability
  3. func (c Cap) String() string {
  4. switch c {
  5. case CAP_CHOWN:
  6. return "chown"
  7. case CAP_DAC_OVERRIDE:
  8. return "dac_override"
  9. case CAP_DAC_READ_SEARCH:
  10. return "dac_read_search"
  11. case CAP_FOWNER:
  12. return "fowner"
  13. case CAP_FSETID:
  14. return "fsetid"
  15. case CAP_KILL:
  16. return "kill"
  17. case CAP_SETGID:
  18. return "setgid"
  19. case CAP_SETUID:
  20. return "setuid"
  21. case CAP_SETPCAP:
  22. return "setpcap"
  23. case CAP_LINUX_IMMUTABLE:
  24. return "linux_immutable"
  25. case CAP_NET_BIND_SERVICE:
  26. return "net_bind_service"
  27. case CAP_NET_BROADCAST:
  28. return "net_broadcast"
  29. case CAP_NET_ADMIN:
  30. return "net_admin"
  31. case CAP_NET_RAW:
  32. return "net_raw"
  33. case CAP_IPC_LOCK:
  34. return "ipc_lock"
  35. case CAP_IPC_OWNER:
  36. return "ipc_owner"
  37. case CAP_SYS_MODULE:
  38. return "sys_module"
  39. case CAP_SYS_RAWIO:
  40. return "sys_rawio"
  41. case CAP_SYS_CHROOT:
  42. return "sys_chroot"
  43. case CAP_SYS_PTRACE:
  44. return "sys_ptrace"
  45. case CAP_SYS_PACCT:
  46. return "sys_pacct"
  47. case CAP_SYS_ADMIN:
  48. return "sys_admin"
  49. case CAP_SYS_BOOT:
  50. return "sys_boot"
  51. case CAP_SYS_NICE:
  52. return "sys_nice"
  53. case CAP_SYS_RESOURCE:
  54. return "sys_resource"
  55. case CAP_SYS_TIME:
  56. return "sys_time"
  57. case CAP_SYS_TTY_CONFIG:
  58. return "sys_tty_config"
  59. case CAP_MKNOD:
  60. return "mknod"
  61. case CAP_LEASE:
  62. return "lease"
  63. case CAP_AUDIT_WRITE:
  64. return "audit_write"
  65. case CAP_AUDIT_CONTROL:
  66. return "audit_control"
  67. case CAP_SETFCAP:
  68. return "setfcap"
  69. case CAP_MAC_OVERRIDE:
  70. return "mac_override"
  71. case CAP_MAC_ADMIN:
  72. return "mac_admin"
  73. case CAP_SYSLOG:
  74. return "syslog"
  75. case CAP_WAKE_ALARM:
  76. return "wake_alarm"
  77. case CAP_BLOCK_SUSPEND:
  78. return "block_suspend"
  79. case CAP_AUDIT_READ:
  80. return "audit_read"
  81. }
  82. return "unknown"
  83. }
  84. // List returns list of all supported capabilities
  85. func List() []Cap {
  86. return []Cap{
  87. CAP_CHOWN,
  88. CAP_DAC_OVERRIDE,
  89. CAP_DAC_READ_SEARCH,
  90. CAP_FOWNER,
  91. CAP_FSETID,
  92. CAP_KILL,
  93. CAP_SETGID,
  94. CAP_SETUID,
  95. CAP_SETPCAP,
  96. CAP_LINUX_IMMUTABLE,
  97. CAP_NET_BIND_SERVICE,
  98. CAP_NET_BROADCAST,
  99. CAP_NET_ADMIN,
  100. CAP_NET_RAW,
  101. CAP_IPC_LOCK,
  102. CAP_IPC_OWNER,
  103. CAP_SYS_MODULE,
  104. CAP_SYS_RAWIO,
  105. CAP_SYS_CHROOT,
  106. CAP_SYS_PTRACE,
  107. CAP_SYS_PACCT,
  108. CAP_SYS_ADMIN,
  109. CAP_SYS_BOOT,
  110. CAP_SYS_NICE,
  111. CAP_SYS_RESOURCE,
  112. CAP_SYS_TIME,
  113. CAP_SYS_TTY_CONFIG,
  114. CAP_MKNOD,
  115. CAP_LEASE,
  116. CAP_AUDIT_WRITE,
  117. CAP_AUDIT_CONTROL,
  118. CAP_SETFCAP,
  119. CAP_MAC_OVERRIDE,
  120. CAP_MAC_ADMIN,
  121. CAP_SYSLOG,
  122. CAP_WAKE_ALARM,
  123. CAP_BLOCK_SUSPEND,
  124. CAP_AUDIT_READ,
  125. }
  126. }