MCPcopy Index your code
hub / github.com/zalando/postgres-operator / makeUserFlags

Function makeUserFlags

pkg/cluster/database.go:522–540  ·  view source on GitHub ↗
(rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin bool)

Source from the content-addressed store, hash-verified

520}
521
522func makeUserFlags(rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin bool) (result []string) {
523 if rolsuper {
524 result = append(result, constants.RoleFlagSuperuser)
525 }
526 if rolinherit {
527 result = append(result, constants.RoleFlagInherit)
528 }
529 if rolcreaterole {
530 result = append(result, constants.RoleFlagCreateRole)
531 }
532 if rolcreatedb {
533 result = append(result, constants.RoleFlagCreateDB)
534 }
535 if rolcanlogin {
536 result = append(result, constants.RoleFlagLogin)
537 }
538
539 return result
540}
541
542func (c *Cluster) getOwnerRoles(dbObjPath string, withUser bool) (owners []string) {
543 owners = append(owners, dbObjPath+constants.OwnerRoleNameSuffix)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected