Start moving gitlab code to remote interface
This commit is contained in:
4
internal/cache/cache.go
vendored
4
internal/cache/cache.go
vendored
@@ -10,6 +10,7 @@ import (
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/config"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
@@ -26,6 +27,7 @@ type Cache struct {
|
||||
log *pterm.Logger
|
||||
path string
|
||||
gitlabs *remotes.Clients
|
||||
remotes *remote.Remotes
|
||||
}
|
||||
|
||||
type CacheOpts struct {
|
||||
@@ -34,6 +36,7 @@ type CacheOpts struct {
|
||||
TTL time.Duration
|
||||
Logger *pterm.Logger
|
||||
Gitlabs *remotes.Clients
|
||||
Remotes *remote.Remotes
|
||||
Config *config.Config
|
||||
}
|
||||
|
||||
@@ -211,6 +214,7 @@ func NewProjectCache(opts *CacheOpts) (*Cache, error) {
|
||||
contentLock: &sync.Mutex{},
|
||||
log: opts.Logger,
|
||||
gitlabs: gitlabs,
|
||||
remotes: remote.NewRemotes(),
|
||||
path: opts.ProjectsPath,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user