util

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTemplate added in v0.3.0

func ApplyTemplate(in []byte, templateData any) ([]byte, error)

func ConvertFSToBytes

func ConvertFSToBytes(inFS FS, name string, templateData any) ([][]byte, error)

func Copy added in v0.2.0

func Copy(srcFile, dstFile string) error

func CopyDir

func CopyDir(src fs.FS, dest string) error

func CopyDirectory added in v0.2.0

func CopyDirectory(scrDir, dest string) error

func CopyFile

func CopyFile(src fs.File, dest string) error

func CreateIfNotExists added in v0.2.0

func CreateIfNotExists(dir string, perm os.FileMode) error

func Exists added in v0.2.0

func Exists(filePath string) bool

func GeneratePassword added in v0.4.0

func GeneratePassword() (string, error)

func GetCLIStartTimeAnnotationValue added in v0.2.0

func GetCLIStartTimeAnnotationValue(annotations map[string]string) (string, error)

func GetLastObservedSyncTimeAnnotationValue added in v0.2.0

func GetLastObservedSyncTimeAnnotationValue(annotations map[string]string) (string, error)

func SetCLIStartTimeAnnotationValue added in v0.2.0

func SetCLIStartTimeAnnotationValue(annotations map[string]string, timeStamp string)

func SetLastObservedSyncTimeAnnotationValue added in v0.2.0

func SetLastObservedSyncTimeAnnotationValue(annotations map[string]string, timeStamp string)

func UpdateSyncAnnotation added in v0.2.0

func UpdateSyncAnnotation(ctx context.Context, kubeClient client.Client, obj client.Object) error

func WriteFS

func WriteFS(src fs.FS, dest string) error

Types

type CorePackageTemplateConfig added in v0.3.0

type CorePackageTemplateConfig struct {
	Protocol       string
	Host           string
	IngressHost    string
	Port           string
	UsePathRouting bool
}

type FS

type FS interface {
	ReadDir(name string) ([]fs.DirEntry, error)
	ReadFile(name string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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