utils

package
v0.0.0-...-471acbf Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const INSTANCE_ANNOTATION = "postgres.db.movetokube.com/instance"

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(name string) string

func GetRandomString

func GetRandomString(length int) string

func GetSecureRandomString

func GetSecureRandomString(length int) (string, error)

If the secure random number generator malfunctions it will return an error

func MatchesInstanceAnnotation

func MatchesInstanceAnnotation(annotationMap map[string]string, configuredInstance string) bool

func MustGetEnv

func MustGetEnv(name string) string

func RenderTemplate

func RenderTemplate(data map[string]string, tc TemplateContext) (map[string][]byte, error)

Types

type TemplateContext

type TemplateContext struct {
	Host     string
	Role     string
	Database string
	Password string
}

Jump to

Keyboard shortcuts

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