util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFSToBytes

func ConvertFSToBytes(inFS FS, name string) ([][]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 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 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