Documentation ¶
Index ¶
- Constants
- func NewFoldersClient(ctx context.Context, configMap *config.ConfigMap) (*resourcemanager.FoldersClient, func(), error)
- func NewIamClient(ctx context.Context, configMap *config.ConfigMap) (*iam.ProjectsServiceAccountsService, error)
- func NewOrganizationsClient(ctx context.Context, configMap *config.ConfigMap) (*resourcemanager.OrganizationsClient, func(), error)
- func NewProjectsClient(ctx context.Context, configMap *config.ConfigMap) (*resourcemanager.ProjectsClient, func(), error)
- type AdminRepository
- type FolderRepository
- func (r *FolderRepository) GetFolders(ctx context.Context, parentName string, parent *GcpOrgEntity, ...) error
- func (r *FolderRepository) GetIamPolicy(ctx context.Context, folderId string) ([]iam.IamBinding, error)
- func (r *FolderRepository) UpdateBinding(ctx context.Context, dataObject *iam.DataObjectReference, ...) error
- type GcpDataObjectIterator
- func (r *GcpDataObjectIterator) Bindings(ctx context.Context, config *ds.DataSourceSyncConfig, ...) error
- func (r *GcpDataObjectIterator) DataObjects(ctx context.Context, config *ds.DataSourceSyncConfig, ...) error
- func (r *GcpDataObjectIterator) DataSourceType() string
- func (r *GcpDataObjectIterator) UpdateBindings(ctx context.Context, dataObject *iam.DataObjectReference, ...) error
- type GcpOrgEntity
- type OrgIdenityStoreSyncer
- type OrganizationRepository
- func (r *OrganizationRepository) GetIamPolicy(ctx context.Context, _ string) ([]iam.IamBinding, error)
- func (r *OrganizationRepository) GetOrganization(ctx context.Context) (*GcpOrgEntity, error)
- func (r *OrganizationRepository) UpdateBinding(ctx context.Context, dataObject *iam.DataObjectReference, ...) error
- type ProjectRepository
- func (r *ProjectRepository) GetIamPolicy(ctx context.Context, projectId string) ([]iam.IamBinding, error)
- func (r *ProjectRepository) GetProjectOwner(ctx context.Context, projectId string) (owner []string, editor []string, viewer []string, err error)
- func (r *ProjectRepository) GetProjects(ctx context.Context, _ *ds.DataSourceSyncConfig, parentName string, ...) error
- func (r *ProjectRepository) GetUsers(ctx context.Context, projectEntryName string, ...) error
- func (r *ProjectRepository) UpdateBinding(ctx context.Context, dataObject *iam.DataObjectReference, ...) error
Constants ¶
View Source
const ( TypeProject = "project" TypeFolder = "folder" TypeOrg = "organization" )
Variables ¶
This section is empty.
Functions ¶
func NewFoldersClient ¶
func NewFoldersClient(ctx context.Context, configMap *config.ConfigMap) (*resourcemanager.FoldersClient, func(), error)
func NewIamClient ¶ added in v0.13.0
func NewOrganizationsClient ¶
func NewOrganizationsClient(ctx context.Context, configMap *config.ConfigMap) (*resourcemanager.OrganizationsClient, func(), error)
func NewProjectsClient ¶
func NewProjectsClient(ctx context.Context, configMap *config.ConfigMap) (*resourcemanager.ProjectsClient, func(), error)
Types ¶
type AdminRepository ¶ added in v0.13.0
type FolderRepository ¶
type FolderRepository struct {
// contains filtered or unexported fields
}
func NewFolderRepository ¶
func NewFolderRepository(folderClient folderClient) *FolderRepository
func (*FolderRepository) GetFolders ¶
func (r *FolderRepository) GetFolders(ctx context.Context, parentName string, parent *GcpOrgEntity, fn func(ctx context.Context, folder *GcpOrgEntity) error) error
func (*FolderRepository) GetIamPolicy ¶
func (r *FolderRepository) GetIamPolicy(ctx context.Context, folderId string) ([]iam.IamBinding, error)
func (*FolderRepository) UpdateBinding ¶
func (r *FolderRepository) UpdateBinding(ctx context.Context, dataObject *iam.DataObjectReference, bindingsToAdd []iam.IamBinding, bindingsToDelete []iam.IamBinding) error
type GcpDataObjectIterator ¶
type GcpDataObjectIterator struct {
// contains filtered or unexported fields
}
func NewGcpDataObjectIterator ¶
func NewGcpDataObjectIterator(projectRepo projectRepo, folderRepo folderRepo, organzationRepo organizationRepo, configMap *config.ConfigMap) *GcpDataObjectIterator
func (*GcpDataObjectIterator) Bindings ¶
func (r *GcpDataObjectIterator) Bindings(ctx context.Context, config *ds.DataSourceSyncConfig, fn func(ctx context.Context, dataObject *GcpOrgEntity, bindings []iam.IamBinding) error) error
func (*GcpDataObjectIterator) DataObjects ¶
func (r *GcpDataObjectIterator) DataObjects(ctx context.Context, config *ds.DataSourceSyncConfig, fn func(ctx context.Context, object *GcpOrgEntity) error) error
func (*GcpDataObjectIterator) DataSourceType ¶
func (r *GcpDataObjectIterator) DataSourceType() string
func (*GcpDataObjectIterator) UpdateBindings ¶
func (r *GcpDataObjectIterator) UpdateBindings(ctx context.Context, dataObject *iam.DataObjectReference, addBindings []iam.IamBinding, removeBindings []iam.IamBinding) error
type GcpOrgEntity ¶
type OrgIdenityStoreSyncer ¶ added in v0.13.0
type OrgIdenityStoreSyncer struct {
// contains filtered or unexported fields
}
func NewOrgIdentityStoreSyncer ¶ added in v0.13.0
func NewOrgIdentityStoreSyncer(configMap *config.ConfigMap, adminRepo AdminRepository, projectRepo projectRepository, gcpDataIterator gcpDataIterator) *OrgIdenityStoreSyncer
type OrganizationRepository ¶
type OrganizationRepository struct {
// contains filtered or unexported fields
}
func NewOrganizationRepository ¶
func NewOrganizationRepository(organizationClient organizationClient, configMap *config.ConfigMap) *OrganizationRepository
func (*OrganizationRepository) GetIamPolicy ¶
func (r *OrganizationRepository) GetIamPolicy(ctx context.Context, _ string) ([]iam.IamBinding, error)
func (*OrganizationRepository) GetOrganization ¶
func (r *OrganizationRepository) GetOrganization(ctx context.Context) (*GcpOrgEntity, error)
func (*OrganizationRepository) UpdateBinding ¶
func (r *OrganizationRepository) UpdateBinding(ctx context.Context, dataObject *iam.DataObjectReference, bindingsToAdd []iam.IamBinding, bindingsToDelete []iam.IamBinding) error
type ProjectRepository ¶
type ProjectRepository struct {
// contains filtered or unexported fields
}
func NewProjectRepository ¶
func NewProjectRepository(projectClient projectClient, serviceAccountClient serviceAccountClient) *ProjectRepository
func (*ProjectRepository) GetIamPolicy ¶
func (r *ProjectRepository) GetIamPolicy(ctx context.Context, projectId string) ([]iam.IamBinding, error)
func (*ProjectRepository) GetProjectOwner ¶
func (*ProjectRepository) GetProjects ¶
func (r *ProjectRepository) GetProjects(ctx context.Context, _ *ds.DataSourceSyncConfig, parentName string, parent *GcpOrgEntity, fn func(ctx context.Context, project *GcpOrgEntity) error) error
func (*ProjectRepository) GetUsers ¶ added in v0.13.0
func (r *ProjectRepository) GetUsers(ctx context.Context, projectEntryName string, fn func(ctx context.Context, entity *iam.UserEntity) error) error
func (*ProjectRepository) UpdateBinding ¶
func (r *ProjectRepository) UpdateBinding(ctx context.Context, dataObject *iam.DataObjectReference, bindingsToAdd []iam.IamBinding, bindingsToDelete []iam.IamBinding) error
Click to show internal directories.
Click to hide internal directories.