syncer

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessSyncer

type AccessSyncer struct {
	// contains filtered or unexported fields
}

func NewDataAccessSyncer

func NewDataAccessSyncer(bindingRepo BindingRepository, projectRepo ProjectRepo, maskingService MaskingService, filteringService FilteringService, metadata *data_source.MetaData, configmap *config.ConfigMap) *AccessSyncer

func (*AccessSyncer) ConvertBindingsToAccessProviders

func (a *AccessSyncer) ConvertBindingsToAccessProviders(ctx context.Context, configMap *config.ConfigMap, bindings []iam.IamBinding) ([]*exporter.AccessProvider, error)

func (*AccessSyncer) SyncAccessProviderToTarget

func (a *AccessSyncer) SyncAccessProviderToTarget(ctx context.Context, accessProviders *importer.AccessProviderImport, accessProviderFeedbackHandler wrappers.AccessProviderFeedbackHandler, _ *config.ConfigMap) error

func (*AccessSyncer) SyncAccessProvidersFromTarget

func (a *AccessSyncer) SyncAccessProvidersFromTarget(ctx context.Context, accessProviderHandler wrappers.AccessProviderHandler, configMap *config.ConfigMap) error

type AdminRepository

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 BindingContainer

type BindingContainer struct {
	// contains filtered or unexported fields
}

func NewBindingContainer

func NewBindingContainer() *BindingContainer

func (*BindingContainer) BindingToAdd

func (c *BindingContainer) BindingToAdd(doRef iam.DataObjectReference, binding iam.IamBinding, ap *importer.AccessProvider)

func (*BindingContainer) BindingToDelete

func (c *BindingContainer) BindingToDelete(doRef iam.DataObjectReference, binding iam.IamBinding, ap *importer.AccessProvider)

type BindingRepository

type BindingRepository interface {
	Bindings(ctx context.Context, config *data_source.DataSourceSyncConfig, fn func(ctx context.Context, dataObject *org.GcpOrgEntity, bindings []iam.IamBinding) error) error
	UpdateBindings(ctx context.Context, dataObject *iam.DataObjectReference, addBindings []iam.IamBinding, removeBindings []iam.IamBinding) error

	DataSourceType() string
}

type BindingsForDataObject

type BindingsForDataObject struct {
	// contains filtered or unexported fields
}

func NewBindingsForDataObject

func NewBindingsForDataObject() *BindingsForDataObject

func (*BindingsForDataObject) BindingToAdd

func (b *BindingsForDataObject) BindingToAdd(binding iam.IamBinding, ap *importer.AccessProvider)

func (*BindingsForDataObject) BindingToDelete

func (b *BindingsForDataObject) BindingToDelete(binding iam.IamBinding, ap *importer.AccessProvider)

func (*BindingsForDataObject) GetAllAccessProviders

func (b *BindingsForDataObject) GetAllAccessProviders() []*importer.AccessProvider

type DataSourceRepository

type DataSourceRepository interface {
	DataObjects(ctx context.Context, config *ds.DataSourceSyncConfig, fn func(ctx context.Context, object *org.GcpOrgEntity) error) error
}

type DataSourceSyncer

type DataSourceSyncer struct {
	// contains filtered or unexported fields
}

func NewDataSourceSyncer

func NewDataSourceSyncer(repository DataSourceRepository, metadata *ds.MetaData) *DataSourceSyncer

func (*DataSourceSyncer) GetDataSourceMetaData

func (s *DataSourceSyncer) GetDataSourceMetaData(_ context.Context, _ *config.ConfigMap) (*ds.MetaData, error)

func (*DataSourceSyncer) SyncDataSource

func (s *DataSourceSyncer) SyncDataSource(ctx context.Context, dataSourceHandler wrappers.DataSourceObjectHandler, config *ds.DataSourceSyncConfig) error

type DataUsageRepository

type DataUsageRepository interface {
	GetDataUsage(ctx context.Context, windowStart *time.Time, usageFirstUsed *time.Time, usageLastUsed *time.Time, fn func(ctx context.Context, entity *bigquery.BQInformationSchemaEntity) error) error
}

type DataUsageSyncer

type DataUsageSyncer struct {
	// contains filtered or unexported fields
}

func NewDataUsageSyncer

func NewDataUsageSyncer(repo DataUsageRepository, idGen IdGen, configMap *config.ConfigMap) *DataUsageSyncer

func (*DataUsageSyncer) SyncDataUsage

func (s *DataUsageSyncer) SyncDataUsage(ctx context.Context, fileCreator wrappers.DataUsageStatementHandler, configParams *config.ConfigMap) error

type FilteringService added in v0.11.0

type FilteringService interface {
	ImportFilters(ctx context.Context, config *data_source.DataSourceSyncConfig, accessProviderHandler wrappers.AccessProviderHandler, raitoFilters set.Set[string]) error
	ExportFilter(ctx context.Context, accessProvider *importer.AccessProvider, accessProviderFeedbackHandler wrappers.AccessProviderFeedbackHandler) (*string, error)
}

type IdGen

type IdGen interface {
	New() string
}

type IdGenerator

type IdGenerator struct {
}

func NewIdGenerator

func NewIdGenerator() *IdGenerator

func (*IdGenerator) New

func (i *IdGenerator) New() string

type IdentityStoreSyncer

type IdentityStoreSyncer struct {
	// contains filtered or unexported fields
}

func NewIdentityStoreSyncer

func NewIdentityStoreSyncer(adminRepo AdminRepository, isMetadata *is.MetaData) *IdentityStoreSyncer

func (*IdentityStoreSyncer) GetIdentityStoreMetaData

func (s *IdentityStoreSyncer) GetIdentityStoreMetaData(_ context.Context, _ *config.ConfigMap) (*is.MetaData, error)

func (*IdentityStoreSyncer) SyncIdentityStore

func (s *IdentityStoreSyncer) SyncIdentityStore(ctx context.Context, identityHandler wrappers.IdentityStoreIdentityHandler, configMap *config.ConfigMap) error

type MaskingService

type MaskingService interface {
	ImportMasks(ctx context.Context, accessProviderHandler wrappers.AccessProviderHandler, locations set.Set[string], maskingTags map[string][]string, raitoMasks set.Set[string]) error
	ExportMasks(ctx context.Context, accessProvider *importer.AccessProvider, accessProviderFeedbackHandler wrappers.AccessProviderFeedbackHandler) ([]string, error)
	MaskedBinding(ctx context.Context, members []string) ([]iam.IamBinding, error)
}

type ProjectRepo

type ProjectRepo interface {
	GetProjectOwner(ctx context.Context, projectId string) (owner []string, editor []string, viewer []string, err error)
}

Jump to

Keyboard shortcuts

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