services

package
v0.0.0-test.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: AGPL-3.0 Imports: 13 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 constants.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 = constants.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 = constants.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 constants.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

Types

type AccountsService

type AccountsService struct {
	models.OAMAPIProvider
}

func (*AccountsService) GetAccountsForCurrentUserOrRole

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

type ListMetricsService

type ListMetricsService struct {
	models.MetricsClientProvider
}

func (*ListMetricsService) GetDimensionKeysByDimensionFilter

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

func (*ListMetricsService) GetDimensionValuesByDimensionFilter

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

func (*ListMetricsService) GetMetricsByNamespace

type LogGroupsService

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

func (*LogGroupsService) GetLogGroupFields

func (*LogGroupsService) GetLogGroups

Jump to

Keyboard shortcuts

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