Documentation ¶
Index ¶
- Constants
- func ChdirFromPkgDirectory(relativePath string) string
- func CopyFile(src string, dest string) error
- func GetLogger(name string) *zap.Logger
- func LoadByteToK8sTypedObject(yamlData []byte, out interface{}) error
- func LoadJsonFileToObject(path string, out interface{}) error
- func LoadYaml(path string) ([]*unstructured.Unstructured, error)
- func LoadYamlFileToK8sTypedObject(path string, out interface{}) error
- func LoadYamlFileToObject(path string, out interface{}) error
- func MakeDir(path string) (string, error)
- func MakeDirAndWriteObjToYamlFile(dir string, filename string, in interface{}) error
- func NewFilenameCreator(fnameExt string, opts *FilenameCreatorOption) filenameCreator
- func PathFromPkgDirectory(relativePath string) string
- func ToK8sTypedObject(unstructured *unstructured.Unstructured, typedObject interface{}) error
- func ToK8sUnstructedObject(typedObject interface{}) (unstructured.Unstructured, error)
- func WriteObjToJsonFile(path string, in interface{}) error
- func WriteObjToYamlFile(path string, in interface{}) error
- func WriteObjToYamlFileByGoYaml(path string, in interface{}) error
- type FilenameCreatorOption
- type GitUtils
- type TempDirectory
Constants ¶
View Source
const (
ANNOTATION_COMPONENT_TITLE string = "compliance-to-policy.component-title"
)
Variables ¶
This section is empty.
Functions ¶
func ChdirFromPkgDirectory ¶
func LoadJsonFileToObject ¶
func LoadYaml ¶
func LoadYaml(path string) ([]*unstructured.Unstructured, error)
func LoadYamlFileToObject ¶
Read a yaml file and invoke yaml.Unmarshal(content, out). Maps and pointers (to a struct, string, int, etc) are accepted as out values.
func NewFilenameCreator ¶
func NewFilenameCreator(fnameExt string, opts *FilenameCreatorOption) filenameCreator
func PathFromPkgDirectory ¶
func ToK8sTypedObject ¶
func ToK8sTypedObject(unstructured *unstructured.Unstructured, typedObject interface{}) error
func ToK8sUnstructedObject ¶
func ToK8sUnstructedObject(typedObject interface{}) (unstructured.Unstructured, error)
func WriteObjToJsonFile ¶
func WriteObjToYamlFile ¶
Types ¶
type FilenameCreatorOption ¶
type FilenameCreatorOption struct {
UnlabelToZero bool
}
type GitUtils ¶
type GitUtils struct {
// contains filtered or unexported fields
}
func NewGitUtils ¶
func NewGitUtils(tempDir TempDirectory) GitUtils
func (*GitUtils) LoadFromGit ¶
func (*GitUtils) LoadFromWeb ¶
type TempDirectory ¶
type TempDirectory struct {
// contains filtered or unexported fields
}
func NewTempDirectory ¶
func NewTempDirectory(tempDir string) TempDirectory
func (*TempDirectory) GetTempDir ¶
func (t *TempDirectory) GetTempDir() string
Click to show internal directories.
Click to hide internal directories.