Start moving gitlab code to remote interface
This commit is contained in:
@ -1,13 +1,24 @@
|
||||
package remote
|
||||
|
||||
import "gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/load"
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/load"
|
||||
)
|
||||
|
||||
type RemoteInfo struct {
|
||||
Ctx context.Context
|
||||
Host string
|
||||
Name string
|
||||
Token string
|
||||
}
|
||||
|
||||
// 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
|
||||
GetInfo() *RemoteInfo
|
||||
GetNumProjects(*RemoteQueryOpts) int
|
||||
StreamProjects(*RemoteQueryOpts) *load.ProgressInfo
|
||||
StreamProjects(*load.ProgressInfo, *RemoteQueryOpts)
|
||||
}
|
||||
|
Reference in New Issue
Block a user