Documentation ¶
Index ¶
- Variables
- func NewAccountsService(oamClient models.OAMAPIProvider) models.AccountsProvider
- func NewListMetricsService(metricsClient models.MetricsClientProvider) models.ListMetricsProvider
- func NewLogGroupsService(logsClient models.CloudWatchLogsAPIProvider, isCrossAccountEnabled bool) models.LogGroupsProvider
- type AccountsService
- type ListMetricsService
- func (l *ListMetricsService) GetDimensionKeysByDimensionFilter(r resources.DimensionKeysRequest) ([]resources.ResourceResponse[string], error)
- func (l *ListMetricsService) GetDimensionValuesByDimensionFilter(r resources.DimensionValuesRequest) ([]resources.ResourceResponse[string], error)
- func (l *ListMetricsService) GetMetricsByNamespace(r resources.MetricsRequest) ([]resources.ResourceResponse[resources.Metric], error)
- type LogGroupsService
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 ¶
func (l *ListMetricsService) GetMetricsByNamespace(r resources.MetricsRequest) ([]resources.ResourceResponse[resources.Metric], error)
type LogGroupsService ¶
type LogGroupsService struct {
// contains filtered or unexported fields
}
func (*LogGroupsService) GetLogGroupFields ¶
func (s *LogGroupsService) GetLogGroupFields(request resources.LogGroupFieldsRequest) ([]resources.ResourceResponse[resources.LogGroupField], error)
func (*LogGroupsService) GetLogGroups ¶
func (s *LogGroupsService) GetLogGroups(req resources.LogGroupsRequest) ([]resources.ResourceResponse[resources.LogGroup], error)
Click to show internal directories.
Click to hide internal directories.