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
- func NewRegionsService(ec2client models.EC2APIProvider, logger log.Logger) models.RegionsAPIProvider
- type AccountsService
- type ListMetricsService
- func (l *ListMetricsService) GetDimensionKeysByDimensionFilter(ctx context.Context, r resources.DimensionKeysRequest) ([]resources.ResourceResponse[string], error)
- func (l *ListMetricsService) GetDimensionValuesByDimensionFilter(ctx context.Context, r resources.DimensionValuesRequest) ([]resources.ResourceResponse[string], error)
- func (l *ListMetricsService) GetMetricsByNamespace(ctx context.Context, r resources.MetricsRequest) ([]resources.ResourceResponse[resources.Metric], error)
- type LogGroupsService
- func (s *LogGroupsService) GetLogGroupFieldsWithContext(ctx context.Context, request resources.LogGroupFieldsRequest, ...) ([]resources.ResourceResponse[resources.LogGroupField], error)
- func (s *LogGroupsService) GetLogGroupsWithContext(ctx context.Context, req resources.LogGroupsRequest) ([]resources.ResourceResponse[resources.LogGroup], error)
- type RegionsService
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 ¶
func (l *ListMetricsService) GetMetricsByNamespace(ctx context.Context, r resources.MetricsRequest) ([]resources.ResourceResponse[resources.Metric], error)
type LogGroupsService ¶
type LogGroupsService struct {
// contains filtered or unexported fields
}
func (*LogGroupsService) GetLogGroupFieldsWithContext ¶
func (s *LogGroupsService) GetLogGroupFieldsWithContext(ctx context.Context, request resources.LogGroupFieldsRequest, option ...request.Option) ([]resources.ResourceResponse[resources.LogGroupField], error)
func (*LogGroupsService) GetLogGroupsWithContext ¶
func (s *LogGroupsService) GetLogGroupsWithContext(ctx context.Context, req resources.LogGroupsRequest) ([]resources.ResourceResponse[resources.LogGroup], error)
type RegionsService ¶
type RegionsService struct { models.EC2APIProvider log.Logger }
func (*RegionsService) GetRegions ¶
func (r *RegionsService) GetRegions(ctx context.Context) ([]resources.ResourceResponse[resources.Region], error)
Click to show internal directories.
Click to hide internal directories.