users

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropPgUser added in v1.8.0

func DropPgUser(user string, db *sql.DB) error

DropPgUser to remove user created by the operator e.g. for password rotation

Types

type DefaultUserSyncStrategy

type DefaultUserSyncStrategy struct {
	PasswordEncryption   string
	RoleDeletionSuffix   string
	AdditionalOwnerRoles []string
}

DefaultUserSyncStrategy implements a user sync strategy that merges already existing database users with those defined in the manifest, altering existing users when necessary. It will never strips an existing roles of another role membership, nor it removes the already assigned flag (except for the NOLOGIN). TODO: process other NOflags, i.e. NOSUPERUSER correctly.

func (DefaultUserSyncStrategy) ExecuteSyncRequests

func (strategy DefaultUserSyncStrategy) ExecuteSyncRequests(requests []spec.PgSyncUserRequest, db *sql.DB) error

ExecuteSyncRequests makes actual database changes from the requests passed in its arguments.

func (DefaultUserSyncStrategy) ProduceSyncRequests

func (strategy DefaultUserSyncStrategy) ProduceSyncRequests(dbUsers spec.PgUserMap,
	newUsers spec.PgUserMap) []spec.PgSyncUserRequest

ProduceSyncRequests figures out the types of changes that need to happen with the given users.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL