Help us shape the future of Go! Take the 2026 Go Developer Survey

org

package
v0.16.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 NewIamClient(ctx context.Context, configMap *config.ConfigMap) (*iam.ProjectsServiceAccountsService, error)

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 AdminRepository interface {
	GetUsers(ctx context.Context, fn func(ctx context.Context, entity *iam.UserEntity) error) error
	GetGroups(ctx context.Context, fn func(ctx context.Context, entity *iam.GroupEntity) error) error
}

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 GcpOrgEntity struct {
	// GcpDetails
	EntryName string

	// RaitoDetails
	Id          string
	Name        string
	FullName    string
	Type        string
	Location    string
	Description string
	PolicyTags  []string
	Parent      *GcpOrgEntity
	DataType    *string
	Tags        map[string]string
}

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

func (*OrgIdenityStoreSyncer) GetGroups added in v0.13.0

func (r *OrgIdenityStoreSyncer) GetGroups(ctx context.Context, fn func(ctx context.Context, entity *iam.GroupEntity) error) error

func (*OrgIdenityStoreSyncer) GetUsers added in v0.13.0

func (r *OrgIdenityStoreSyncer) GetUsers(ctx context.Context, fn func(ctx context.Context, entity *iam.UserEntity) error) error

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 (r *ProjectRepository) GetProjectOwner(ctx context.Context, projectId string) (owner []string, editor []string, viewer []string, err error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL