utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreSameElements

func AreSameElements(desired []*string, observed []string) bool

AreSameElements reports whether the desired and observed slices contain the same set of elements, ignoring order and duplicates.

func AreTagsUpToDate

func AreTagsUpToDate(ctx context.Context, client TagClient, spec []*svcapitypes.Tag, resourceName *string) (bool, []svcsdktypes.Tag, []string, error)

AreTagsUpToDate for spec and resourceName

func CompareEngineVersions

func CompareEngineVersions(a, b string) int

CompareEngineVersions is a shortcut to compare two engine versions.

func DiffTags

func DiffTags(spec []*svcapitypes.Tag, current []svcsdktypes.Tag) (addTags []svcsdktypes.Tag, removeTags []string)

DiffTags between spec and current. Tags reserved by AWS (aws:) are left alone: they can't be changed or removed.

func GenerateCloudWatchExportConfiguration

func GenerateCloudWatchExportConfiguration(spec []*string, current []string) *svcsdktypes.CloudwatchLogsExportConfiguration

GenerateCloudWatchExportConfiguration computes the CloudwatchLogsExportConfiguration (log types to enable/disable) needed to reconcile the currently enabled CloudWatch log exports on AWS towards the desired spec. It returns nil when no change is required, so callers can leave the field unset on the modify request in that case.

func ListTagsForResource

func ListTagsForResource(ctx context.Context, client TagClient, resourceName *string) ([]svcsdktypes.Tag, error)

ListTagsForResource for the given resource

func SetPmvDBInstance

func SetPmvDBInstance(obs *svcsdk.DescribeDBInstancesOutput)

SetPmvDBInstance folds any PendingModifiedValues in the DescribeDBInstancesOutput into the observed fields, so that they are taken into account during isUpToDate checks.

func ShouldIgnore

func ShouldIgnore(key string, rules []string) bool

ShouldIgnore returns true if key matches any supplied rule. A rule may be:

  • exact key match (e.g. "c7n:policy")
  • prefix* glob where * is only allowed as the last character (e.g. "c7n:*" or "prefix*")

No other wildcard forms are supported.

func UpdateTagsForResource

func UpdateTagsForResource(ctx context.Context, client TagClient, spec []*svcapitypes.Tag, resourceName *string) error

UpdateTagsForResource with resourceName

Types

type EngineVersion

type EngineVersion []any

EngineVersion represents an AWS RDS engine version.

func ParseEngineVersion

func ParseEngineVersion(raw string) EngineVersion

ParseEngineVersion from a raw string.

func (EngineVersion) Compare

func (v EngineVersion) Compare(other EngineVersion) int

Compare returns a positive value if v is represents a higher version number than other. A negative value is returned if other is higher than v. It returns 0 if both are considered equal.

type TagClient

TagClient is the part of the RDS API needed to manage tags.

Jump to

Keyboard shortcuts

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