Documentation ¶
Index ¶
- Variables
- type AssetsEnricher
- type AzureAssetsFetcher
- type AzureBatchAssetFetcher
- type AzureBatchResource
- type AzureInsightsBatchAssetFetcher
- type AzureLocationsNetworkWatcherAssetBatchFetcher
- type AzureResource
- type AzureSecurityAssetFetcher
- type MockAssetsEnricher
- type MockAssetsEnricher_Enrich_Call
- func (_c *MockAssetsEnricher_Enrich_Call) Return(_a0 error) *MockAssetsEnricher_Enrich_Call
- func (_c *MockAssetsEnricher_Enrich_Call) Run(run func(ctx context.Context, cycleMetadata cycle.Metadata, ...)) *MockAssetsEnricher_Enrich_Call
- func (_c *MockAssetsEnricher_Enrich_Call) RunAndReturn(run func(context.Context, cycle.Metadata, []inventory.AzureAsset) error) *MockAssetsEnricher_Enrich_Call
- type MockAssetsEnricher_Expecter
- type NetworkWatchersBatchedByLocationResource
- func (r *NetworkWatchersBatchedByLocationResource) GetData() any
- func (r *NetworkWatchersBatchedByLocationResource) GetElasticCommonData() (map[string]any, error)
- func (r *NetworkWatchersBatchedByLocationResource) GetIds() []string
- func (r *NetworkWatchersBatchedByLocationResource) GetMetadata() (fetching.ResourceMetadata, error)
Constants ¶
This section is empty.
Variables ¶
var AzureAssetGroups = []string{inventory.AssetGroupResources, inventory.AssetGroupAuthorizationResources}
In order to simplify the mappings, we are trying to query all AzureAssetTypeToTypePair on every asset group Because this is done with an "|"" this means that we won't get irrelevant data
var AzureAssetTypeToTypePair = map[string]typePair{ inventory.ClassicStorageAccountAssetType: newPair(fetching.AzureClassicStorageAccountType, fetching.CloudStorage), inventory.DiskAssetType: newPair(fetching.AzureDiskType, fetching.CloudCompute), inventory.DocumentDBDatabaseAccountAssetType: newPair(fetching.AzureDocumentDBDatabaseAccountType, fetching.CloudDatabase), inventory.MySQLDBAssetType: newPair(fetching.AzureMySQLDBType, fetching.CloudDatabase), inventory.FlexibleMySQLDBAssetType: newPair(fetching.AzureFlexibleMySQLDBType, fetching.CloudDatabase), inventory.NetworkWatchersFlowLogAssetType: newPair(fetching.AzureNetworkWatchersFlowLogType, fetching.MonitoringIdentity), inventory.FlexiblePostgreSQLDBAssetType: newPair(fetching.AzureFlexiblePostgreSQLDBType, fetching.CloudDatabase), inventory.PostgreSQLDBAssetType: newPair(fetching.AzurePostgreSQLDBType, fetching.CloudDatabase), inventory.SQLServersAssetType: newPair(fetching.AzureSQLServerType, fetching.CloudDatabase), inventory.StorageAccountAssetType: newPair(fetching.AzureStorageAccountType, fetching.CloudStorage), inventory.VirtualMachineAssetType: newPair(fetching.AzureVMType, fetching.CloudCompute), inventory.WebsitesAssetType: newPair(fetching.AzureWebSiteType, fetching.CloudCompute), inventory.VaultAssetType: newPair(fetching.AzureVaultType, fetching.KeyManagement), inventory.RoleDefinitionsType: newPair(fetching.AzureRoleDefinitionType, fetching.CloudIdentity), inventory.NetworkSecurityGroupAssetType: newPair(fetching.AzureNetworkSecurityGroupType, fetching.MonitoringIdentity), }
var AzureBatchAssetGroups = []string{inventory.AssetGroupResources}
In order to simplify the mappings, we are trying to query all AzureBatchAssets on every asset group Because this is done with an "|"" this means that we won't get irrelevant data
var AzureBatchAssets = map[string]typePair{ inventory.ActivityLogAlertAssetType: newPair(fetching.AzureActivityLogAlertType, fetching.MonitoringIdentity), inventory.ApplicationInsights: newPair(fetching.AzureInsightsComponentType, fetching.MonitoringIdentity), inventory.BastionAssetType: newPair(fetching.AzureBastionType, fetching.CloudDns), }
var AzureSecurityAssetTypeToTypePair = map[string]typePair{ inventory.SecurityContactsAssetType: newPair(fetching.AzureSecurityContactsType, fetching.MonitoringIdentity), inventory.SecurityAutoProvisioningSettingsType: newPair(fetching.AzureAutoProvisioningSettingsType, fetching.MonitoringIdentity), }
Functions ¶
This section is empty.
Types ¶
type AssetsEnricher ¶
type AzureAssetsFetcher ¶
type AzureAssetsFetcher struct {
// contains filtered or unexported fields
}
func NewAzureAssetsFetcher ¶
func NewAzureAssetsFetcher(log *logp.Logger, ch chan fetching.ResourceInfo, provider azurelib.ProviderAPI) *AzureAssetsFetcher
func (*AzureAssetsFetcher) Stop ¶
func (f *AzureAssetsFetcher) Stop()
type AzureBatchAssetFetcher ¶
type AzureBatchAssetFetcher struct {
// contains filtered or unexported fields
}
func NewAzureBatchAssetFetcher ¶
func NewAzureBatchAssetFetcher(log *logp.Logger, ch chan fetching.ResourceInfo, provider azurelib.ProviderAPI) *AzureBatchAssetFetcher
func (*AzureBatchAssetFetcher) Stop ¶
func (f *AzureBatchAssetFetcher) Stop()
type AzureBatchResource ¶
type AzureBatchResource struct { Subscription governance.Subscription Assets []inventory.AzureAsset `json:"assets,omitempty"` // contains filtered or unexported fields }
func (*AzureBatchResource) GetData ¶
func (r *AzureBatchResource) GetData() any
func (*AzureBatchResource) GetElasticCommonData ¶
func (r *AzureBatchResource) GetElasticCommonData() (map[string]any, error)
func (*AzureBatchResource) GetIds ¶
func (r *AzureBatchResource) GetIds() []string
func (*AzureBatchResource) GetMetadata ¶
func (r *AzureBatchResource) GetMetadata() (fetching.ResourceMetadata, error)
type AzureInsightsBatchAssetFetcher ¶
type AzureInsightsBatchAssetFetcher struct {
// contains filtered or unexported fields
}
func NewAzureInsightsBatchAssetFetcher ¶
func NewAzureInsightsBatchAssetFetcher(log *logp.Logger, ch chan fetching.ResourceInfo, provider azurelib.ProviderAPI) *AzureInsightsBatchAssetFetcher
func (*AzureInsightsBatchAssetFetcher) Stop ¶
func (f *AzureInsightsBatchAssetFetcher) Stop()
type AzureLocationsNetworkWatcherAssetBatchFetcher ¶
type AzureLocationsNetworkWatcherAssetBatchFetcher struct {
// contains filtered or unexported fields
}
func NewAzureLocationsNetworkWatcherAssetBatchFetcher ¶
func NewAzureLocationsNetworkWatcherAssetBatchFetcher(log *logp.Logger, ch chan fetching.ResourceInfo, provider azurelib.ProviderAPI) *AzureLocationsNetworkWatcherAssetBatchFetcher
func (*AzureLocationsNetworkWatcherAssetBatchFetcher) Stop ¶
func (f *AzureLocationsNetworkWatcherAssetBatchFetcher) Stop()
type AzureResource ¶
type AzureResource struct { Type string SubType string Asset inventory.AzureAsset `json:"asset,omitempty"` Subscription governance.Subscription }
func (*AzureResource) GetData ¶
func (r *AzureResource) GetData() any
func (*AzureResource) GetElasticCommonData ¶
func (r *AzureResource) GetElasticCommonData() (map[string]any, error)
func (*AzureResource) GetIds ¶
func (r *AzureResource) GetIds() []string
func (*AzureResource) GetMetadata ¶
func (r *AzureResource) GetMetadata() (fetching.ResourceMetadata, error)
type AzureSecurityAssetFetcher ¶
type AzureSecurityAssetFetcher struct {
// contains filtered or unexported fields
}
func NewAzureSecurityAssetFetcher ¶
func NewAzureSecurityAssetFetcher(log *logp.Logger, ch chan fetching.ResourceInfo, provider azurelib.ProviderAPI) *AzureSecurityAssetFetcher
func (*AzureSecurityAssetFetcher) Stop ¶
func (f *AzureSecurityAssetFetcher) Stop()
type MockAssetsEnricher ¶
MockAssetsEnricher is an autogenerated mock type for the AssetsEnricher type
func NewMockAssetsEnricher ¶
func NewMockAssetsEnricher(t interface { mock.TestingT Cleanup(func()) }) *MockAssetsEnricher
NewMockAssetsEnricher creates a new instance of MockAssetsEnricher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockAssetsEnricher) EXPECT ¶
func (_m *MockAssetsEnricher) EXPECT() *MockAssetsEnricher_Expecter
func (*MockAssetsEnricher) Enrich ¶
func (_m *MockAssetsEnricher) Enrich(ctx context.Context, cycleMetadata cycle.Metadata, assets []inventory.AzureAsset) error
Enrich provides a mock function with given fields: ctx, cycleMetadata, assets
type MockAssetsEnricher_Enrich_Call ¶
MockAssetsEnricher_Enrich_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Enrich'
func (*MockAssetsEnricher_Enrich_Call) Return ¶
func (_c *MockAssetsEnricher_Enrich_Call) Return(_a0 error) *MockAssetsEnricher_Enrich_Call
func (*MockAssetsEnricher_Enrich_Call) Run ¶
func (_c *MockAssetsEnricher_Enrich_Call) Run(run func(ctx context.Context, cycleMetadata cycle.Metadata, assets []inventory.AzureAsset)) *MockAssetsEnricher_Enrich_Call
func (*MockAssetsEnricher_Enrich_Call) RunAndReturn ¶
func (_c *MockAssetsEnricher_Enrich_Call) RunAndReturn(run func(context.Context, cycle.Metadata, []inventory.AzureAsset) error) *MockAssetsEnricher_Enrich_Call
type MockAssetsEnricher_Expecter ¶
type MockAssetsEnricher_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAssetsEnricher_Expecter) Enrich ¶
func (_e *MockAssetsEnricher_Expecter) Enrich(ctx interface{}, cycleMetadata interface{}, assets interface{}) *MockAssetsEnricher_Enrich_Call
Enrich is a helper method to define mock.On call
- ctx context.Context
- cycleMetadata cycle.Metadata
- assets []inventory.AzureAsset
type NetworkWatchersBatchedByLocationResource ¶
type NetworkWatchersBatchedByLocationResource struct { Subscription governance.Subscription `json:"subscription"` Location inventory.AzureAsset `json:"location"` NetworkWatchers []inventory.AzureAsset `json:"networkWatchers,omitempty"` // contains filtered or unexported fields }
func (*NetworkWatchersBatchedByLocationResource) GetData ¶
func (r *NetworkWatchersBatchedByLocationResource) GetData() any
func (*NetworkWatchersBatchedByLocationResource) GetElasticCommonData ¶
func (r *NetworkWatchersBatchedByLocationResource) GetElasticCommonData() (map[string]any, error)
func (*NetworkWatchersBatchedByLocationResource) GetIds ¶
func (r *NetworkWatchersBatchedByLocationResource) GetIds() []string
func (*NetworkWatchersBatchedByLocationResource) GetMetadata ¶
func (r *NetworkWatchersBatchedByLocationResource) GetMetadata() (fetching.ResourceMetadata, error)
Source Files ¶
- assets_enricher.go
- assets_enricher_app_service.go
- assets_enricher_keyvault.go
- assets_enricher_mysql.go
- assets_enricher_postgresql.go
- assets_enricher_sql_server.go
- assets_enricher_storage_account.go
- assets_enrincher_virtual_machine.go
- assets_fetcher.go
- batch_fetcher.go
- insights_batch_fetcher.go
- locations_network_watcher_batch_fetcher.go
- mock_assets_enricher.go
- security_fetcher.go