Refactor gitlab to generic remotes

This commit is contained in:
2024-01-15 15:39:35 -05:00
parent da209c53e3
commit d6833a9ea0
21 changed files with 208 additions and 172 deletions

View File

@ -0,0 +1,13 @@
package remote
import "gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/load"
// Any remote needs to be able to return
// the number of projects the user has access to and also
// stream all projects along with updates to channels
// provided by *load.ProgressInfo
type Remote interface {
Name() string
GetNumProjects(*RemoteQueryOpts) int
StreamProjects(*RemoteQueryOpts) *load.ProgressInfo
}

View File

@ -0,0 +1,8 @@
package remote
import "context"
type RemoteQueryOpts struct {
Ctx context.Context
OwnerOnly bool
}