users

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultUserSyncStrategy

type DefaultUserSyncStrategy struct {
}

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(reqs []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