Documentation ¶
Index ¶
- Constants
- Variables
- func CmdExec(baseCmd string, args ...string) (string, error)
- func ConcatenateYAMLs(yamls [][]byte) []byte
- func ExactMatch(pattern, value string) bool
- func ExactMatchWithPatternArray(value string, patternArray []string) bool
- func FindManifestYAML(concatYamlBytes, objBytes []byte, maxResourceManifestNum *int, ...) (bool, [][]byte)
- func FindYAMLsInDir(dirPath string) ([][]byte, error)
- func GenerateConcatYAMLsFromImage(img v1.Image) ([]byte, error)
- func GetAnnotationsInYAML(yamlBytes []byte) map[string]string
- func GetBlob(layer v1.Layer) ([]byte, error)
- func GetCache(key string) ([]interface{}, error)
- func GetCacheBaseDir() string
- func GetHomeDir() string
- func GetImageDigest(imageRef string) (string, error)
- func GetNameInfoFromCert(cert *x509.Certificate) string
- func GetUnionOfArrays(array1, array2 []string) []string
- func GetYAMLsInArtifact(blob []byte) ([][]byte, error)
- func GzipCompress(in []byte) []byte
- func GzipDecompress(in []byte) []byte
- func IsConcatYAMLs(yaml []byte) bool
- func IsDir(path string) (bool, error)
- func IsLocalCacheEnabeld() bool
- func LoadFileDataInEnvVar(envVarRef string) ([]byte, error)
- func ManifestSearchByGVKNameNamespace(concatYamlBytes []byte, apiVersion, kind, name, namespace string) (bool, []byte)
- func ManifestSearchByValue(concatYamlBytes, objBytes []byte, maxResourceManifests *int, ...) (bool, [][]byte)
- func MatchBigInt(pattern string, value *big.Int) bool
- func MatchPattern(pattern, value string) bool
- func MatchPatternWithArray(pattern string, valueArray []string) bool
- func MatchSinglePattern(pattern, value string) bool
- func MatchWithPatternArray(value string, patternArray []string) bool
- func PullImage(imageRef string) (v1.Image, error)
- func SetCache(key string, value ...interface{}) error
- func SplitCommaSeparatedString(in string) []string
- func SplitConcatYAMLs(yaml []byte) [][]byte
- func SplitRule(rules string) []string
- func TarGzCompress(src string, buf io.Writer, mo *MutateOptions) error
- func TarGzDecompress(src io.Reader, dst string) error
- type AnnotationWriter
- type Cache
- type CacheType
- type LocalFileCache
- type MutateOptions
- type OnMemoryCache
- type ResourceInfo
- type VersionInfo
Constants ¶
View Source
const EnvVarFileRefPrefix = "env://"
Variables ¶
View Source
var (
GitVersion = "develop" // major and minor version are obtained by parsing this (e.g. v1.2.3 -> major: 1, minor: 2)
)
Functions ¶
func ConcatenateYAMLs ¶
func ExactMatch ¶
func FindManifestYAML ¶
func FindManifestYAML(concatYamlBytes, objBytes []byte, maxResourceManifestNum *int, ignoreFields []string) (bool, [][]byte)
Out of `concatYamlBytes`, find YAML manifests that are corresponding to the `objBytes`. `maxResourceManifestNum` determines how many candidate manifests can be returned. If empty, default to 3. `ignoreFields` is used for value based search, the specified fields are ignored on the comparison.
func FindYAMLsInDir ¶
func GetAnnotationsInYAML ¶
func GetCacheBaseDir ¶
func GetCacheBaseDir() string
func GetHomeDir ¶
func GetHomeDir() string
func GetImageDigest ¶
func GetNameInfoFromCert ¶
func GetNameInfoFromCert(cert *x509.Certificate) string
TODO: support other attributes
func GetUnionOfArrays ¶
func GetYAMLsInArtifact ¶
func GzipCompress ¶
func GzipDecompress ¶
func IsConcatYAMLs ¶
func IsLocalCacheEnabeld ¶
func IsLocalCacheEnabeld() bool
func LoadFileDataInEnvVar ¶ added in v0.3.0
func ManifestSearchByValue ¶
func MatchPattern ¶
func MatchPatternWithArray ¶
func MatchSinglePattern ¶
func MatchWithPatternArray ¶
func SplitConcatYAMLs ¶
func TarGzCompress ¶
func TarGzCompress(src string, buf io.Writer, mo *MutateOptions) error
Types ¶
type AnnotationWriter ¶
AnnotationWriter represents the embedAnnotation function
type LocalFileCache ¶
func (*LocalFileCache) Get ¶
func (c *LocalFileCache) Get(key string) ([]interface{}, error)
func (*LocalFileCache) Set ¶
func (c *LocalFileCache) Set(key string, value ...interface{}) error
type MutateOptions ¶
type MutateOptions struct { AW AnnotationWriter Annotations map[string]interface{} }
type OnMemoryCache ¶
func (*OnMemoryCache) Get ¶
func (c *OnMemoryCache) Get(key string) ([]interface{}, error)
func (*OnMemoryCache) Set ¶
func (c *OnMemoryCache) Set(key string, value ...interface{}) error
type ResourceInfo ¶
type ResourceInfo struct {
// contains filtered or unexported fields
}
func (ResourceInfo) Map ¶
func (ri ResourceInfo) Map() map[string]string
type VersionInfo ¶
type VersionInfo struct { Major string `json:"Major"` Minor string `json:"Minor"` GitVersion string `json:"GitVersion"` GitCommit string `json:"GitCommit"` GitTreeState string `json:"GitTreeState"` BuildDate string `json:"BuildDate"` GoVersion string `json:"GoVersion"` Compiler string `json:"Compiler"` Platform string `json:"Platform"` }
func GetVersionInfo ¶
func GetVersionInfo() *VersionInfo
Source Files ¶
Click to show internal directories.
Click to hide internal directories.