utils

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SKEServiceId = "cloud.stackit.ske"
)

Variables

View Source
var (
	LegacyProjectRoles = []string{"project.admin", "project.auditor", "project.member", "project.owner"}
)

Functions

func IsLegacyProjectRole added in v0.26.0

func IsLegacyProjectRole(role string) bool

func ListValuetoStringSlice

func ListValuetoStringSlice(list basetypes.ListValue) ([]string, error)

func QuoteValues added in v0.26.0

func QuoteValues(values []string) []string

func ReconcileStringSlices

func ReconcileStringSlices(list1, list2 []string) []string

ReconcileStringSlices reconciles two string lists by removing elements from the first list that are not in the second list and appending elements from the second list that are not in the first list. This preserves the order of the elements in the first list that are also in the second list, which is useful when using ListAttributes in Terraform. The source of truth for the order is the first list and the source of truth for the content is the second list.

func SimplifyBackupSchedule added in v0.19.0

func SimplifyBackupSchedule(schedule string) string

Remove leading 0s from backup schedule numbers (e.g. "00 00 * * *" becomes "0 0 * * *") Needed as the API does it internally and would otherwise cause inconsistent result in Terraform

func SupportedValuesDocumentation added in v0.24.0

func SupportedValuesDocumentation(values []string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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