users

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultUserSyncStrategy

type DefaultUserSyncStrategy struct {
	PasswordEncryption 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