MCPcopy
hub / github.com/apache/devlake / Init

Function Init

backend/plugins/gitlab/api/init.go:38–57  ·  view source on GitHub ↗
(br context.BasicRes, p plugin.PluginMeta)

Source from the content-addressed store, hash-verified

36var raScopeSearch *api.DsRemoteApiScopeSearchHelper[models.GitlabConnection, models.GitlabProject]
37
38func Init(br context.BasicRes, p plugin.PluginMeta) {
39 vld = validator.New()
40 basicRes = br
41 dsHelper = api.NewDataSourceHelper[
42 models.GitlabConnection, models.GitlabProject, models.GitlabScopeConfig,
43 ](
44 br,
45 p.Name(),
46 []string{"name"},
47 func(c models.GitlabConnection) models.GitlabConnection {
48 return c.Sanitize()
49 },
50 nil,
51 nil,
52 )
53 // TODO: remove connectionHelper and refactor remoteHelper
54 raProxy = api.NewDsRemoteApiProxyHelper[models.GitlabConnection](dsHelper.ConnApi.ModelApiHelper)
55 raScopeList = api.NewDsRemoteApiScopeListHelper[models.GitlabConnection, models.GitlabProject, GitlabRemotePagination](raProxy, listGitlabRemoteScopes)
56 raScopeSearch = api.NewDsRemoteApiScopeSearchHelper[models.GitlabConnection, models.GitlabProject](raProxy, searchGitlabScopes)
57}

Callers

nothing calls this directly

Calls 3

NewMethod · 0.65
NameMethod · 0.65
SanitizeMethod · 0.45

Tested by

no test coverage detected