Versions in this module Expand all Collapse all v1 v1.0.0 Mar 6, 2026 Changes in this version + type ArchivedRepo struct + ID int64 + Name string + type CodeHostClient interface + GetRepository func(ctx context.Context, name string) (*CodeHostRepository, error) + ListRepositories func(ctx context.Context) ([]CodeHostRepository, error) + type CodeHostConfig struct + CleanupArchived bool + ExcludeArchived bool + RepoConfigs []RepoConfigEntry + Repos []string + Token string + Type string + URL string + func (ch *CodeHostConfig) GetRepoConfig(repoName string) *RepoConfigEntry + func (ch *CodeHostConfig) ResolveToken() string + type CodeHostRepository struct + Archived bool + CloneURL string + DefaultBranch string + FullName string + Name string + Private bool + type Connection struct + CleanupArchived bool + CreatedAt time.Time + ExcludeArchived bool + ID int64 + Name string + Repos []string + Token string + Type string + URL string + UpdatedAt time.Time + type RepoConfigEntry struct + Branches []string + Delete bool + Exclude bool + Name string + type RepoListOptions struct + ConnectionID *int64 + Limit int + Offset int + Search string + Status string + type RepoListResult struct + HasMore bool + Limit int + Offset int + Repos []Repository + TotalCount int + type RepoStats struct + Deleted int + Excluded int + Failed int + Indexed int + Indexing int + Pending int + Stale int + Total int + type Repository struct + Archived bool + Branches db.StringArray + CloneURL string + ConnectionID int64 + CreatedAt time.Time + DefaultBranch string + Deleted bool + Excluded bool + ID int64 + IndexStatus string + LastIndexed *time.Time + Name string + UpdatedAt time.Time + type Service struct + func NewService(pool db.Pool, encryptor *crypto.TokenEncryptor) *Service + func (s *Service) ClaimPendingIndexJob(ctx context.Context, workerID string) (*Repository, error) + func (s *Service) CleanupStaleIndexing(ctx context.Context, olderThan time.Duration) (int64, error) + func (s *Service) CreateConnection(ctx context.Context, name, connType, url, token string, excludeArchived bool, ...) (*Connection, error) + func (s *Service) CreateRepository(ctx context.Context, connectionID int64, name, cloneURL, defaultBranch string, ...) (*Repository, error) + func (s *Service) DeleteConnection(ctx context.Context, id int64) error + func (s *Service) DeleteRepository(ctx context.Context, id int64) error + func (s *Service) ExcludeRepository(ctx context.Context, id int64) error + func (s *Service) FindRepositoryByZoektName(ctx context.Context, zoektName string) (*Repository, error) + func (s *Service) GetConnection(ctx context.Context, id int64) (*Connection, error) + func (s *Service) GetConnectionByName(ctx context.Context, name string) (*Connection, error) + func (s *Service) GetConnectionStats(ctx context.Context, connectionID int64) (*RepoStats, error) + func (s *Service) GetPendingIndexJobs(ctx context.Context, limit int) ([]Repository, error) + func (s *Service) GetRepoStats(ctx context.Context, staleThreshold time.Time) (*RepoStats, error) + func (s *Service) GetRepositoriesByStatus(ctx context.Context, status string, limit int) ([]Repository, error) + func (s *Service) GetRepository(ctx context.Context, id int64) (*Repository, error) + func (s *Service) GetRepositoryByName(ctx context.Context, name string) (*Repository, error) + func (s *Service) GetStats(ctx context.Context) (*RepoStats, error) + func (s *Service) IncludeRepository(ctx context.Context, id int64) error + func (s *Service) ListConnections(ctx context.Context) ([]Connection, error) + func (s *Service) ListRepositories(ctx context.Context, connectionID *int64) ([]Repository, error) + func (s *Service) ListRepositoriesWithOptions(ctx context.Context, opts RepoListOptions) (*RepoListResult, error) + func (s *Service) ReindexAll(ctx context.Context) (int64, error) + func (s *Service) ReindexConnection(ctx context.Context, connectionID int64) (int64, error) + func (s *Service) RestoreRepository(ctx context.Context, id int64) error + func (s *Service) ScheduleIndex(ctx context.Context, repoID int64) error + func (s *Service) SetRepoPollInterval(ctx context.Context, repoID int64, intervalSeconds int) error + func (s *Service) SyncCodeHostsFromConfig(ctx context.Context, codeHosts map[string]CodeHostConfig) ([]int64, error) + func (s *Service) SyncRepositories(ctx context.Context, connectionID int64, client CodeHostClient, ...) ([]ArchivedRepo, error) + func (s *Service) TouchRepository(ctx context.Context, id int64) error + func (s *Service) TriggerSyncAllRepos(ctx context.Context) (int, error) + func (s *Service) TriggerSyncStaleRepos(ctx context.Context, staleThreshold time.Time) (int, error) + func (s *Service) UpdateBranches(ctx context.Context, repoID int64, branches []string) error + func (s *Service) UpdateConnection(ctx context.Context, id int64, name, connType, url, token string, ...) (*Connection, error) + func (s *Service) UpdateIndexStatus(ctx context.Context, id int64, status string, indexed bool) error + func (s *Service) UpdateIndexStatusIfMatch(ctx context.Context, id int64, expectedStatus, newStatus string, indexed bool) (bool, error)