| 32 | var raScopeList *api.DsRemoteApiScopeListHelper[models.ArgocdConnection, models.ArgocdApplication, ArgocdRemotePagination] |
| 33 | |
| 34 | func Init(br context.BasicRes, p plugin.PluginMeta) { |
| 35 | vld = validator.New() |
| 36 | basicRes = br |
| 37 | dsHelper = api.NewDataSourceHelper[ |
| 38 | models.ArgocdConnection, models.ArgocdApplication, models.ArgocdScopeConfig, |
| 39 | ]( |
| 40 | br, |
| 41 | p.Name(), |
| 42 | []string{"name"}, |
| 43 | func(c models.ArgocdConnection) models.ArgocdConnection { |
| 44 | return c.Sanitize() |
| 45 | }, |
| 46 | nil, |
| 47 | nil, |
| 48 | ) |
| 49 | raProxy = api.NewDsRemoteApiProxyHelper[models.ArgocdConnection](dsHelper.ConnApi.ModelApiHelper) |
| 50 | raScopeList = api.NewDsRemoteApiScopeListHelper[models.ArgocdConnection, models.ArgocdApplication, ArgocdRemotePagination](raProxy, listArgocdRemoteScopes) |
| 51 | } |