util

package
v0.0.0-...-48c85bd Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFinalizer

func AddFinalizer(obj kubeApiMetav1.Object, finalizer string)

AddFinalizer adds the passed finalizer this object

func CreateDirectory

func CreateDirectory(namespace string, instance string) (string, error)

CreateDirectory create a directory to host generated tf based on namespace and instance name

func GetPrettyJSON

func GetPrettyJSON(byteJson []byte) ([]byte, error)

GetPrettyJSON return a pretty json format

func HasFinalizer

func HasFinalizer(obj kubeApiMetav1.Object, finalizer string) bool

HasFinalizer returns whether this object has the passed finalizer

func HouseCleaning

func HouseCleaning(dirPath string) error

HouseCleaning clean what have been created

func IsBeingDeleted

func IsBeingDeleted(obj kubeApiMetav1.Object) bool

IsBeingDeleted returns whether this object has been requested to be deleted

func IsValidPasswordFormat

func IsValidPasswordFormat(password string) bool

IsValidPasswordFormat Validate password format

func RemoveFinalizer

func RemoveFinalizer(obj kubeApiMetav1.Object, finalizer string)

RemoveFinalizer removes the passed finalizer from object

func ToJson

func ToJson(content interface{}) ([]byte, error)

ToJson return json based on tf tag

func UpdateOutput

func UpdateOutput(instanceOutput *sqlv1alpha1.PostgreSql, output string) (error, *sqlv1alpha1.PostgreSql)

UpdateOutput Unmarshal the returned output and update the output status

func WriteToFile

func WriteToFile(b []byte, path string, name string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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