common

package
v0.40.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrFmtNoAttribute is an error string for not-found attributes
	ErrFmtNoAttribute = `"attribute not found: %s`
	// ErrFmtUnexpectedType is an error string for attribute map values of unexpected type
	ErrFmtUnexpectedType = `unexpected type for attribute %s: Expecting a string`
	// ErrGetPasswordSecret is an error string for failing to get password secret
	ErrGetPasswordSecret = "cannot get password secret"
)

Variables

This section is empty.

Functions

func AddCommonReferences

func AddCommonReferences(r *tjconfig.Resource) error

AddCommonReferences adds some common reference fields. This is a part of resource generation pipeline.

func GetField added in v0.35.0

func GetField(from map[string]interface{}, path string) (string, error)

GetField returns the value of field as a string in a map[string]interface{},

fails properly otherwise.

func PasswordGenerator added in v0.39.0

func PasswordGenerator(secretRefFieldPath, toggleFieldPath string) tjconfig.NewInitializerFn

PasswordGenerator returns an InitializerFn that will generate a password for a resource if the toggle field is set to true and the secret referenced by the secretRefFieldPath is not found or does not have content corresponding to the password key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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