{"modulePath":"github.com/cruxstack/github-ops-app","version":"v1.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package teamsync\n\nPackage teamsync syncs the members of Okta groups to GitHub teams. It depends only on the domain interfaces.\n\n## Functions\n\n```go\nfunc TeamName(oktaGroupName string, rule domain.SyncRule) string\n```\nTeamName derives the GitHub team name for an Okta group under a rule.\n\n## Types\n\n```go\ntype Syncer struct {\n\t// contains filtered or unexported fields\n}\n```\nSyncer syncs Okta groups to GitHub teams according to a set of rules.\n\n```go\nfunc NewSyncer(okta domain.OktaClient, github domain.GitHubClient, rules []domain.SyncRule, safetyThreshold float64, logger *slog.Logger) *Syncer\n```\nNewSyncer creates a Syncer.\n\n```go\nfunc (s *Syncer) DetectOrphanedUsers(ctx context.Context, result *domain.SyncResult) (*domain.OrphanedUsersReport, error)\n```\nDetectOrphanedUsers 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.\n\n```go\nfunc (s *Syncer) Sync(ctx context.Context) (*domain.SyncResult, error)\n```\nSync runs every enabled rule and returns a report per synced group. A rule that fails is reported and the others still run; Sync returns an error only when every enabled rule failed.\n\n","path":"github.com/cruxstack/github-ops-app/internal/teamsync","name":"teamsync","synopsis":"Package teamsync syncs the members of Okta groups to GitHub teams.","isRedistributable":true}
