package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
AdminRoleName is the SQLUsername for AdminRole.
EmptyRoleName is the SQLUsername for EmptyRole.
GetDefaultRoleNameToID returns a role id for default roles.
MakeSQLUsernameFromPreNormalizedString takes a string containing a canonical username and converts it to a SQLUsername.
MakeSQLUsernameFromPreNormalizedStringChecked takes a string, validates it is a prenormalized username, then converts it to a SQLUsername.
MakeSQLUsernameFromUserInput normalizes a username string as entered in an ambiguous context into a SQL username (performs case folding and unicode normalization form C - NFC).
NodeUserName is the SQLUsername for NodeUser.
PublicRoleName is the SQLUsername for PublicRole.
RootUserName is the SQLUsername for RootUser.
TestUserName is the SQLUsername for testuser.
# Constants
AdminRole is the default (and non-droppable) role with superuser privileges.
AdminRoleID is the ID for admin.
EmptyRole is a pseudo-role that's used in system tables.
EmptyRoleID is the ID for EmptyRole.
NodeUser is used by nodes for intra-cluster traffic.
NodeUserID is the ID for NodeUser.
NoneRole is a special role.
PublicRole is the special "public" pseudo-role.
PublicRoleID is the ID for public role.
PurposeCreation indicates that the SQLUsername is being input for the purpose of creating a user account.
PurposeValidation indicates that the SQLUsername is being input for the purpose of looking up an existing user, or to compare with an existing username.
RootUser is the default cluster administrator.
RootUserID is the ID for RootUser.
TestUser is used in tests.
# Variables
ErrUsernameEmpty indicates that an empty string was used as username.
ErrUsernameInvalid indicates that a username string contained invalid characters.
ErrUsernameNotNormalized indicates that a username was not pre-normalized during a conversion.
ErrUsernameTooLong indicates that a username string was too long.
# Structs
SQLUsername represents a username valid inside SQL.
# Type aliases
Purpose indicates the purpose of the resulting SQLUsername in MakeSQLUsernameFromUserInput.
SQLUsernameProto is the wire representation of a SQLUsername.