Documentation ¶
Index ¶
- Constants
- type Password
- type Rule
- type User
- func NewOperatorUser(secret *v1.Secret, acl2Support bool) (*User, error)
- func NewSentinelUser(name string, role UserRole, secret *v1.Secret) (*User, error)
- func NewUser(name string, role UserRole, secret *v1.Secret, acl2Support bool) (*User, error)
- func NewUserFromRedisUser(username, ruleStr string, pwd *Password) (*User, error)
- type UserRole
Constants ¶
View Source
const ( // DefaultUserName from reids 6.0, there is a default user named "default" // for compatibility, the default user set as RoleDeveloper DefaultUserName = "default" DefaultOperatorUserName = "operator" // password secret key name PasswordSecretKey = "password" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Password ¶
type Password struct { SecretName string `json:"secretName,omitempty"` // contains filtered or unexported fields }
Password
func (*Password) GetSecretName ¶
type Rule ¶
type Rule struct { // Categories Categories []string `json:"categories,omitempty"` // DisallowedCategories DisallowedCategories []string `json:"disallowedCategories,omitempty"` // AllowedCommands supports <command> and <command>|<subcommand> AllowedCommands []string `json:"allowedCommands,omitempty"` // DisallowedCommands supports <command> and <command>|<subcommand> DisallowedCommands []string `json:"disallowedCommands,omitempty"` // KeyPatterns support multi patterns KeyPatterns []string `json:"keyPatterns,omitempty"` // KeyReadPatterns >= 7.0 support key read patterns KeyReadPatterns []string `json:"keyReadPatterns,omitempty"` // KeyWritePatterns >= 7.0 support key write patterns KeyWritePatterns []string `json:"keyWritePatterns,omitempty"` // Channels >= 7.0 support channel patterns Channels []string `json:"channels,omitempty"` }
Rule acl rules
This rule supports redis 7.0, which is compatable with 6.0
func PatchRedisClusterClientRequiredRules ¶
Patch redis cluster client required rules
func PatchRedisPubsubRules ¶
type User ¶
type User struct { Name string `json:"name"` Role UserRole `json:"role"` Password *Password `json:"password,omitempty"` Rules []*Rule `json:"rules,omitempty"` }
User
func NewOperatorUser ¶
NewOperatorUser
func NewSentinelUser ¶
NewSentinelUser
func NewUserFromRedisUser ¶
func (*User) GetPassword ¶
Click to show internal directories.
Click to hide internal directories.