Documentation ¶
Index ¶
- Constants
- func CheckDir(path string) (bool, error)
- func CidrSubnet(netCidr string, newbits int, netnum interface{}) (ret string, err error)
- func Copy(srcFile, dstFile string) error
- func CopyDirectory(scrDir, dest string) error
- func CopySymLink(source, dest string) error
- func CreateIfNotExists(dir string, perm os.FileMode) error
- func Diff(structA, structB interface{}, colored bool) string
- func Exists(filePath string) bool
- func FileExists(filename string) bool
- func FindLineNumInYamlError(err error) []int
- func GetEnv(key string, defaultVal string) string
- func GetFileByUrl(srcUrl string) (string, error)
- func GetFileByUrlByte(URL string) ([]byte, error)
- func GetTemplate(gitURL, targetDir, templateName string) (string, error)
- func IsAbsolutePath(path string) bool
- func IsDir(path string) bool
- func IsLocalPath(path string) bool
- func JSONCopy(in, out interface{}) error
- func JSONDecode(in []byte, out interface{}) error
- func JSONEncode(in interface{}) ([]byte, error)
- func JSONEncodeString(in interface{}) (string, error)
- func ListFilesByRegex(dirPath, pattern string) ([]string, error)
- func Md5(data string) string
- func MergeMaps(mOne, mTwo map[string]interface{}) (res map[string]interface{})
- func NewYamlError(data []byte, lines []int) string
- func RandString(n int) string
- func ReadFilesToExistentsList(filesPath, baseDir string, filesList map[string][]byte) (err error)
- func ReadFilesToList(filesPath, baseDir string) (filesList map[string][]byte, err error)
- func ReadYAML(objData []byte) (res map[string]interface{}, err error)
- func ReadYAMLObjects(objData []byte) ([]map[string]interface{}, error)
- func RemoveDirContent(dir string) error
- func ResolveYamlError(data []byte, err error) error
- func TerraformJSONOutputParse(in string) (out map[string]string, stringOut string, err error)
- func TruncateString(src string, maxLen int) string
- func URLToFolderName(URL string) (string, error)
- func WriteFilesFromList(path string, filesList map[string]string) (err error)
- func YAMLInterfaceToType(in, out interface{}) error
- type CollectorRespond
- type GitRepo
- type StatsExporter
Constants ¶
View Source
const StatsGatewayURL = "https://cdev-usage.cluster.dev/pushgateway"
Variables ¶
This section is empty.
Functions ¶
func CheckDir ¶
CheckDir check if 'pash' exists and is directory. error means os.Stat error. true - dir
func CidrSubnet ¶
func CopyDirectory ¶ added in v0.5.0
func CopySymLink ¶ added in v0.5.0
func FindLineNumInYamlError ¶ added in v0.6.0
func GetFileByUrl ¶ added in v0.6.0
func GetFileByUrlByte ¶ added in v0.9.6
func GetTemplate ¶
func IsAbsolutePath ¶
func IsLocalPath ¶
func JSONCopy ¶ added in v0.5.2
func JSONCopy(in, out interface{}) error
JSONCopy - convert interface data in to type of out with JSON tags.
func JSONEncodeString ¶ added in v0.5.0
JSONEncode encode in to JSON.
func ListFilesByRegex ¶ added in v0.9.6
func NewYamlError ¶ added in v0.6.0
func RandString ¶ added in v0.4.5
func ReadFilesToList ¶
func ReadYAMLObjects ¶
func RemoveDirContent ¶ added in v0.9.4
func ResolveYamlError ¶ added in v0.6.0
func TerraformJSONOutputParse ¶ added in v0.7.9
TerraformJSONOutputParse parse data from terraform output --json command to map and line-to-line string
func TruncateString ¶
TruncateString - truncate string src to maxLen.
func URLToFolderName ¶ added in v0.7.4
URLToFolderName convert URL to string which can be used as a directory name.
func WriteFilesFromList ¶
func YAMLInterfaceToType ¶ added in v0.5.0
func YAMLInterfaceToType(in, out interface{}) error
YAMLInterfaceToType - convert interface data in to type of out with YAML tags.
Types ¶
type CollectorRespond ¶ added in v0.8.1
type CollectorRespond struct { Context struct { RequestID string `json:"request-id"` } `json:"context"` }
type GitRepo ¶ added in v0.4.6
type GitRepo struct { URL string RepoString string // Repo url without the protocol and the subdirectory e.g. github.com/org/repo?ref=tag . SubDir string Version string }
func ParseGitUrl ¶ added in v0.4.6
type StatsExporter ¶ added in v0.8.1
type StatsExporter struct { }
func (*StatsExporter) PushStats ¶ added in v0.8.1
func (e *StatsExporter) PushStats(stats interface{}) error
Click to show internal directories.
Click to hide internal directories.