Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT License.
Index ¶
- func GetScanners() []azqr.IAzureScanner
- type AdvisorResult
- type AdvisorScanner
- type ArmBatchRequest
- type ArmBatchRequestItem
- type ArmBatchResponse
- type ArmBatchResponseItem
- type CostResult
- type CostResultItem
- type CostScanner
- type DefenderResult
- type DefenderScanner
- type DiagnosticSettingsScanner
- func (d *DiagnosticSettingsScanner) Init(ctx context.Context, cred azcore.TokenCredential, options *arm.ClientOptions) error
- func (d *DiagnosticSettingsScanner) ListResourcesWithDiagnosticSettings(resources []*string) (map[string]bool, error)
- func (d *DiagnosticSettingsScanner) Scan(resources []*string) map[string]bool
- type PrivateEndpointScanner
- type PublicIPScanner
- type ResourceScanner
- type SubcriptionScanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetScanners ¶
func GetScanners() []azqr.IAzureScanner
GetScanners returns a list of all scanners
Types ¶
type AdvisorResult ¶
type AdvisorResult struct {
RecommendationID, SubscriptionID, SubscriptionName, Type, Name, ResourceID, Category, Impact, Description string
}
AdvisorResult - Advisor result
type AdvisorScanner ¶
type AdvisorScanner struct {
// contains filtered or unexported fields
}
AdvisorScanner - Advisor scanner
func (*AdvisorScanner) Init ¶
func (s *AdvisorScanner) Init(config *azqr.ScannerConfig) error
Init - Initializes the Advisor Scanner
func (*AdvisorScanner) ListRecommendations ¶
func (s *AdvisorScanner) ListRecommendations() ([]AdvisorResult, error)
ListRecommendations - Lists Azure Advisor recommendations.
func (*AdvisorScanner) Scan ¶
func (s *AdvisorScanner) Scan(scan bool, config *azqr.ScannerConfig) []AdvisorResult
type ArmBatchRequest ¶
type ArmBatchRequest struct {
Requests []ArmBatchRequestItem `json:"requests"`
}
type ArmBatchRequestItem ¶
type ArmBatchResponse ¶
type ArmBatchResponse struct {
Responses []ArmBatchResponseItem `json:"responses"`
}
type ArmBatchResponseItem ¶
type ArmBatchResponseItem struct {
Content armmonitor.DiagnosticSettingsResourceCollection `json:"content"`
}
type CostResult ¶
type CostResult struct {
From, To time.Time
Items []*CostResultItem
}
CostResult - Cost result
type CostResultItem ¶
type CostResultItem struct {
SubscriptionID, SubscriptionName, ServiceName, Value, Currency string
}
CostResultItem - Cost result ite,
type CostScanner ¶
type CostScanner struct {
// contains filtered or unexported fields
}
CostScanner - Cost scanner
func (*CostScanner) Init ¶
func (s *CostScanner) Init(config *azqr.ScannerConfig) error
Init - Initializes the Cost Scanner
func (*CostScanner) QueryCosts ¶
func (s *CostScanner) QueryCosts() (*CostResult, error)
QueryCosts - Query Costs.
func (*CostScanner) Scan ¶
func (s *CostScanner) Scan(scan bool, config *azqr.ScannerConfig) *CostResult
type DefenderResult ¶
DefenderResult - Defender result
type DefenderScanner ¶
type DefenderScanner struct {
// contains filtered or unexported fields
}
DefenderScanner - Defender scanner
func (*DefenderScanner) Init ¶
func (s *DefenderScanner) Init(config *azqr.ScannerConfig) error
Init - Initializes the Defender Scanner
func (*DefenderScanner) ListConfiguration ¶
func (s *DefenderScanner) ListConfiguration() ([]DefenderResult, error)
ListConfiguration - Lists Microsoft Defender for Cloud pricing configurations in the subscription.
func (*DefenderScanner) Scan ¶
func (s *DefenderScanner) Scan(scan bool, config *azqr.ScannerConfig) []DefenderResult
type DiagnosticSettingsScanner ¶
type DiagnosticSettingsScanner struct {
// contains filtered or unexported fields
}
DiagnosticSettingsScanner - scanner for diagnostic settings
func (*DiagnosticSettingsScanner) Init ¶
func (d *DiagnosticSettingsScanner) Init(ctx context.Context, cred azcore.TokenCredential, options *arm.ClientOptions) error
Init - Initializes the DiagnosticSettingsScanner
func (*DiagnosticSettingsScanner) ListResourcesWithDiagnosticSettings ¶
func (d *DiagnosticSettingsScanner) ListResourcesWithDiagnosticSettings(resources []*string) (map[string]bool, error)
ListResourcesWithDiagnosticSettings - Lists all resources with diagnostic settings
type PrivateEndpointScanner ¶
type PrivateEndpointScanner struct {
// contains filtered or unexported fields
}
PrivateEndpointScanner - Scanner for Private Endpoints
func (*PrivateEndpointScanner) Init ¶
func (s *PrivateEndpointScanner) Init(config *azqr.ScannerConfig) error
Init - Initializes the PrivateEndpointScanner
func (*PrivateEndpointScanner) ListResourcesWithPrivateEndpoints ¶
func (s *PrivateEndpointScanner) ListResourcesWithPrivateEndpoints() (map[string]bool, error)
ListResourcesWithPrivateEndpoints - Lists all resources with private endpoints
func (*PrivateEndpointScanner) Scan ¶
func (s *PrivateEndpointScanner) Scan(config *azqr.ScannerConfig) map[string]bool
type PublicIPScanner ¶
type PublicIPScanner struct {
// contains filtered or unexported fields
}
PublicIPScanner - Scanner for Public IPs
func (*PublicIPScanner) Init ¶
func (s *PublicIPScanner) Init(config *azqr.ScannerConfig) error
Init - Initializes the PublicIPScanner
func (*PublicIPScanner) ListPublicIPs ¶
func (s *PublicIPScanner) ListPublicIPs() (map[string]*armnetwork.PublicIPAddress, error)
ListPublicIPs - Lists all Public IPs
func (*PublicIPScanner) Scan ¶
func (s *PublicIPScanner) Scan(config *azqr.ScannerConfig) map[string]*armnetwork.PublicIPAddress
type ResourceScanner ¶
type ResourceScanner struct{}
func (ResourceScanner) GetAllResources ¶
func (ResourceScanner) GetCountPerResourceType ¶
func (sc ResourceScanner) GetCountPerResourceType(ctx context.Context, cred azcore.TokenCredential, subscriptions map[string]string, recommendations map[string]map[string]azqr.AprlRecommendation) []azqr.ResourceTypeCount
type SubcriptionScanner ¶
type SubcriptionScanner struct{}
func (SubcriptionScanner) ListSubscriptions ¶
func (sc SubcriptionScanner) ListSubscriptions(ctx context.Context, cred azcore.TokenCredential, subscriptionID string, filters *azqr.Filters, options *arm.ClientOptions) map[string]string