utils

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExternalTags added in v0.43.0

func AddExternalTags(mg resource.Managed, spec []*svcapitypes.Tag) []*svcapitypes.Tag

AddExternalTags to spec if they don't exist

func AreTagsUpToDate added in v0.43.0

func AreTagsUpToDate(ctx context.Context, client rdsiface.RDSAPI, spec []*svcapitypes.Tag, resourceName *string) (bool, []*svcsdk.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 added in v0.43.0

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

DiffTags between spec and current

func GetExternalTags added in v0.43.0

func GetExternalTags(mg resource.Managed) []*svcapitypes.Tag

GetExternalTags is a wrapper around resource.GetExternalTags to return a sorted array instead of a map

func ListTagsForResource added in v0.43.0

func ListTagsForResource(ctx context.Context, client rdsiface.RDSAPI, resourceName *string) ([]*svcsdk.Tag, error)

ListTagsForResource for the given resource

func UpdateTagsForResource added in v0.43.0

func UpdateTagsForResource(ctx context.Context, client rdsiface.RDSAPI, 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.

Jump to

Keyboard shortcuts

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