teamsync

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func TeamName

func TeamName(oktaGroupName string, rule domain.SyncRule) string

TeamName derives the GitHub team name for an Okta group under a rule.

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.

func (*Syncer) Sync

func (s *Syncer) Sync(ctx context.Context) (*domain.SyncResult, error)

Sync 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL