Documentation
¶
Index ¶
- Constants
- func AppendElement(i interface{}, old string, new string) interface{}
- func CheckFileExist(file string) bool
- func ConvertArrayToMap(arr []interface{}) map[interface{}]interface{}
- func ConvertMapToArray(m map[interface{}]interface{}) []interface{}
- func CopyDir(source string, dest string) (err error)
- func CopyFile(source string, dest string) (err error)
- func CreateMapValuesArray(m map[string][]*types.StepData) []interface{}
- func DeFolderPath(filepaths []string) []string
- func DeleteFile(file string) error
- func DumpPluginModifiedComposeFiles(plugin, funcName string, pluginOrder int)
- func FolderPath(filenames []string) []string
- func FormatInterfaceArray(s []string) []interface{}
- func GenerateAppFolder() error
- func GenerateFileDirs(paths []string) error
- func GetDirFilesRecv(dir string, files *[]string)
- func GetFiles(taskInfo *mesos.TaskInfo) ([]string, error)
- func GetPluginOrder(taskInfo *mesos.TaskInfo) ([]string, error)
- func GetYAML(taskInfo *mesos.TaskInfo) []string
- func IndexArray(array []string, element string) int
- func IndexArrayRegex(array []interface{}, expr string) (int, error)
- func IsSubset(first, second []string) bool
- func OverwriteFile(file string, data []byte) error
- func ParseYamls(files *[]string) (map[string]map[string]interface{}, error)
- func PrefixTaskId(taskId string, session string) string
- func ReplaceElement(i interface{}, old string, new string) interface{}
- func SearchFile(root, file string) string
- func SearchInArray(array []interface{}, key string) string
- func SplitFunc(data []byte, atEOF bool) (advance int, token []byte, err error)
- func SplitYAML(file string) ([]string, error)
- func WriteChangeToFiles() error
- func WriteToFile(file string, data []byte) (string, error)
- type EditorFunc
Constants ¶
const ( FILE_DELIMITER = "," YAML_SEPARATOR = "#---#" FILE_POSTFIX = "-generated.yml" PATH_DELIMITER = "/" MAP_DELIMITER = "=" TraceFolder = "composetrace" )
Variables ¶
This section is empty.
Functions ¶
func AppendElement ¶
AppendElement does append element in array/map Element will be overwrite if it already exist Using regular expression to match the element
func ConvertArrayToMap ¶
func ConvertArrayToMap(arr []interface{}) map[interface{}]interface{}
Convert array like a=b to map a:b
func ConvertMapToArray ¶
func ConvertMapToArray(m map[interface{}]interface{}) []interface{}
func CreateMapValuesArray ¶
CreateMapValuesArray creates an interface array of all the values of the given map examples: Map= {"1":"a", "2":"b", "3":"c"} array returned will be: ["a", "b", "c"]
func DeFolderPath ¶
func DeleteFile ¶
func FolderPath ¶
func FormatInterfaceArray ¶
func FormatInterfaceArray(s []string) []interface{}
[]string to []interface{}
func GenerateAppFolder ¶
func GenerateAppFolder() error
GenerateAppFolder does generate app folder and copy compose files exist in fileName label into folder
func GetDirFilesRecv ¶
Get path compose file Since user may upload a tar ball which including all the compose files. In case they have different depth of folders to keep compose files, GetDirFilesRecv help to get the complete path of compose file
func GetPluginOrder ¶
Get plugin order from label of pluginorder in taskInfo
func IndexArray ¶
get index of an element in array
func IndexArrayRegex ¶
func OverwriteFile ¶
func ReplaceElement ¶
ReplaceElement does replace element in array/map
func SearchInArray ¶
func SplitFunc ¶
splitYAMLDocument is a bufio.SplitFunc for splitting YAML streams into individual documents. This SplitFunc code is from K8s utils, since the yaml serperator is different, it can't be reused directly.
func WriteChangeToFiles ¶
func WriteChangeToFiles() error