Documentation ¶
Index ¶
Constants ¶
View Source
const ( ReconcileTeams recon.Type = "teams" ReconcileMembers recon.Type = "members" )
Variables ¶
This section is empty.
Functions ¶
func NewGroupProvider ¶
func NewGroupProvider(db Database) sdk.GroupProvider
func NewReconciler ¶
* The reconciler fetches new reconciliation work from the database and updates the corresponding item via the github API.
It returns true, if there was work to be done and false, if there was no open reconciliation work.
Types ¶
type API ¶
type API interface { ListTeams(org string) ([]Team, error) ListMembers(org string, team string) ([]Member, error) }
* API is a simplified wrapper around the github api
func NewDefaultApi ¶
type Cli ¶
type Cli interface { ListTeams(ctx context.Context, org string, opts *github.ListOptions) ([]*github.Team, *github.Response, error) ListTeamMembersBySlug(ctx context.Context, org string, slug string, opts *github.TeamListTeamMembersOptions) ([]*github.User, *github.Response, error) }
* Cli is an interface wrapping the methods we need from the official client
type Database ¶
type Database interface { AcceptReconcileJob(olderThan time.Duration) (reconciliation.Job, bool) ListTeams() ([]Team, error) UpsertOrgTeams(org string, teams []Team) error GetTeam(guid string) (Team, error) UpdateTeamMembers(guid string, members []Member) error }
func NewMongoDatabase ¶
func NewMongoDatabase(l MongoLogin, org string) (Database, error)
type MongoLogin ¶
Click to show internal directories.
Click to hide internal directories.