Documentation
¶
Overview ¶
Package teamsync syncs the members of Okta groups to GitHub teams. It depends only on the domain interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer syncs Okta groups to GitHub teams according to a set of rules.
func NewSyncer ¶
func NewSyncer(okta domain.OktaClient, github domain.GitHubClient, rules []domain.SyncRule, safetyThreshold float64, logger *slog.Logger) *Syncer
NewSyncer creates a Syncer.
func (*Syncer) DetectOrphanedUsers ¶
func (s *Syncer) DetectOrphanedUsers(ctx context.Context, result *domain.SyncResult) (*domain.OrphanedUsersReport, error)
DetectOrphanedUsers finds organization members who are in none of the teams a sync covered. It uses the member lists the sync ended with, and reads the members of teams whose members were not synced. It returns an error rather than report a team's members as orphaned when the result is incomplete or a team's members can't be read.