package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

CreatePrivilegesFromDefaultPrivileges creates privileges for a the specified object with the corresponding default privileges and the appropriate owner (node for system, the restoring user otherwise.) schemaDefaultPrivilegeDescriptor can be nil in the case where the object being created is itself a schema.
GetPublicHasExecuteOnFunctions returns whether Public has EXECUTE privilege on functions.
GetPublicHasUsageOnTypes returns whether Public has USAGE privilege on types.
GetRoleHasAllPrivilegesOnTargetObject returns whether the creator role has all privileges on the default privileges target object.
GetUserPrivilegesForObject returns the set of []UserPrivileges constructed from the DefaultPrivilegesForRole.
MakeDefaultPrivilegeDescriptor returns a new DefaultPrivilegeDescriptor for the specified DefaultPrivilegeDescriptorType.
MakeDefaultPrivileges returns an immutable given a defaultPrivilegeDescriptor.
MaybeFixPrivilegesWithBuilder fixes the privilege descriptor if needed, including: * adding default privileges for the "admin" role * fixing default privileges for the "root" user * fixing maximum privileges for users.
NewMutableDefaultPrivileges returns a Mutable given a defaultPrivilegeDescriptor.
SystemSuperuserPrivileges returns the privilege list for super-users found for the given system descriptor name key.
Validate validates a privilege descriptor.
ValidateDefaultPrivileges validates default privileges.
ValidateSuperuserPrivileges validates superuser privileges.
ValidateSyntheticPrivilegeObject validates a Object.

# Structs

Mutable is a wrapper for a DefaultPrivilegeDescriptor that exposes getters and setters.

# Interfaces

PrivilegeDescriptorBuilder used to potentially mutate privilege descriptors, only if a change exists to avoid copying.