acl_types.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package sarama
  2. type AclOperation int
  3. // ref: https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/acl/AclOperation.java
  4. const (
  5. AclOperationUnknown AclOperation = 0
  6. AclOperationAny AclOperation = 1
  7. AclOperationAll AclOperation = 2
  8. AclOperationRead AclOperation = 3
  9. AclOperationWrite AclOperation = 4
  10. AclOperationCreate AclOperation = 5
  11. AclOperationDelete AclOperation = 6
  12. AclOperationAlter AclOperation = 7
  13. AclOperationDescribe AclOperation = 8
  14. AclOperationClusterAction AclOperation = 9
  15. AclOperationDescribeConfigs AclOperation = 10
  16. AclOperationAlterConfigs AclOperation = 11
  17. AclOperationIdempotentWrite AclOperation = 12
  18. )
  19. type AclPermissionType int
  20. // ref: https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/acl/AclPermissionType.java
  21. const (
  22. AclPermissionUnknown AclPermissionType = 0
  23. AclPermissionAny AclPermissionType = 1
  24. AclPermissionDeny AclPermissionType = 2
  25. AclPermissionAllow AclPermissionType = 3
  26. )
  27. type AclResourceType int
  28. // ref: https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/resource/ResourceType.java
  29. const (
  30. AclResourceUnknown AclResourceType = 0
  31. AclResourceAny AclResourceType = 1
  32. AclResourceTopic AclResourceType = 2
  33. AclResourceGroup AclResourceType = 3
  34. AclResourceCluster AclResourceType = 4
  35. AclResourceTransactionalID AclResourceType = 5
  36. )