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.
Click to show internal directories.
Click to hide internal directories.