services

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAccessDeniedException = errors.New("access denied. please check your IAM policy")
View Source
var GetAllHardCodedMetrics = func() []resources.ResourceResponse[resources.Metric] {
	response := []resources.Metric{}
	for namespace, metrics := range cloudWatchConsts.NamespaceMetricsMap {
		for _, metric := range metrics {
			response = append(response, resources.Metric{Namespace: namespace, Name: metric})
		}
	}

	return valuesToListMetricRespone(response)
}
View Source
var GetHardCodedDimensionKeysByNamespace = func(namespace string) ([]resources.ResourceResponse[string], error) {
	var response []string
	exists := false
	if response, exists = cloudWatchConsts.NamespaceDimensionKeysMap[namespace]; !exists {
		return nil, fmt.Errorf("unable to find dimensions for namespace '%q'", namespace)
	}
	return valuesToListMetricRespone(response), nil
}
View Source
var GetHardCodedMetricsByNamespace = func(namespace string) ([]resources.ResourceResponse[resources.Metric], error) {
	response := []resources.Metric{}
	exists := false
	var metrics []string
	if metrics, exists = cloudWatchConsts.NamespaceMetricsMap[namespace]; !exists {
		return nil, fmt.Errorf("unable to find metrics for namespace '%q'", namespace)
	}

	for _, metric := range metrics {
		response = append(response, resources.Metric{Namespace: namespace, Name: metric})
	}

	return valuesToListMetricRespone(response), nil
}
View Source
var GetHardCodedNamespaces = func() []resources.ResourceResponse[string] {
	response := []string{}
	for key := range cloudWatchConsts.NamespaceMetricsMap {
		response = append(response, key)
	}

	return valuesToListMetricRespone(response)
}

Functions

func NewAccountsService

func NewAccountsService(oamClient models.OAMAPIProvider) models.AccountsProvider

func NewListMetricsService

func NewListMetricsService(metricsClient models.MetricsClientProvider) models.ListMetricsProvider

func NewLogGroupsService

func NewLogGroupsService(logsClient models.CloudWatchLogsAPIProvider, isCrossAccountEnabled bool) models.LogGroupsProvider

func NewRegionsService

func NewRegionsService(ec2client models.EC2APIProvider, logger log.Logger) models.RegionsAPIProvider

Types

type AccountsService

type AccountsService struct {
	models.OAMAPIProvider
}

func (*AccountsService) GetAccountsForCurrentUserOrRole

func (a *AccountsService) GetAccountsForCurrentUserOrRole(ctx context.Context) ([]resources.ResourceResponse[resources.Account], error)

type ListMetricsService

type ListMetricsService struct {
	models.MetricsClientProvider
}

func (*ListMetricsService) GetDimensionKeysByDimensionFilter

func (l *ListMetricsService) GetDimensionKeysByDimensionFilter(ctx context.Context, r resources.DimensionKeysRequest) ([]resources.ResourceResponse[string], error)

func (*ListMetricsService) GetDimensionValuesByDimensionFilter

func (l *ListMetricsService) GetDimensionValuesByDimensionFilter(ctx context.Context, r resources.DimensionValuesRequest) ([]resources.ResourceResponse[string], error)

func (*ListMetricsService) GetMetricsByNamespace

type LogGroupsService

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

func (*LogGroupsService) GetLogGroupFieldsWithContext

func (*LogGroupsService) GetLogGroupsWithContext

type RegionsService

type RegionsService struct {
	models.EC2APIProvider
	log.Logger
}

func (*RegionsService) GetRegions

Jump to

Keyboard shortcuts

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