Documentation
¶
Overview ¶
Package queries contains the database queries for the GitHub integration
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SyncRepositoriesWithDB ¶
func SyncRepositoriesWithDB(ctx context.Context, store db.Store, repos []*github.Repository, provider string, projectID uuid.UUID) error
SyncRepositoriesWithDB syncs the repositories already in the database with the repositories returned from GitHub for a given group ID. It works by first getting existing repositories from the database, and we then check if the repository already exists in the database, and if it does, we check if it needs to be updated. If it doesn't exist, we create it. This function will be called on initial enrollment by the client (medic enroll ...), It can then later be called to sync the repositories with the database. In time this maybe better suited to a stored procedure. Bench marking this function should 0.8sec for an initial sync of 360 new repos.
Types ¶
This section is empty.